I lost a few hours this weekend over one line in a maven pom.xml file.  I thought I would post the issue here so that anyone else that runs into this problem might find some help.  The original setup is this:

I have a fairly large Eclipse based application that I am moving from Juno to Kepler.  I am currently using the Maven/Tycho build structure, so I decided to incorporate a Target Platform definition to make it easier for other developers to set up their target platform as they also move to a Kepler install for their IDE.  I created a project with a target platform and copied a pom.xml file from another project.  I set the packaging to “eclipse-target-definition”.  I added all of the dependencies to the target platform definition and set it as the target platform and was able to build successfully with Eclipse.

When I tried to build with maven, the build (even a clean) would fail immediately with “Could not resolve target platform specification artifact”.  After reading a few pages of google search results, I downloaded the Tycho demo project from here: http://git.eclipse.org/c/tycho/org.eclipse.tycho-demo.git

The itp04-rcp project has a target platform, and I could not see any differences between the demo pom.xml and mine.  I moved my target definition into the demo project and did not see the same error, so I determined that it was not an issue with the target definition itself.  After a few hours of tweaking, I finally figured out that you can’t have a version element in the pom.xml file for a target platform.

I removed the version element and was able to build and install my products.  Now I’m off to the races with Kepler!

Leave a Reply

Your email address will not be published. Required fields are marked *