Maven项目中配置Jboss

常俊侠
2023-12-01
<build>
<plugins>

<!-pom.xml中编译->

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>

<!-pom.xml中打包->

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</plugin>

<!-pom.xml中部署->

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
<version>1.5.0</version>
<configuration>
<jbossHome>D:/Java/jboss-4.0.5.GA</jbossHome>
<serverName>all</serverName>
<fileName>target/dwrdemo-0.0.1-SNAPSHOT.war</fileName>
</configuration>
</plugin>
</plugins>
</build>

启动方法:
build输入:jboss:hard-deploy

不要在build中输入:jboss:start或者jboss:stop 因为启动了就控制不了,就关不掉,最好在servers中启动 ---------from Mr.yang

 类似资料: