-
Notifications
You must be signed in to change notification settings - Fork 0
[SCM]Develop Plugin for Maven
lifuzu edited this page Nov 22, 2013
·
2 revisions
mvn archetype:generate \
-DgroupId=sample.plugin \
-DartifactId=hello-maven-plugin \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DarchetypeArtifactId=maven-archetype-plugin
<project>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<!-- put your configurations here -->
</configuration>
</plugin>
</plugins>
</pluginManagement>
...
</build>
</project>
mvn compile test package install
<project>
<build>
...
<plugins>
<plugin>
<groupId>sample.plugin</groupId>
<artifactId>hello-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>touch</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
...
</project>
mvn sample.plugin:hello-maven-plugin:touch
OR
mvn package
https://github.com/lifuzu/study-maven
#REFERENCE: