[
http://jira.codehaus.org/browse/MOJO-1523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=219293#action_219293
]
Joerg Schaible commented on MOJO-1523:
--------------------------------------
It's by design. The project definition has to be self-contained, otherwise it
is no longer complete if it is refered from elsewhere as part of the transitive
deps.
> External properties from file don't get evaluated in pom.xml
> ------------------------------------------------------------
>
> Key: MOJO-1523
> URL: http://jira.codehaus.org/browse/MOJO-1523
> Project: Mojo
> Issue Type: Bug
> Components: properties
> Reporter: Ingo Fischer
> Priority: Critical
> Attachments: PropertiesTest.zip
>
>
> 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
--
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
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email