You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "J C (JIRA)" <ji...@codehaus.org> on 2009/11/28 01:08:55 UTC

[jira] Commented: (MNG-4471) Profile activation fails if contains variables

    [ http://jira.codehaus.org/browse/MNG-4471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=199813#action_199813 ] 

J C commented on MNG-4471:
--------------------------

I can't seem to attach the file, so here's testcase2.xml:

<?xml version="1.0" encoding="UTF-8"?>

<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>testcase2</groupId>
  <artifactId>testcase2</artifactId>
  <version>1.0</version>
  
  <properties>
    <test.prop>.</test.prop>
  </properties>
  
  <profiles>
    <profile>
      <id>testcase2</id>
      <activation>
        <file>
          <exists>${test.prop}/testcase2.xml</exists>
        </file>
      </activation>
    </profile>
    <profile>
      <id>absolute path</id>
      <activation>
        <file>
          <exists>./testcase2.xml</exists>
        </file>
      </activation>
    </profile>
  </profiles>
</project>


> Profile activation fails if <file> contains variables 
> ------------------------------------------------------
>
>                 Key: MNG-4471
>                 URL: http://jira.codehaus.org/browse/MNG-4471
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Profiles
>    Affects Versions: 3.0-alpha-5
>         Environment: Mac OS X 10.6.2
>            Reporter: J C
>            Assignee: Benjamin Bentmann
>         Attachments: pom.xml, testcase.xml, testcase2.xml, testcase2.xml
>
>
> See the attached testcase.
> The profile is not activated when <file> has variables in it:
> <file><exists>${env.M2_HOME}/bin/mvn</exists></file>
> But when the path is absolute, it works:
> <file><exists>/my/maven/home/bin/mvn</exists></file>

-- 
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