Java中Maven项目导出jar包配置的示例代码

网友投稿 233 2023-01-18


Java中Maven项目导出jar包配置的示例代码

具体代码如下所示;

src/main/java

src/main/resources

${project.build.directory}

**/*.java

src/test/java

src/test/resources

true

**/*.java

org.apache.maven.plugins

maven-compiler-plugin

2.3.2

1.8

1.8

UTF-8

org.apache.maven.plugins

maven-dependency-plugin

copy-dependencies

package

copy-dependencies

${project.build.directory}/lib

org.apache.maven.plugins

maven-jar-plugin

true

lib/

com.ctbri.echoRisk.ApplicationStart

./

${project.basedir}/target

${project.artifactId}-${project.version}

org.apache.maven.plugins

maven-surefire-plugin

2.21.0

true

org.apache.maven.plugins

maven-compiler-plugin

2.3.2

1.8

1.8

UTF-8

${project.basedir}/lib/

org.apache.maven.plugins

maven-shade-plugin

3.1.0

package

shade

true

*:*

implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">

com.ctbri.echoRisk.ApplicationStart

implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">

com.ctbri.echoRisk.ApplicationStart

implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">

META-INF/spring.handlers

implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">

META-INF/spring.handlers

implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">

META-INF/spring.schemas

implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">

META-INF/spring.schemas

org.apache.maven.plugins

maven-surefire-plugin

2.21.0

true

maven-compiler-plugin

2.3.2

<source>1.8

1.8

UTF-8

${project.basedir}/lib/

maven-assembly-plugin

jar-with-dependencies

com.ctbri.echoRisk.ApplicationStart

make-assembly

package

single

总结

以上所述是给大家介绍的Java中Maven项目导出jar包配置的示例代码,希望对大家有所帮助,如果大家有任何疑问请给我留言,会及时回复大家的。在此也非常感谢大家对我们网站的支持!


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:java实现百度云OCR文字识别 高精度OCR识别身份证信息
下一篇:企业科学研发管理平台网址(研发管理平台软件)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~