Maven——常见插件与插件开发

一、shade

Apache Maven Shade Plugin – shade:shade

可以生成fat jar (也叫胖jar或者Uber jar)

Resource Transformers

ApacheLicenseResourceTransformerPrevents license duplication
ApacheNoticeResourceTransformerPrepares merged NOTICE
AppendingTransformerAdds content to a resource
ComponentsXmlResourceTransformerAggregates Plexus components.xml
DontIncludeResourceTransformerPrevents inclusion of matching resources
IncludeResourceTransformerAdds files from the project
ManifestResourceTransformerSets entries in the MANIFEST
ServicesResourceTransformerMerges META-INF/services resources
XmlAppendingTransformerAdds XML content to an XML resource

HubSpot团队最终创建了一个新的Maven插件:SlimFast(HubSpot团队最终创建了一个新的Maven插件:SlimFast(GitHub - HubSpot/SlimFast: Slimming down jars since 2016)。该插件与Shade插件的不同之处在于,它将应用程序代码与相关的依赖项分开,因此会构建并上传两个单独的构件。

二、assembler

Appassembler :: Maven Plug-In – Introduction  要看Java Service Wrapper 这个的笔记  配合这篇文档 What is the Java Service Wrapper? - Java Service Wrapper

使用的Java Service Wrapper版本是3.2.3

三、assembly

Apache Maven Assembly Plugin – Introduction

可以生成fat jar (也叫胖jar或者Uber jar)

四、GMavenPlus  编译Groovy的插件(一共有GMaven、GMavenPlus、GMaven 2 三种) The Apache Groovy programming language - groovyc - the Groovy compiler

GMavenPlus Plugin – GMavenPlus Plugin

Home · groovy/GMavenPlus Wiki · GitHub

五、compiler

Apache Maven Compiler Plugin – Plugin Documentation

六、protoc

protoc-jar-maven-plugin - Introduction

protoc-jar-maven-plugin - protoc-jar:run

七、Maven  deploy plugin

Apache Maven Deploy Plugin – Introduction

八、exec

Exec Maven Plugin – Introduction

九、versions-maven-plugin

Versions Maven Plugin – Introduction

十、maven-dependency-plugin  分析依赖很有用!!!

Apache Maven Dependency Plugin – Introduction

十一、Docker Maven  Plugin

GitHub - spotify/docker-maven-plugin: INACTIVE: A maven plugin for Docker

看Spring Cloud和Docker 13.3

十二、Maven Antrun

Apache Maven AntRun Plugin – Introduction

十三、maven-archetype-plugin  生成项目骨架

Maven Archetype Plugin – Introduction

十四、maven-dependency-plugin  处理依赖很强大

Apache Maven Dependency Plugin – Introduction

十五、maven-enforcer-plugin

Maven Enforcer plugin – Introduction

十六、maven-help-plugin

Apache Maven Help Plugin – Introduction

十七、maven-release-plugin

Maven Release plugin – Introduction

十八、maven-resources-plugin

Apache Maven Resources Plugin – Introduction

十九、maven-surefire-plugin  执行单元测试  maven-surefire-report-plugin 生成单测报告

Maven Surefire Plugin – Introduction

二十、build-helper-maven-plugin

http://mojo.codehaus.org/build-helper-maven-plugin/

二十一、jetty-maven-plugin

Jetty/Feature/Jetty Maven Plugin - Eclipsepedia

二十二、maven-jar-plugin

Apache Maven JAR Plugin – Introduction

可以修改Jar包和Manifest文件。

二十三、maven-help-plugin

Apache Maven Help Plugin – Introduction

The Maven Help Plugin is used to get relative information about a project or the system. It can be used to get a description of a particular plugin, including the plugin's goals with their parameters and component requirements, the effective POM and effective settings of the current build, and the profiles applied to the current project being built.

二十四、war

Apache Maven WAR Plugin – Introduction

二十五、scala-maven-plugin

scala-maven-plugin – scala-maven-plugin

GitHub - davidB/scala-maven-plugin: The scala-maven-plugin (previously maven-scala-plugin) is used for compiling/testing/running/documenting scala code in maven.

二十六、Maven Wrapper

Apache Maven Wrapper – Maven Wrapper

插件开发

Maven – Guide to Developing Java Plugins

一个 maven 插件会有很多个目标,每个目标就是一个 Mojo 类

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值