{"id":2269,"date":"2014-06-09T12:26:07","date_gmt":"2014-06-09T12:26:07","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=2269"},"modified":"2014-06-09T12:26:07","modified_gmt":"2014-06-09T12:26:07","slug":"fix-mojofailureexception-configuring-olingo","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/fix-mojofailureexception-configuring-olingo\/","title":{"rendered":"How to fix MojoFailureException configuring Olingo"},"content":{"rendered":"<p>If you set up Olingo, they have you run a Maven archetype (project template) like so:<\/p>\n<pre>mvn archetype:generate \\\n  -DinteractiveMode=false \\\n  -Dversion=1.0.0-SNAPSHOT \\\n  -DgroupId=com.sample \\\n  -DartifactId=my-car-service \\\n  -DarchetypeGroupId=org.apache.olingo \\\n  -DarchetypeArtifactId=olingo-odata2-sample-cars-service-archetype \\\n  -DarchetypeVersion=RELEASE \\<\/pre>\n<p>If you didn&#8217;t follow the instructions correctly, you&#8217;ll get the following error:<\/p>\n<pre>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project OlingoSampleClient: A Maven 2 project already exists in the directory d:\\projects\\odata\\my-car-service -&gt; [Help 1]\n[ERROR]\n[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.\n[ERROR] Re-run Maven using the -X switch to enable full debug logging. \n[ERROR]\n[ERROR] For more information about the errors and possible solutions, please read the following articles:\n[ERROR] [Help 1] http:\/\/cwiki.apache.org\/confluence\/display\/MAVEN\/MojoFailureException<\/pre>\n<p>All what this means is that you need to make a &#8216;project&#8217; folder, move everything into it &#8211; Maven doesn&#8217;t like the .pom file in the current folder:<\/p>\n<pre>gary@GARY-PC \/d\/projects\/odata\n$ ls\nmy-car-service  pom.xml  project<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you set up Olingo, they have you run a Maven archetype (project template) like so: mvn archetype:generate \\ -DinteractiveMode=false \\ -Dversion=1.0.0-SNAPSHOT \\ -DgroupId=com.sample \\ -DartifactId=my-car-service \\ -DarchetypeGroupId=org.apache.olingo \\ -DarchetypeArtifactId=olingo-odata2-sample-cars-service-archetype \\ -DarchetypeVersion=RELEASE \\ If you didn&#8217;t follow the instructions correctly, you&#8217;ll get the following error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project OlingoSampleClient: &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.garysieling.com\/blog\/fix-mojofailureexception-configuring-olingo\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to fix MojoFailureException configuring Olingo&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[9],"tags":[198,398,399],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2269"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=2269"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2269\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=2269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=2269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=2269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}