Continuum

Maven 2 properties are ignored

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-alpha-4
  • Fix Version/s: 1.0.3
  • Component/s: None
  • Labels:
    None
  • Environment:
    Running release 1.0-alpha-4 on Linux, using Maven 2.0-beta-1 release
  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

My Maven 2 project tree consists of a parent directory with a pom.xml and a set of child projects in subdirectories of the parent directory. In the parent project, I am using a pair of properties to define the build version as follows:
<project>
<properties>
<revision>3.0</revision>
<snapshot>-SNAPSHOT</snapshot>
</properties>
...
<version>${revision}${snapshot}</version>
...
</project>

I have tried placing the properties in the parent project and in the child project, but I get the same results.

When I run the build with m2 from the command line, everything builds, installs, and deploys correctly. When the child project is built with Continuum, the output from Maven looks like:
jvm 1 | 2005-09-26 13:08:13,244 [Thread-0] WARN MavenProjectBuilder -
jvm 1 | ***** Using defaults for missing POM qaccess:3rd-party:pom:${revision}${snapshot} *****

Activity

Hide
Bob Allison added a comment -

I think I found the problem. As I was digging a little further into how projects got loaded into Continuum, it looks like all of the projects with packaging=pom were ignored. Unfortunately, this meant that the tree structure was also lost. This is why m2 was unable to resolve the properties from the parent without doing a download. When I made temporary changes to the top-level POM to make it's packaging=jar and remove the modules, I got a single project of the top level. After removing the "--non-recursive" option, it looks like it is resolving the properties correctly.

Show
Bob Allison added a comment - I think I found the problem. As I was digging a little further into how projects got loaded into Continuum, it looks like all of the projects with packaging=pom were ignored. Unfortunately, this meant that the tree structure was also lost. This is why m2 was unable to resolve the properties from the parent without doing a download. When I made temporary changes to the top-level POM to make it's packaging=jar and remove the modules, I got a single project of the top level. After removing the "--non-recursive" option, it looks like it is resolving the properties correctly.
Hide
Emmanuel Venisse added a comment -

Is it works with 1.0?

Show
Emmanuel Venisse added a comment - Is it works with 1.0?
Hide
Daniel J. Bernstein added a comment -

I tried running without --non-recursive and it did not work.

My problem is more serious. I am using a property defined in a profile in settings.xml to name the SCM URL:

<settings>

<profiles>

<profile>

<id>default</id>

<activation>
<activeByDefault/>
</activation>

<properties>
<scm.host>my.scm.host</scm.host>
</properties>
................

</profile>

</profiles>

My pom.xml file looks like this:

<scm>
<connection>scm:svn:svn://${scm.host}/commonrepo/builds</connection>
</scm>

Continuum does NOT do the property subsitution, so my checkout and updates fail. Any plans to fix?

Show
Daniel J. Bernstein added a comment - I tried running without --non-recursive and it did not work. My problem is more serious. I am using a property defined in a profile in settings.xml to name the SCM URL: <settings> <profiles> <profile> <id>default</id> <activation> <activeByDefault/> </activation> <properties> <scm.host>my.scm.host</scm.host> </properties> ................ </profile> </profiles> My pom.xml file looks like this: <scm> <connection>scm:svn:svn://${scm.host}/commonrepo/builds</connection> </scm> Continuum does NOT do the property subsitution, so my checkout and updates fail. Any plans to fix?

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: