http://www.blogjava.net/miaoyachun/archive/2013/10/30/405795.html
maven项目中有很多本地三方依赖,但是一个一个加入dependency + system scope又很麻烦,又貌似没有搜索到通配符的成功案例,但是从stackoverflow上看到一个插件addjars-maven-plugin, 可以很好解决这类需求:
<build>
<plugins>
<plugin>
<groupId>com.googlecode.addjars-maven-plugin</groupId>
<artifactId>addjars-maven-plugin</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<goals>
<goal>add-jars</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${basedir}/../lib</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven.assembly.version}</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
把项目中依赖的三方jars全放到lib目录里,就全部会打包到release jar里了
分享到:
相关推荐
官方版本,亲测可用
Maven使用tomcat8-maven-plugin插件
maven-project-info-reports-plugin-2.2.jar
Maven-assembly-plugin是maven中针对打包任务而提供的标准插件,可以实现自定义打包。主要提供如下功能: ● 提供一个把工程依赖元素、模块、网站文档等其他文件存放到单个归档文件里。 ● 打包成指定格式分发包,...
官方版本,亲测可用
maven-tomcat-plugin让maven与tomcat配合得很好。它可以把应用部署到Tomcat服务器,也可以把tomcat作为内嵌服务器启动,就像jetty一样。 使用JPDA启动tomcat的远程调试功能。这样就能与eclipse配合起来,轻松地实现...
maven集成jetty必须jar包maven-jetty-plugin,内含多个版本
eclipse-maven3-plugin插件 包含apache-maven-3.3.9和eclipse-maven3-plugin
maven-plugin-parameter-documenter-2.0.jar
ECLIPSE MAVEN3插件文件(eclipse-maven3-plugin工具)
解决tomcat8-maven-plugin-3.0-r1655215.jar阿里云同有的问题。放到路径org\apache\tomcat\maven\tomcat8-maven-plugin\3.0-r1655215\就可以了
009 maven插件spring-boot-maven-plugin
maven-resources-plugin-2.4.1.jar
maven-deploy-plugin-2.8.2.jar
maven是个项目管理工具,如果我们不告诉它我们的代码要使用什么样的jdk版本编译的话...maven的默认编译使用的jdk版本貌似很低,使用maven-compiler-plugin插件可以指定项目源码的jdk版本,编译后的jdk版本,以及编码。
maven-project-info-reports-plugin-2.1.jar
在apache-maven-3.5.2/conf/setting.xml中加入以下配置即可解决 alimaven aliyun maven http://maven.aliyun.com/nexus/content/repositories/central/ central junit junit Address/ ...
mybatis-plus-generator-maven-plugin-v1.0.0依赖的pom.xml,用于mybatis-plus-generator-maven-plugin-1.0.0.jar本地仓库上传时依赖使用
dockerfile-maven-plugin 支持 maven 直接发布项目至 docker 镜像库
maven-deploy-plugin-2.7.jar