Maven 打包 jar 、war 文件时,不将 pom.xml 等打包进包中
2012-04-16 13:48
597 查看
如果是 jar 包,在 Plugin 中配置
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</plugin>
</plugins>
</build>
如果是 war 包,在 Plugin 中配置
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</plugin>
</plugins>
</build>
如果是 war 包,在 Plugin 中配置
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</plugin>
</plugins>
</build>
相关文章推荐
- Maven 打包 jar 、war 文件时,不将 pom.xml 等打包进包中
- 【Maven】修改pom.xml的配置以打包jar文件
- maven web项目pom.xml文件配置打包war文件
- maven打包排除排除指定文件(war,jar)
- maven打包pom.xml配置,及mvn命令,另附常用清除lastUpdated文件的脚本
- 根据已有项目下lib包里jar文件生成maven的pom.xml 里面所有依赖
- 使用assembly将maven项目pom.xml中的jar包打包
- 使用assembly将maven项目pom.xml中的jar包打包
- 解决插件maven-war-plugin在没有web.xml文件时打包出错
- maven 父子项目 聚合与继承 生命周期 打包插件 依赖打包 jar pom war
- Maven将本地jar包生成pom文件,在项目中引用打包到本地仓库。
- 新建maven后,配置pom.xml文件导入spark的jar包,出现红色叹号
- maven 打 war 时打入pom.xml引用之外的jar
- Maven pom.xml文件引入jar包出现 missing artifact问题解决办法
- 使用assembly将maven项目pom.xml中的jar包打包
- maven打包jar与pom文件到本地仓库例子
- maven打包web项目时同时打包为war和jar文件(备忘用)
- 使用assembly将maven项目pom.xml中的jar包打包
- maven 打war包报异常(web.xml 以及jsp js css不在war包中),以及pom.xml 文件配置
- 根据已有项目jar文件生成maven的pom.xml