首页 > eclipse中maven打包

eclipse中maven打包

第一种方式:将依赖包打包进一个jar包中。

  <build><plugins><plugin><artifactId>maven-compiler-pluginartifactId><configuration><source>1.8source><target>1.8target><encoding>${project.build.sourceEncoding}encoding>   configuration>plugin><plugin>  <artifactId>maven-assembly-pluginartifactId>  <configuration>  <descriptorRefs>  <descriptorRef>jar-with-dependenciesdescriptorRef>  descriptorRefs>  <archive>    <manifest>    <mainClass>mainClass>  manifest>  archive>  configuration>  <executions>  <execution>  <id>make-assemblyid>   <phase>packagephase>   <goals>  <goal>singlegoal>  goals>  execution>  executions>  plugin>  plugins>build>

第二种方式: 将依赖包单独放到lib文件夹中

maven-compiler-plugin2.3.21.81.8UTF-8org.apache.maven.pluginsmaven-dependency-plugincopy-dependenciesprepare-packagecopy-dependencies${project.build.directory}/libfalsefalsetrue  org.apache.maven.plugins  maven-jar-plugin  2.4        true  lib/            

 

 

转载于:https://www.cnblogs.com/30go/p/8473952.html

更多相关:

  • 生成plugin骨架代码: Ruby代码 ruby scriptgenerate plugin MyPlugin  ruby scriptgenerate plugin MyPlugin 功能需求: 在BlogController中把所有符合条件的Post(Model)生成为xml 如果不使用插件,很easy : in BlogC...

  •   1  启动Consul 2  创建springcloud-consul项目及三个子模块        2.1 数据模块consul-producer        2.2 数据消费模块consul-consumer        2.3 gateway网关模块 3  测试及项目下载    1、首先安装Consul并启动Consu...

  • 参考自: http://how2j.cn/k/search-engine/search-engine-springboot/1791.html?p=78908 工具版本: elasticsearch 6.2.2、 kibana 6.2.2,  下载地址: elasticsearch、kibana 下载demo 1、kotlin版sp...