ops4j / org.ops4j.pax.construct

Build, manage and deploy many types of OSGi bundles
https://ops4j1.jira.com/wiki/display/paxconstruct/Pax+Construct
24 stars 14 forks source link

Maven 2.1.0 pax:eclipse creates ${project.basedir} directory [PAXCONSTRUCT-111] #125

Closed ops4j-issues closed 15 years ago

ops4j-issues commented 15 years ago

Gordon Dickens created PAXCONSTRUCT-111

There appears to be an incompatibility between maven 2.1 and Pax Plugin 1.4. When would build mvn clean pax:eclipse it would generate a directory $

{project.basedir}

and put target files there.

The Maven 2.1 documentation alludes to this http://maven.apache.org/guides/introduction/introduction-to-the-pom.html
"Project Model Variables

Any field of the model that is a single value element can be referenced as a variable. For example, $

{project.groupId}

, $

{project.version}

, $

{project.build.sourceDirectory}

and so on. Refer to the POM reference to see a full list of properties.

These variables are all referenced by the prefix "project.". You may also see references with pom. as the prefix, or the prefix omitted entirely - these forms are now deprecated and should not be used."

I reverted to Maven 2.0.10 and it built without creating the erroneous directory.


Affects: 1.4 Fixed in: 1.5 Votes: 0, Watches: 0

ops4j-issues commented 15 years ago

Stuart McCulloch commented

Will see if I can find some time for this next week - brief testing shows this doesn't occur using the plugin in a non-reactor build with 2.1.0 so I suspect something subtle has changed regarding 'when' project property placeholders get expanded in forked lifecycles. Hopefully it's just a minor fix - if you happen to know/find the solution feel free to commit the fix yourself or update this issue with more information :smile:

ops4j-issues commented 15 years ago

Stuart McCulloch commented

In Maven 2.1 the project builder no longer aligns build paths, but leaves them as uninterpolated variables.
(this was a deliberate change to avoid problems later on when the variables were reset by other plugins)

So we now need to call the "alignToBaseDirectory" method ourselves using the path translator component.
Calling this method in earlier releases should have no effect, as the project build paths are already aligned.

See r15294 in trunk for the exact change.