You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Albert Tumanov (JIRA)" <ji...@codehaus.org> on 2011/01/13 10:30:57 UTC

[jira] Created: (MNG-4974) Filtering in .properties breaks after encountering @

Filtering in .properties breaks after encountering @
----------------------------------------------------

                 Key: MNG-4974
                 URL: http://jira.codehaus.org/browse/MNG-4974
             Project: Maven 2 & 3
          Issue Type: Bug
    Affects Versions: 3.0.2
            Reporter: Albert Tumanov


Filtering (replacing) of placeholders (like ${project.basedir} etc) in *.properties files does not work after encountering a line with a symbol @.
This works in Maven 2 but fails in Maven 3.

Steps to reproduce:

mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
cd my-app

Add to pom.xml:

    <build>
        <resources>
            <resource>
                <filtering>true</filtering>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
    </build>

mkdir src/main/resources

cat > src/main/resources/test.properties

my.path.1 = ${project.basedir}
my.email = me@example.com
my.path.2 = ${project.basedir}


mvn test 
cat target/classes/test.properties 

Result:
my.path.1 = /home/me/my-app
my.email = me@example.com
my.path.2 = ${project.basedir}

Expected result:
my.path.1 = /home/me/my-app
my.email = me@example.com
my.path.2 = /home/me/my-app

-- 
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] Moved: (MRESOURCES-136) Filtering in .properties breaks after encountering @

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MRESOURCES-136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann moved MNG-4974 to MRESOURCES-136:
---------------------------------------------------

           Complexity:   (was: Intermediate)
    Affects Version/s:     (was: 3.0.2)
                       2.4.3
                  Key: MRESOURCES-136  (was: MNG-4974)
              Project: Maven 2.x Resources Plugin  (was: Maven 2 & 3)

> Filtering in .properties breaks after encountering @
> ----------------------------------------------------
>
>                 Key: MRESOURCES-136
>                 URL: http://jira.codehaus.org/browse/MRESOURCES-136
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4.3
>            Reporter: Albert Tumanov
>
> Filtering (replacing) of placeholders (like ${project.basedir} etc) in *.properties files does not work after encountering a line with a symbol @.
> This works in Maven 2 but fails in Maven 3.
> Steps to reproduce:
> mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
> cd my-app
> Add to pom.xml:
>     <build>
>         <resources>
>             <resource>
>                 <filtering>true</filtering>
>                 <directory>src/main/resources</directory>
>             </resource>
>         </resources>
>     </build>
> mkdir src/main/resources
> cat > src/main/resources/test.properties
> my.path.1 = ${project.basedir}
> my.email = me@example.com
> my.path.2 = ${project.basedir}
> mvn test 
> cat target/classes/test.properties 
> Result:
> my.path.1 = /home/me/my-app
> my.email = me@example.com
> my.path.2 = ${project.basedir}
> Expected result:
> my.path.1 = /home/me/my-app
> my.email = me@example.com
> my.path.2 = /home/me/my-app

-- 
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: (MRESOURCES-136) Filtering in .properties breaks after encountering @

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MRESOURCES-136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MRESOURCES-136.
----------------------------------------

    Resolution: Duplicate
      Assignee: Benjamin Bentmann

Tip: If switching the Maven version makes your build suffer from this, you want to ensure that you have all your plugin versions locked down in the POM.

> Filtering in .properties breaks after encountering @
> ----------------------------------------------------
>
>                 Key: MRESOURCES-136
>                 URL: http://jira.codehaus.org/browse/MRESOURCES-136
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4.3
>            Reporter: Albert Tumanov
>            Assignee: Benjamin Bentmann
>
> Filtering (replacing) of placeholders (like ${project.basedir} etc) in *.properties files does not work after encountering a line with a symbol @.
> This works in Maven 2 but fails in Maven 3.
> Steps to reproduce:
> mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
> cd my-app
> Add to pom.xml:
>     <build>
>         <resources>
>             <resource>
>                 <filtering>true</filtering>
>                 <directory>src/main/resources</directory>
>             </resource>
>         </resources>
>     </build>
> mkdir src/main/resources
> cat > src/main/resources/test.properties
> my.path.1 = ${project.basedir}
> my.email = me@example.com
> my.path.2 = ${project.basedir}
> mvn test 
> cat target/classes/test.properties 
> Result:
> my.path.1 = /home/me/my-app
> my.email = me@example.com
> my.path.2 = ${project.basedir}
> Expected result:
> my.path.1 = /home/me/my-app
> my.email = me@example.com
> my.path.2 = /home/me/my-app

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