只需设置一个简单的项目来测试maven exec插件的功能。我有一个包含一个"Hello World“主方法的类。我已经测试了exec插件的两种配置。
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>test.exec.HelloWorldExec</argument>
</arguments>
</configuration>不幸地失败了,给了我一个ClassNotFoundException,
<goals><goal>java</goal></goals>
<configuration>
<mainClass>test.exec.HelloWorldExec</mainClass>
</configuration> 起作用了。然而,我希望能够在单独的进程中启动我的java主类,所以我想了解exec:exec有什么不同,以及如何让它工作?
感谢您的任何帮助
干杯
Whizz
发布于 2010-03-12 23:14:45
可能与this bug有关。描述中包含了一种解决方法,希望对您有所帮助:-)
如果解决方法不起作用,您仍然可以投票支持该错误,以提高快速修复的机会。
https://stackoverflow.com/questions/2433572
复制相似问题