常用maven插件配置收集
2011-09-30 23:57
344 查看
收集常用的maven插件配置,,, 方便自己,方便他人.!!!
1. maven-jar-plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>
com.mkk.nativesql.App
</mainClass>
</manifest>
</archive>
<includes>
<include>**/com/mkk/**/*.class</include>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</configuration>
</plugin>
2. maven-compiler-plugin
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
3. maven-war-plugin
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<archive>
<manifestEntries>
<Implementation-BuildNumber>
${build.number}
</Implementation-BuildNumber>
<Specification-Vendor>
www.abcdef.com
</Specification-Vendor>
<Implementation-Vendor>
www.abcdef.com
</Implementation-Vendor>
<Implementation-Title>
${project.name}
</Implementation-Title>
<Implementation-Version>
${project.version}
</Implementation-Version>
</manifestEntries>
</archive>
</configuration>
</plugin>
一点小意见: 使用plugin最好指定<version>.
1. maven-jar-plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>
com.mkk.nativesql.App
</mainClass>
</manifest>
</archive>
<includes>
<include>**/com/mkk/**/*.class</include>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</configuration>
</plugin>
2. maven-compiler-plugin
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
3. maven-war-plugin
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<archive>
<manifestEntries>
<Implementation-BuildNumber>
${build.number}
</Implementation-BuildNumber>
<Specification-Vendor>
www.abcdef.com
</Specification-Vendor>
<Implementation-Vendor>
www.abcdef.com
</Implementation-Vendor>
<Implementation-Title>
${project.name}
</Implementation-Title>
<Implementation-Version>
${project.version}
</Implementation-Version>
</manifestEntries>
</archive>
</configuration>
</plugin>
一点小意见: 使用plugin最好指定<version>.
相关文章推荐
- Maven常用插件配置详解
- Maven常用插件配置 --->以后自己用到再更新
- Maven常用插件配置和使用
- Maven 菜鸟教程 5 常用插件配置
- Maven常用的第三方插件和配置
- Maven常用插件配置
- maven常用的一些插件配置
- maven常用插件pom配置
- Maven的安装配置及常用插件技巧
- Maven常用插件配置
- maven常用插件配置和使用
- Maven学习笔记——常用插件配置详解
- maven常用插件配置
- (三)Maven基本概念——常用插件的配置
- maven常用插件配置详解
- Maven常用插件配置和使用
- Maven中测试插件(surefire)的相关配置及常用方法
- maven常用插件配置
- Maven常用插件配置和使用
- Maven中测试插件(surefire)的相关配置及常用方法