{"id":15,"date":"2009-07-29T13:33:46","date_gmt":"2009-07-29T12:33:46","guid":{"rendered":"http:\/\/www.flamingpenguin.co.uk\/blog\/?p=15"},"modified":"2009-07-29T13:34:29","modified_gmt":"2009-07-29T12:34:29","slug":"m2eclipse-and-separate-output-folders","status":"publish","type":"post","link":"https:\/\/www.flamingpenguin.co.uk\/blog\/2009\/07\/29\/m2eclipse-and-separate-output-folders\/","title":{"rendered":"m2eclipse and separate output folders"},"content":{"rendered":"<p>The recent versions of m2eclipse (> 0.9.3) are a nightmare to get working. The biggest issues is that if you run a command line build whilst eclipse is working, one or the other will get totally borked. there is a section in the FAQ describing how to use <a href=\"http:\/\/docs.codehaus.org\/display\/M2ECLIPSE\/Project+FAQ#ProjectFAQ-HowtoconfigureMavenprojecttouseseparateoutputfoldersinEclipse\">separate output folders<\/a>. Essentially you have to tell eclipse to use a certain maven profile, which changes your project configuration.<\/p>\n<p>The instructions almost work. However, some plugins need the project.build.directory variable (for example for code-generation) to be set, and the FAQ does not achieve that. <\/p>\n<p>Ordinarily you would have to specify the directory element in the build section:<\/p>\n<pre lang=\"xml\">\r\n<directory>${basedir}\/${target.dir}<\/directory>\r\n<\/pre>\n<p>If you do this however, anything you launch in eclipse will <strong>not<\/strong> have the correct classpath. You must fully specify the output directories:<\/p>\n<pre lang=\"xml\">\r\n<directory>${basedir}\/${target.dir}<\/directory>\r\n<outputDirectory>${basedir}\/${target.dir}\/classes<\/outputDirectory>\r\n<testOutputDirectory>${basedir}\/${target.dir}\/test-classes<\/testOutputDirectory>\r\n<\/pre>\n<p>I assume this is because m2eclipse is doing some kind of parsing of the pom.xml<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The recent versions of m2eclipse (> 0.9.3) are a nightmare to get working. The biggest issues is that if you run a command line build whilst eclipse is working, one or the other will get totally borked. there is a &hellip; <a href=\"https:\/\/www.flamingpenguin.co.uk\/blog\/2009\/07\/29\/m2eclipse-and-separate-output-folders\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[37,19,18],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-java","tag-java","tag-m2eclipse","tag-maven"],"_links":{"self":[{"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=15"}],"version-history":[{"count":0,"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/posts\/15\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}