You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by youhaodeyi <yo...@gmail.com> on 2009/08/31 08:35:18 UTC
Why doesn't executions work in my pom?
Below is my pom file. If I put the configuration element under the execution
element, I will get an error when running "mvn native2ascii:native2ascii"
that "src\main\native2ascii not found". If I put the configuration element
directly under plugin element, it will work fine. I wander why I can't put
the configuration in execution element.
This one will not work.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native2ascii-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>native2ascii</goal>
</goals>
<configuration>
<dest>target/classes/config1/i18n</dest>
<src>src/main/config/config/i18n</src>
</configuration>
</execution>
</executions>
</plugin>
This one works fine
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native2ascii-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>native2ascii</goal>
</goals>
</execution>
</executions>
<configuration>
<dest>target/classes/config1/i18n</dest>
<src>src/main/config/config/i18n</src>
</configuration>
</plugin>
--
View this message in context: http://www.nabble.com/Why-doesn%27t-executions-work-in-my-pom--tp25218882p25218882.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Why doesn't executions work in my pom?
Posted by Stephen Connolly <st...@gmail.com>.
executions are to bind the execution to a phase.
when you invoke a plugin goal directly (outside of the lifecycle) then you
have two options:
1. put the config outside executions as this is the default for the plugin
2. Use Maven 2.2.1+ and put the config in the execution with
<id>default-cli</id>
-Stephen
2009/8/31 youhaodeyi <yo...@gmail.com>
>
> Below is my pom file. If I put the configuration element under the
> execution
> element, I will get an error when running "mvn native2ascii:native2ascii"
> that "src\main\native2ascii not found". If I put the configuration element
> directly under plugin element, it will work fine. I wander why I can't put
> the configuration in execution element.
>
> This one will not work.
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
>
> <artifactId>native2ascii-maven-plugin</artifactId>
> <executions>
> <execution>
> <goals>
>
> <goal>native2ascii</goal>
> </goals>
> <configuration>
>
> <dest>target/classes/config1/i18n</dest>
>
> <src>src/main/config/config/i18n</src>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> This one works fine
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
>
> <artifactId>native2ascii-maven-plugin</artifactId>
> <executions>
> <execution>
> <goals>
>
> <goal>native2ascii</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
>
> <dest>target/classes/config1/i18n</dest>
>
> <src>src/main/config/config/i18n</src>
> </configuration>
> </plugin>
> --
> View this message in context:
> http://www.nabble.com/Why-doesn%27t-executions-work-in-my-pom--tp25218882p25218882.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>