0

I am studying Maven plugins from the official references. I read:

You can also configure a mojo using the executions tag. This is most commonly used for mojos that are intended to participate in some phases of the build lifecycle.

but If I do not use the <executions> tag, like this:

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-myquery-plugin</artifactId>
        <version>1.0</version>
        <configuration>
          <url>http://www.foobar.com/query</url>
          <timeout>10</timeout>
          <options>
            <option>one</option>
            <option>two</option>
            <option>three</option>
          </options>
        </configuration>
      </plugin>
    </plugins>
  </build>
  ...
</project>

what happens?

Will we be able to run a goal from maven-myquery-plugin only in isolation giving a command like mvn myquery:myquery or does the plugin come up bundled in some phase/life cycle by default?

Johan
  • 3,561
  • 9
  • 29
  • 45

1 Answers1

0

I also have been wondering if it's possible to skip the executions tag. As there is no direct answer on the official website I tried to make such a plugin with default phase bindings by myself and the answer is: no goals will be executed if they weren't specified in the executions tag. Such a plugin (goal) could be executed only by direct command: <plugin>:<goal>