[ 
http://jira.codehaus.org/browse/MOJO-1523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=219286#action_219286
 ] 

Ingo Fischer edited comment on MOJO-1523 at 4/28/10 12:10 PM:
--------------------------------------------------------------

Thanks for your answer. Okay, maybe i should use dependencyManagement. 
But no matter what i should do, isn't it some kind of bug either way that the 
properties aren't read from the properties-file during the dependencies 
resolution phase?

      was (Author: insertnamehere):
    Thanks for your answer. Okay, maybe i should use dependencyManagement. 
But no matter what i -should- do, isn't it some kind of bug either way that the 
properties aren't read from the properties-file during the dependencies 
resolution phase?
  
> 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


Reply via email to