{"id":1190,"date":"2017-07-28T19:29:34","date_gmt":"2017-07-28T11:29:34","guid":{"rendered":"http:\/\/www.kumouse.com\/?p=1190"},"modified":"2017-07-28T19:29:34","modified_gmt":"2017-07-28T11:29:34","slug":"mvn-%e6%8a%a5%e9%94%99-the-parameters-mainclass","status":"publish","type":"post","link":"https:\/\/www.kumouse.com\/?p=1190","title":{"rendered":"mvn  \u62a5\u9519 The parameters &#8216;mainClass&#8217;"},"content":{"rendered":"<p>[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project test_artifact: The parameters &#8216;mainClass&#8217; for goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java are<br \/>\nmissing or invalid -&gt; [Help 1]<\/p>\n<p>\u56e0\u4e3a\u63d2\u4ef6\u8fd8\u6ca1\u914d\u7f6e\uff0c\u6ce8\u610f\u914d\u7f6e\u5f15\u5bfc\u8def\u5f84<br \/>\n\u89e3\u51b3\u65b9\u6cd5\uff1a\u5728pom\u6587\u4ef6\u6dfb\u52a0\u5982\u4e0b\u4ee3\u7801 \u00a0EchoServer \u4e3a\u5305\u542bmain\u7684\u7c7b<\/p>\n<pre>&lt;build&gt;\r\n    &lt;plugins&gt;\r\n        &lt;plugin&gt;\r\n            &lt;groupId&gt;org.codehaus.mojo&lt;\/groupId&gt;\r\n            &lt;artifactId&gt;exec-maven-plugin&lt;\/artifactId&gt;\r\n            &lt;version&gt;1.6.0&lt;\/version&gt;\r\n            &lt;executions&gt;\r\n                &lt;execution&gt;\r\n                    &lt;goals&gt;\r\n                        &lt;goal&gt;java&lt;\/goal&gt;\r\n                    &lt;\/goals&gt;\r\n                &lt;\/execution&gt;\r\n            &lt;\/executions&gt;\r\n            &lt;configuration&gt;\r\n                &lt;mainClass&gt;EchoServer&lt;\/mainClass&gt;\r\n            &lt;\/configuration&gt;\r\n        &lt;\/plugin&gt;\r\n    &lt;\/plugins&gt;\r\n&lt;\/build&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>[ERROR] Failed to execute goal org.codehaus.mojo:exec-m [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-1190","post","type-post","status-publish","format-standard","hentry","category-java"],"_links":{"self":[{"href":"https:\/\/www.kumouse.com\/index.php?rest_route=\/wp\/v2\/posts\/1190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kumouse.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kumouse.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kumouse.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kumouse.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1190"}],"version-history":[{"count":1,"href":"https:\/\/www.kumouse.com\/index.php?rest_route=\/wp\/v2\/posts\/1190\/revisions"}],"predecessor-version":[{"id":1191,"href":"https:\/\/www.kumouse.com\/index.php?rest_route=\/wp\/v2\/posts\/1190\/revisions\/1191"}],"wp:attachment":[{"href":"https:\/\/www.kumouse.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kumouse.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kumouse.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}