I can not reproduce version 1.1 exec-maven-plugin. I created a sample project:
$ mvn archetype:generate -DgroupId=com.stackoverflow.q2433572 -DartifactId=q2433572 -Dversion=1.0-SNAPSHOT $ cd q2433572
I added the following plugin configuration in pom.xml:
<project> ... <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1</version> <goals> <goal>exec</goal> </goals> <configuration> <executable>java</executable> <arguments> <argument>-classpath</argument> <classpath/> <argument>com.stackoverflow.q2433572.App</argument> </arguments> </configuration> </plugin> </plugins> </build> </project>
And this is the result that I get when running mvn exec:exec :
$ mvn exec: exec
[INFO] Scanning for projects ...
[INFO] ----------------------------------------------- -------------------------
[INFO] Building q2433572
[INFO] task-segment: [exec: exec]
[INFO] ----------------------------------------------- -------------------------
[INFO] [exec: exec {execution: default-cli}]
[INFO] Hello World!
[INFO] ----------------------------------------------- -------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ----------------------------------------------- -------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Fri Mar 12 17:11:38 CET 2010
[INFO] Final Memory: 3M / 53M
[INFO] ----------------------------------------------- -------------------------
Works as expected.
source share