标签:版本 简单 双击 项目 目的 cat failure snapshot maven插件
<packaging>maven-plugin</packaging>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.5.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.5</version>
<scope>provided</scope>
</dependency>
AbstractMojo.class
public void execute() throws MojoExecutionException, MojoFailureException {
System.out.println("具体业务");
}
@Mojo
@Mojo(name="lhy",defaultPhase = LifecyclePhase.PACKAGE)
<build>
<plugins>
<plugin>
<groupId>com.lhy</groupId>
<artifactId>lhy-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
</plugin>
</plugins>
</build>
@Parameter
private String msg;
<build>
<plugins>
<plugin>
<groupId>com.lhy</groupId>
<artifactId>lhy-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<msg></msg>
</configuration>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>lhy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
标签:版本 简单 双击 项目 目的 cat failure snapshot maven插件
原文地址:https://www.cnblogs.com/lanhaiyue/p/10990313.html