maven自定义(修改)编译后输出的war或jar文件名

 <build>
	<plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-assembly-plugin</artifactId>
			<version>2.4</version>
			<configuration>
				<finalName>自定义文件包名</finalName>
				<appendAssemblyId>false</appendAssemblyId>
				<descriptors>
					<descriptor>${basedir}/src/main/assembly.xml</descriptor>
				</descriptors>
			</configuration>
			<executions>
				<execution>
					<id>make-assembly</id>
					<phase>package</phase>
					<goals>
						<goal>single</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
	</plugins>
</build>

猜你喜欢

转载自aigo.iteye.com/blog/2201329