我刚刚开始使用 jersey,并使用 maven 构建了 jersey 2.0 骨架 webapp。
命令是: mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes \ -DarchetypeArtifactId=jersey-quickstart-webapp -DarchetypeVersion=2.0
现在,如果我尝试使用 mvn clean exec:java 执行此操作,则会收到以下错误:
[INFO] ------------------------------------------------------------------------
[INFO] Building testwebservice 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ testwebservice ---
[INFO] Deleting /Volumes/data/Projects/TestWebService/testwebservice/target
[INFO]
[INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) @ testwebservice >>>
[INFO]
[INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) @ testwebservice <<<
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ testwebservice ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.627s
[INFO] Finished at: Sat Jun 22 17:46:18 CEST 2013
[INFO] Final Memory: 8M/125M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project testwebservice: The parameters 'mainClass' for goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java are missing or invalid -> [Help 1]
提供的帮助不是很有帮助,我似乎在网上找不到任何关于此的信息。我不知道在哪里为“目标”(无论这意味着什么)设置参数 mainClass org.codehaus ...。这是我的第一个 Maven 项目,我很迷茫
谢谢你们的帮助