Maven分模块项目将依赖一起打包
来源:互联网 发布:三菱plc编程实例3000 编辑:程序博客网 时间:2024/05/29 19:02
这里记录一下几种方式 以后备用:
1.maven-assembly-plugin插件(mvn assembly:assembly)
2.maven-shade-plugin插件
3.scala-maven-plugin插件(scala的打包插件)
<plugins> <build> <sourceDirectory>src/main/scala</sourceDirectory> <testSourceDirectory>src/test/scala</testSourceDirectory> <plugins> //scala-maven-plugin的打包插件配置 <plugin> <groupId>net.alchim31.maven</groupId> <artifactId>scala-maven-plugin</artifactId> <version>3.2.2</version> <executions> <execution> <goals> <goal>compile</goal> <goal>testCompile</goal> </goals> <configuration> <args> <arg>-make:transitive</arg> <arg>-dependencyfile</arg> <arg>${project.build.directory}/.scala_dependencies</arg> </args> </configuration> </execution> </executions> </plugin> //maven-shade-plugin的打包插件配置 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.3</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <filters> <filter> <artifact>*:*</artifact> <excludes> <exclude>META-INF/*.SF</exclude> <exclude>META-INF/*.DSA</exclude> <exclude>META-INF/*.RSA</exclude> </excludes> </filter> </filters> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> <resource>reference.conf</resource> </transformer> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>cn.touna.main.BootStrop</mainClass> </transformer> </transformers> </configuration> </execution> </executions> </plugin> //maven-assembly-plugin的打包方式 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.5.5</version> <configuration> <archive> <manifest> <mainClass>cn.touna.main.BootStrop</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> </plugins>
0 1
- Maven分模块项目将依赖一起打包
- maven将依赖包一起打包
- Maven将依赖一起打包--使用maven-assembly-plugin
- Maven + Eclipse 分模块开发,依赖打包部署
- maven 打包依赖项目
- maven项目分模块
- Maven自动生成可运行jar包并将依赖的jar包一起打包
- eclipse maven项目导出jar包时一起打包所依赖的相关jar包
- 分模块创建maven项目
- maven将项目导出为jar包并且包含依赖包一起导出
- Maven项目多模块打包
- maven 分模块 分工程构建项目
- maven 将依赖jar包打包
- Maven 将依赖打包到lib
- Spring-boot web 工程构建,并把maven子项目模块依赖jar打包,笔记
- maven中把依赖的JAR包一起打包
- maven中把依赖的JAR包一起打包
- maven中把依赖的JAR包一起打包
- fastjson生成json时Null转为空字符串""或者不展示
- mysql alter 操作
- android源码设计模式解析与实战 笔记 5.7节
- hdu 3333 Turing Tree 线段树 离线查询(区间内不同的数之和)
- sublimetext3-实用快捷键整理
- Maven分模块项目将依赖一起打包
- 一 Swift 3.0之 常量与变量
- 题目1056:最大公约数
- maven jar 打包
- springMVC中RestTemplate传值接值
- VS2015环境下使用opencv3.2
- iOS-传值大全
- 如何使用github
- 关于getContext()、getApplication()、getApplicationContext()、getActivity()的区别