maven 工程简单打包
来源:互联网 发布:位图制作软件 编辑:程序博客网 时间:2024/06/05 11:49
pom.xml
<artifactId>CDR</artifactId>
<packaging>jar</packaging> jar可以换成其他如 war zip ==
<description>service projects</description>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
<excludes>
<exclude>**/*.xml</exclude>
<exclude>**/mapper</exclude>
<exclude>**/*.properties</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<descriptors>
<descriptor>src/main/resources/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
assembly.xml
<assembly>
<id>cdr</id>
<formats>
<format>zip</format>
</formats>
<dependencySets>
<dependencySet>
<useProjectArtifact>true</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
<excludes>
<exclude>src/main/resources</exclude>
</excludes>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<outputDirectory>/</outputDirectory>
<includes>
<include>README.txt</include>
</includes>
</fileSet>
<fileSet>
<directory>src/main/bin</directory>
<outputDirectory>/bin</outputDirectory>
<includes>
<include>run.sh</include>
<include>run.bat</include>
</includes>
</fileSet>
<fileSet>
<directory>src/main/resources</directory>
<outputDirectory>/conf</outputDirectory>
<excludes>
<exclude>assembly.xml</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>log</directory>
<outputDirectory>/log</outputDirectory>
<excludes>
<exclude>*.log</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>
outputDirectory 输出目录
excludes 排除的文件
includes 包含的文件
pom.xml
<artifactId>CDR</artifactId>
<packaging>jar</packaging> jar可以换成其他如 war zip ==
<description>service projects</description>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
<excludes>
<exclude>**/*.xml</exclude>
<exclude>**/mapper</exclude>
<exclude>**/*.properties</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<descriptors>
<descriptor>src/main/resources/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
assembly.xml
<assembly>
<id>cdr</id>
<formats>
<format>zip</format>
</formats>
<dependencySets>
<dependencySet>
<useProjectArtifact>true</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
<excludes>
<exclude>src/main/resources</exclude>
</excludes>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<outputDirectory>/</outputDirectory>
<includes>
<include>README.txt</include>
</includes>
</fileSet>
<fileSet>
<directory>src/main/bin</directory>
<outputDirectory>/bin</outputDirectory>
<includes>
<include>run.sh</include>
<include>run.bat</include>
</includes>
</fileSet>
<fileSet>
<directory>src/main/resources</directory>
<outputDirectory>/conf</outputDirectory>
<excludes>
<exclude>assembly.xml</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>log</directory>
<outputDirectory>/log</outputDirectory>
<excludes>
<exclude>*.log</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>
outputDirectory 输出目录
excludes 排除的文件
includes 包含的文件
- maven 工程简单打包
- maven 工程简单打包
- Maven命令行打包工程
- 手动打包maven工程
- 简单 maven工程 spring注入 占位符 替换打包
- Maven工程中源码打包
- Maven打包/构建Android工程
- 使用maven给工程打包
- maven 工程打包独立运行
- maven工程本地打包方法
- 如何通过Maven打包工程
- 搭建简单Maven工程
- 配置一个简单的maven工程,实现自动打包,自动编译
- maven 学习笔记(五)-创建简单的eclipse+android+maven工程(打包为aar文件)
- Docker使用Maven简单打包
- maven工程打包找不到hbm文件
- maven工程打包找不到hbm文件
- IDEA + Tomcat + Maven + Web工程打包部署
- BB平台oracle11g-180天密码过期问题处理
- 《一直以来伴随我的一些学习习惯》的记录
- Hadoop、Spark、HBase与Redis的适用性讨论
- android handler消息机制
- Red Hat搭建邮件服务器(sendmail+dovecot+openwebmail+procmail)
- maven 工程简单打包
- 函数调用的执行过程
- 500 OOPS: cannot change directory 500 OOPS: priv_sock_get_cmd Connection closed by remote host.
- windows 下svn服务器的撘建
- linux内核之旅---"hello world"模块
- 2014年总结
- Flume把命令执行结果写入平面文件
- android studio 项目 转换成eclipse
- d3力场Force Layout