You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "sanjiv sahayam (JIRA)" <ji...@codehaus.org> on 2008/12/22 01:03:19 UTC
[jira] Created: (MNG-3933) Profiles.xml does not pickup OS family
Profiles.xml does not pickup OS family
--------------------------------------
Key: MNG-3933
URL: http://jira.codehaus.org/browse/MNG-3933
Project: Maven 2
Issue Type: Bug
Components: Profiles
Affects Versions: 2.0.9
Environment: Ubuntu 8.0.4 64-bit [2.6.24-21-generic #1 SMP Tue Oct 21 23:09:30 UTC 2008 x86_64 GNU/Linux] and
Windows XP sp2 32-bit
Reporter: sanjiv sahayam
When using profiles.xml and specifying an OS family activator such as :
<os>
<family>unix</family>
</os>
The OS family is not detected and hence the profile never activates. I have verified this through mvn help:active-profiles. I have tried this on Windows(XP sp2) as well as Linux (Ubuntu 8.0.4). The only way I can get the profiles to activate is via systems properties:
<activation>
<property>
<name>unix-profile</name>
</property>
</activation>
and then use something of the form: mvn clean test -Dunix-profile.
I've created an example that depends on a specific version of Junit depending on the OS. Unix depends on 4.5 and Windows on 3.8.
Here's my profiles.xml:
<profilesXml
xmlns="http://maven.apache.org/PROFILES/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/PROFILES/1.0.0 http://maven.apache.org/xsd/profiles-1.0.0.xsd">
<profiles>
<profile>
<id>unix</id>
<activation>
<os>
<family>unix</family>
</os>
</activation>
<properties>
<junit.version>4.5</junit.version>
</properties>
</profile>
<profile>
<id>windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<junit.version>3.8</junit.version>
</properties>
</profile>
</profiles>
</profilesXml>
Here's my pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>au.maven.test</groupId>
<artifactId>profiles-bug</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
The only way I can get the correct artefact to be used is via a system property.
--
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
[jira] Updated: (MNG-3933) Profiles.xml does not pickup OS family
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-3933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann updated MNG-3933:
-----------------------------------
Affects Version/s: (was: 3.0-alpha-1)
Fix Version/s: (was: 3.0-alpha-2)
As per MNG-4060, the {{profiles.xml}} is not supported in Maven 3.x
> Profiles.xml does not pickup OS family
> --------------------------------------
>
> Key: MNG-3933
> URL: http://jira.codehaus.org/browse/MNG-3933
> Project: Maven 2
> Issue Type: Bug
> Components: Profiles
> Affects Versions: 2.0.9, 2.1.0-M1
> Environment: Ubuntu 8.0.4 64-bit [2.6.24-21-generic #1 SMP Tue Oct 21 23:09:30 UTC 2008 x86_64 GNU/Linux] and
> Windows XP sp2 32-bit
> Reporter: sanjiv sahayam
> Assignee: Benjamin Bentmann
> Fix For: 2.0.11, 2.1.0
>
> Attachments: MNG-3933-set-activation-os-properly-when-converting.patch
>
>
> When using profiles.xml and specifying an OS family activator such as :
> <os>
> <family>unix</family>
> </os>
> The OS family is not detected and hence the profile never activates. I have verified this through mvn help:active-profiles. I have tried this on Windows(XP sp2) as well as Linux (Ubuntu 8.0.4). The only way I can get the profiles to activate is via systems properties:
> <activation>
> <property>
> <name>unix-profile</name>
> </property>
> </activation>
> and then use something of the form: mvn clean test -Dunix-profile.
> I've created an example that depends on a specific version of Junit depending on the OS. Unix depends on 4.5 and Windows on 3.8.
> Here's my profiles.xml:
> <profilesXml
> xmlns="http://maven.apache.org/PROFILES/1.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/PROFILES/1.0.0 http://maven.apache.org/xsd/profiles-1.0.0.xsd">
> <profiles>
> <profile>
> <id>unix</id>
> <activation>
> <os>
> <family>unix</family>
> </os>
> </activation>
> <properties>
> <junit.version>4.5</junit.version>
> </properties>
> </profile>
> <profile>
> <id>windows</id>
> <activation>
> <os>
> <family>windows</family>
> </os>
> </activation>
> <properties>
> <junit.version>3.8</junit.version>
> </properties>
> </profile>
> </profiles>
> </profilesXml>
> Here's my pom.xml:
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>au.maven.test</groupId>
> <artifactId>profiles-bug</artifactId>
> <version>1.0-SNAPSHOT</version>
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>${junit.version}</version>
> </dependency>
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </project>
> The only way I can get the correct artefact to be used is via a system property.
--
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
[jira] Updated: (MNG-3933) Profiles.xml does not pickup OS family
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-3933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann updated MNG-3933:
-----------------------------------
Affects Version/s: 3.0-alpha-1
2.1.0-M1
Fix Version/s: 3.0-alpha-2
> Profiles.xml does not pickup OS family
> --------------------------------------
>
> Key: MNG-3933
> URL: http://jira.codehaus.org/browse/MNG-3933
> Project: Maven 2
> Issue Type: Bug
> Components: Profiles
> Affects Versions: 2.0.9, 2.1.0-M1, 3.0-alpha-1
> Environment: Ubuntu 8.0.4 64-bit [2.6.24-21-generic #1 SMP Tue Oct 21 23:09:30 UTC 2008 x86_64 GNU/Linux] and
> Windows XP sp2 32-bit
> Reporter: sanjiv sahayam
> Assignee: Benjamin Bentmann
> Fix For: 2.0.11, 2.1.0-M2, 3.0-alpha-2
>
> Attachments: MNG-3933-set-activation-os-properly-when-converting.patch
>
>
> When using profiles.xml and specifying an OS family activator such as :
> <os>
> <family>unix</family>
> </os>
> The OS family is not detected and hence the profile never activates. I have verified this through mvn help:active-profiles. I have tried this on Windows(XP sp2) as well as Linux (Ubuntu 8.0.4). The only way I can get the profiles to activate is via systems properties:
> <activation>
> <property>
> <name>unix-profile</name>
> </property>
> </activation>
> and then use something of the form: mvn clean test -Dunix-profile.
> I've created an example that depends on a specific version of Junit depending on the OS. Unix depends on 4.5 and Windows on 3.8.
> Here's my profiles.xml:
> <profilesXml
> xmlns="http://maven.apache.org/PROFILES/1.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/PROFILES/1.0.0 http://maven.apache.org/xsd/profiles-1.0.0.xsd">
> <profiles>
> <profile>
> <id>unix</id>
> <activation>
> <os>
> <family>unix</family>
> </os>
> </activation>
> <properties>
> <junit.version>4.5</junit.version>
> </properties>
> </profile>
> <profile>
> <id>windows</id>
> <activation>
> <os>
> <family>windows</family>
> </os>
> </activation>
> <properties>
> <junit.version>3.8</junit.version>
> </properties>
> </profile>
> </profiles>
> </profilesXml>
> Here's my pom.xml:
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>au.maven.test</groupId>
> <artifactId>profiles-bug</artifactId>
> <version>1.0-SNAPSHOT</version>
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>${junit.version}</version>
> </dependency>
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </project>
> The only way I can get the correct artefact to be used is via a system property.
--
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
[jira] Updated: (MNG-3933) Profiles.xml does not pickup OS family
Posted by "Pawel Paprota (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-3933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pawel Paprota updated MNG-3933:
-------------------------------
Attachment: MNG-3933-set-activation-os-properly-when-converting.patch
Could it be this little oops in ProfilesConversionUtils.convertFromProfileXmlProfile?
> Profiles.xml does not pickup OS family
> --------------------------------------
>
> Key: MNG-3933
> URL: http://jira.codehaus.org/browse/MNG-3933
> Project: Maven 2
> Issue Type: Bug
> Components: Profiles
> Affects Versions: 2.0.9
> Environment: Ubuntu 8.0.4 64-bit [2.6.24-21-generic #1 SMP Tue Oct 21 23:09:30 UTC 2008 x86_64 GNU/Linux] and
> Windows XP sp2 32-bit
> Reporter: sanjiv sahayam
> Fix For: 2.0.x
>
> Attachments: MNG-3933-set-activation-os-properly-when-converting.patch
>
>
> When using profiles.xml and specifying an OS family activator such as :
> <os>
> <family>unix</family>
> </os>
> The OS family is not detected and hence the profile never activates. I have verified this through mvn help:active-profiles. I have tried this on Windows(XP sp2) as well as Linux (Ubuntu 8.0.4). The only way I can get the profiles to activate is via systems properties:
> <activation>
> <property>
> <name>unix-profile</name>
> </property>
> </activation>
> and then use something of the form: mvn clean test -Dunix-profile.
> I've created an example that depends on a specific version of Junit depending on the OS. Unix depends on 4.5 and Windows on 3.8.
> Here's my profiles.xml:
> <profilesXml
> xmlns="http://maven.apache.org/PROFILES/1.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/PROFILES/1.0.0 http://maven.apache.org/xsd/profiles-1.0.0.xsd">
> <profiles>
> <profile>
> <id>unix</id>
> <activation>
> <os>
> <family>unix</family>
> </os>
> </activation>
> <properties>
> <junit.version>4.5</junit.version>
> </properties>
> </profile>
> <profile>
> <id>windows</id>
> <activation>
> <os>
> <family>windows</family>
> </os>
> </activation>
> <properties>
> <junit.version>3.8</junit.version>
> </properties>
> </profile>
> </profiles>
> </profilesXml>
> Here's my pom.xml:
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>au.maven.test</groupId>
> <artifactId>profiles-bug</artifactId>
> <version>1.0-SNAPSHOT</version>
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>${junit.version}</version>
> </dependency>
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </project>
> The only way I can get the correct artefact to be used is via a system property.
--
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
[jira] Updated: (MNG-3933) Profiles.xml does not pickup OS family
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-3933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated MNG-3933:
------------------------------
Fix Version/s: 2.0.x
> Profiles.xml does not pickup OS family
> --------------------------------------
>
> Key: MNG-3933
> URL: http://jira.codehaus.org/browse/MNG-3933
> Project: Maven 2
> Issue Type: Bug
> Components: Profiles
> Affects Versions: 2.0.9
> Environment: Ubuntu 8.0.4 64-bit [2.6.24-21-generic #1 SMP Tue Oct 21 23:09:30 UTC 2008 x86_64 GNU/Linux] and
> Windows XP sp2 32-bit
> Reporter: sanjiv sahayam
> Fix For: 2.0.x
>
>
> When using profiles.xml and specifying an OS family activator such as :
> <os>
> <family>unix</family>
> </os>
> The OS family is not detected and hence the profile never activates. I have verified this through mvn help:active-profiles. I have tried this on Windows(XP sp2) as well as Linux (Ubuntu 8.0.4). The only way I can get the profiles to activate is via systems properties:
> <activation>
> <property>
> <name>unix-profile</name>
> </property>
> </activation>
> and then use something of the form: mvn clean test -Dunix-profile.
> I've created an example that depends on a specific version of Junit depending on the OS. Unix depends on 4.5 and Windows on 3.8.
> Here's my profiles.xml:
> <profilesXml
> xmlns="http://maven.apache.org/PROFILES/1.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/PROFILES/1.0.0 http://maven.apache.org/xsd/profiles-1.0.0.xsd">
> <profiles>
> <profile>
> <id>unix</id>
> <activation>
> <os>
> <family>unix</family>
> </os>
> </activation>
> <properties>
> <junit.version>4.5</junit.version>
> </properties>
> </profile>
> <profile>
> <id>windows</id>
> <activation>
> <os>
> <family>windows</family>
> </os>
> </activation>
> <properties>
> <junit.version>3.8</junit.version>
> </properties>
> </profile>
> </profiles>
> </profilesXml>
> Here's my pom.xml:
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>au.maven.test</groupId>
> <artifactId>profiles-bug</artifactId>
> <version>1.0-SNAPSHOT</version>
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>${junit.version}</version>
> </dependency>
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </project>
> The only way I can get the correct artefact to be used is via a system property.
--
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
[jira] Closed: (MNG-3933) Profiles.xml does not pickup OS family
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-3933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann closed MNG-3933.
----------------------------------
Assignee: Benjamin Bentmann
Resolution: Fixed
Fix Version/s: (was: 2.0.x)
2.1.0-M2
2.0.11
Patch applied in [r729785|http://svn.eu.apache.org/viewvc?view=rev&revision=729785], [r729786|http://svn.eu.apache.org/viewvc?view=rev&revision=729786] and [r729787|http://svn.eu.apache.org/viewvc?view=rev&revision=729787], respectively. Thanks Pawel!
Note: While the fix has been ported to Maven 3.x, the corresponding IT shows this issue still unresolved. A first debugging session revealed that's because of a more general issue of the entire {{profiles.xml}} not being processed.
> Profiles.xml does not pickup OS family
> --------------------------------------
>
> Key: MNG-3933
> URL: http://jira.codehaus.org/browse/MNG-3933
> Project: Maven 2
> Issue Type: Bug
> Components: Profiles
> Affects Versions: 2.0.9
> Environment: Ubuntu 8.0.4 64-bit [2.6.24-21-generic #1 SMP Tue Oct 21 23:09:30 UTC 2008 x86_64 GNU/Linux] and
> Windows XP sp2 32-bit
> Reporter: sanjiv sahayam
> Assignee: Benjamin Bentmann
> Fix For: 2.0.11, 2.1.0-M2
>
> Attachments: MNG-3933-set-activation-os-properly-when-converting.patch
>
>
> When using profiles.xml and specifying an OS family activator such as :
> <os>
> <family>unix</family>
> </os>
> The OS family is not detected and hence the profile never activates. I have verified this through mvn help:active-profiles. I have tried this on Windows(XP sp2) as well as Linux (Ubuntu 8.0.4). The only way I can get the profiles to activate is via systems properties:
> <activation>
> <property>
> <name>unix-profile</name>
> </property>
> </activation>
> and then use something of the form: mvn clean test -Dunix-profile.
> I've created an example that depends on a specific version of Junit depending on the OS. Unix depends on 4.5 and Windows on 3.8.
> Here's my profiles.xml:
> <profilesXml
> xmlns="http://maven.apache.org/PROFILES/1.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/PROFILES/1.0.0 http://maven.apache.org/xsd/profiles-1.0.0.xsd">
> <profiles>
> <profile>
> <id>unix</id>
> <activation>
> <os>
> <family>unix</family>
> </os>
> </activation>
> <properties>
> <junit.version>4.5</junit.version>
> </properties>
> </profile>
> <profile>
> <id>windows</id>
> <activation>
> <os>
> <family>windows</family>
> </os>
> </activation>
> <properties>
> <junit.version>3.8</junit.version>
> </properties>
> </profile>
> </profiles>
> </profilesXml>
> Here's my pom.xml:
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>au.maven.test</groupId>
> <artifactId>profiles-bug</artifactId>
> <version>1.0-SNAPSHOT</version>
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>${junit.version}</version>
> </dependency>
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </project>
> The only way I can get the correct artefact to be used is via a system property.
--
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