views:

19

answers:

1

how run a task post maven eclipse:eclipse phase ?

<groupId>org.codehaus.mojo</groupId>

<artifactId>exec-maven-plugin</artifactId>

<version>1.2</version>

<executions>

    <execution>

        <phase>eclipse:eclipse</phase>

        <goals>

            <goal>java</goal>

        </goals>

        <configuration>

            <executable>java</executable>

            <mainClass>a.b.c.Main</mainClass>

        </configuration>

    </execution>

</executions>

this configuration seems not ok.

+2  A: 

how run a task post maven eclipse:eclipse phase ?

You can't, eclipse:eclipse is not a phase.

Either bind some goals on the same phase (if this even makes sense) and they would get executed in their declaration order.

Or invoke them from the command line (and optionally provide a default configuration to be used when running from the command line). For example, you could do:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>exec-maven-plugin</artifactId>
  <version>1.2</version>
  <executions>
    <execution>
      <id>default-cli</phase>
      <configuration>
        <executable>java</executable>
        <mainClass>a.b.c.Main</mainClass>
      </configuration>
    </execution>
  </executions>
</plugin>

And then invoke:

mvn eclipse:eclipse exec:java
Pascal Thivent