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 = m...@example.com
my.path.2 = ${project.basedir}


mvn test 
cat target/classes/test.properties 

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

Expected result:
my.path.1 = /home/me/my-app
my.email = m...@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

        

Reply via email to