How can I tell what phase a plugin will run in?

I'm using a plugin in my pom that looks like this:

                <plugin>
                    <groupId>org.codehaus.enunciate</groupId>
                    <artifactId>maven-enunciate-plugin</artifactId>
                    <!-- check for the latest version -->
                    <version>1.27</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>docs</goal>
                            </goals>
                            <configuration>
                                <docsDir>${project.build.directory}/docs</docsDir>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

And I'm wondering, if I run package will this plugin run or is it during site or something else? Is there an easy way to tell by looking at this, or do I have to either

  1. Read the plugin documentation
  2. Experiment through trial and error

I'm hoping there's an easier way. I'm using intellij-idea, if that provides a means I'd be happy with that. Assuming I can't tell without one of these two methods, is it a best practice to always define the phase in the pom so that I can save myself and others time in the future?

Answers


You can let maven print out informations regarding the plugin using mavens help plugin - for enunciate simply use the following command:

mvn help:describe -Dplugin=org.codehaus.enunciate:maven-enunciate-plugin -Ddetail

It has actually 6 goals bound to different phases - goal docs will be bound to process-sources-phase

To only extract the goal you are interested in you can furthermore use the following command:

mvn help:describe -Dmojo=docs -DgroupId=org.codehaus.enunciate -DartifactId=maven-enunciate-plugin -Ddetail

You could also omit the -Ddetail part, but it won't give you then any information on the phase it is running.


Need Your Help

closing multiple GLUT windows independently

c++ opengl glut

In my GLUT program i have created two windows. when i try to close one window entire program shuts down. can anyone tell how to avoid it.

Glassfish won't start, how to reset glassfish instance?

java-ee glassfish derby realm

I made a change in my glassfish jdbc resource pool via the admin console, my last change was a realm configuration where I renamed the user table field from "tablename" to "db"."tablename" as an at...