Issue Type: Bug Bug
Assignee: Unassigned
Components: properties
Created: 20/Nov/12 5:54 AM
Description:

I want to externalize properties from my pom.xml into a file named pom.properties.
I configured the properties plugin to read the file in the initialize-phase. However, the properties in my pom.xml don't get replaced with the one from the prop-file, as the output in my example shows:

Example pom.xml:
----------------
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1</version>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<configuration>
<files>
<file>${basedir}/pom.properties</file>
</files>
</configuration>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${basedir}/pom.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>


pom.properties:
--------------
junit.version=1


Output:
-------
(...)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) junit:junit:jar:${junit.version}
(...)

I don't know if it's a bug or i'm doing something wrong.
I also asked at Stackoverflow where someone said i should file an issue.
Corresponding Thread: http://stackoverflow.com/questions/2664362/properties-maven-plugin-error-loading-properties-file

Project: Mojo
Priority: Critical Critical
Reporter: Gaurav Aggarwal
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to