热门IT资讯网

maven 生成war和jar包的设置

发表于:2024-11-25 作者:热门IT资讯网编辑
编辑最后更新 2024年11月25日,部署maven 生成war和jar包的设置:org.apache.maven.pluginsmaven-war-plugin2.1.1../jxchelianCenter/WebRoot/WEB-IN

部署maven 生成warjar包的设置:

<plugins>

<plugin>

<groupId>org.apache.maven.pluginsgroupId>

<artifactId>maven-war-pluginartifactId>

<version>2.1.1version>

<configuration>

<webXml>../jxchelianCenter/WebRoot/WEB-INF/web.xmlwebXml>

<warSourceDirectory>WebRootwarSourceDirectory>

configuration>

plugin>

<plugin>

<groupId>org.apache.maven.pluginsgroupId>

<artifactId>maven-jar-pluginartifactId>

<version>2.3.1version>

<executions>

<execution>

<phase>packagephase>

<goals>

<goal>jargoal>

goals>

<configuration>

<archive>

<manifest>

<addClasspath>trueaddClasspath>

manifest>

archive>

<classesDirectory>WebRoot/WEB-INF/classesclassesDirectory>

<finalName>jxchelianCenterfinalName>

<outputDirectory>targetoutputDirectory>

configuration>

execution>

executions>

plugin>

<plugin>

<artifactId>maven-compiler-pluginartifactId>

<configuration>

<source>1.7source>

<target>1.7target>

configuration>

plugin>

<plugin>

<artifactId>maven-war-pluginartifactId>

<version>2.4version>

<configuration>

<version>3.1version>

configuration>

plugin>


0