Hi, it's me again.
I found a suitable work-around for the described problem:

The line in my filtered resource file looks like this:
log4j.appender.xml.file=cc-web-${cc.country}.xml

I want cc.country to be replaced by a command-line option, e.g. 'mvn -Dcountry=de clean install'. This didn't work directly by using -Dcc.country=de.
I added the following lines and it's working now as expected:
   <properties>
       <cc.country>${country}</cc.country>
   </properties>

${country} is correctly replaced by the given command line argument so ${cc.country} is replaced in the resources, too.

My other mysteries are still unsolved and I'm pretty sure that this is a bug...

Joern.

Joern Huxhorn wrote:
Hi.

I'm currently trying to filter a resource using a command-line argument as described at http://maven.apache.org/guides/getting-started/index.html . Interestingly, ${pom.name} and ${pom.version} are both working... however, ${java.version} is also replaced by the ${pom.version}-value while

${command.line.prop} (as in the example) isn't replaced at all after calling 'mvn process-resources "-Dcommand.line.prop=hello again"' or 'mvn clean install "-Dcommand.line.prop=hello again"'...


The relevant part of my pom looks like this:

[..]
<packaging>war</packaging>
[..]
    <build>
[..]
        <resources>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
[..]
    </build>

Is filtering using command line arguments currently broken?

Thanks,
Joern.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to