continuum-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "B. Garvelink (JIRA)" <j...@codehaus.org>
Subject [jira] Created: (CONTINUUM-1620) Per-profile properties in Maven2 project ignored in "Show Projects" page
Date Fri, 11 Jan 2008 10:51:58 GMT
Per-profile properties in Maven2 project ignored in "Show Projects" page
------------------------------------------------------------------------

                 Key: CONTINUUM-1620
                 URL: http://jira.codehaus.org/browse/CONTINUUM-1620
             Project: Continuum
          Issue Type: Bug
          Components: Integration - Maven 2, Web - UI
    Affects Versions: 1.0.3
            Reporter: B. Garvelink


*Exec summary:*
In a Maven 2 project, after each build, continuum updates that project's name from the POM
file. When doing so in a project with build profiles, it uses the properties from the default
profile rather than the profile that was activated for the build.

*Details:*
I have a multi-module project set up with three profiles, development, nightly and release.
The profiles are embedded in the main pom. The development profile is intended for the developers'
workstations and is set to activate by default. The other two profiles are intended for continuum
and are activated by passing the {{-Pnightly}} or {{-Prelease}} flag to M2. The nightly profile
is triggered each night, the release profile is only triggered manually and updates its working
copy to an SCM label that we move forward for each release. Note that I'm using two continuum
projects, not two build definitions within a single project.

The profiles differ in distributionManagement settings, enforcer/verifier config, reporting,
and various other bits. The issue at hand concerns profile properties. I use profile properties
to configure the {{name}} and {{version}} elements of the main pom.

The main pom looks like this:
{code:xml|borderStyle=solid|title=top-level pom (abridged)}
<project>
  <name>${profile.proj.name}</name>
  <version>${profile.proj.version}</version>
  <profiles>
    <profile>
      <id>development</id>
      <activation>
        <activatedByDefault>true</activatedByDefault>
      </activation>
      <properties>
        <profile.proj.name>MyProject (development)</profile.proj.name>
        <profile.proj.version>1.1-SNAPSHOT</profile.proj.version>
      </properties>
    </profile>
    <profile>
      <id>nightly</id>
      <properties>
        <profile.proj.name>MyProject (nightly)</profile.proj.name>
        <profile.proj.version>1.1-SNAPSHOT</profile.proj.version>
      </properties>
    </profile>
    <profile>
      <id>release</id>
      <properties>
        <profile.proj.name>MyProject (release)</profile.proj.name>
        <!-- By definition, this is a version that we haven't built yet. It is incremented
after a release. -->
        <profile.proj.version>1.1</profile.proj.version>
      </properties>
    </profile>
  </profiles>
</project>
{code}

The issue concerns Continuum's "show projects" screen, its main window. 

After each build, continuum updates that project's name from the POM file, but when doing
so, it uses the properties from the default profile, rather than the profile used for the
build. In this particular case, where I expect the project list to show up as:
| (/) | MyProject (nightly) | 1.1-SNAPSHOT | 115 | My Company | ... |
| (/) | MyProject (release) | 1.0          |   1 | My Company | ... |

what I get instead is:
| (/) | MyProject (development) | 1.1-SNAPSHOT | 115 | My Company | ... |
| (/) | MyProject (development) | 1.1-SNAPSHOT |   1 | My Company | ... |

Looking into the build logs and the generated website, the builds themselves have been executed
with the correct settings, so the builds themselves occur the way I want them to. The issue
affects only the way continuum refreshes the project data into its control panel. The profiles
can be told apart by the large difference in version number, but it's inconvenient and confusing.

P.S.: The company I work for has not yet upgraded its buildservers to Continuum 1.1, so I'm
reporting this issue against 1.0.3. I'm a bit reluctant to report against an expired version,
but security restrictions prevent me from firing up a 1.1 instance and testing if the issue
is still there. I've searched the changelog and open issues, and I don't think this issue
has been reported yet.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message