How to rename goals in Maven?
Posted
by mjs
on Stack Overflow
See other posts from Stack Overflow
or by mjs
Published on 2010-04-29T10:04:26Z
Indexed on
2010/04/29
10:07 UTC
Read the original article
Hit count: 310
In the Maven document Introduction to the Build Lifecycle, a goal of display:time
is described that outputs the current time. The plugin is as follows:
...
<plugin>
<groupId>com.mycompany.example</groupId>
<artifactId>maven-touch-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>process-test-resources</phase>
<goals>
<goal>timestamp</goal>
</goals>
</execution>
</executions>
</plugin>
...
I have several questions relating to this plugin:
- How can I change the name of the goal to, for example,
foo:bar
? (Why does neitherdisplay
nortime
appear anywhere in the XML fragment? How can you tell, from looking at the fragment, what goals it defines?) - How can I manually run this goal? (For similar constructs, the equivalent of
mvn display:time
sometimes works, but this doesn't work consistently.) - How can I see if this goal exists? (i.e. list available goals; this question suggests this is impossible.)
© Stack Overflow or respective owner