Hi,

Following is the pom.xml snippet...

<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>properties-maven-plugin</artifactId>
        <version>1.0-alpha-2</version>
        <executions>
                <execution>
                <phase>initialize</phase>
                <goals>
                        <goal>read-project-properties</goal>
                </goals>
                <configuration>
                        <files>
                           <file>my.properties</file>
                        </files>
                        </configuration>
                 </execution>
        </executions>
</plugin>

then, I'm trying to read "exec.type" value from properties file.

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
                <execution>
                        <phase>${exec.type}</phase>
                          .......
                          ......
</plugin>


seems ${exec.type} value is not being read from properties file. where as, I
have another property defined in same properties is working fine..

<plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.2</version>
        <configuration>
                <webappDirectory>${deploy.dir}</webappDirectory>
                ....
</plugin>

Not sure, how these 2 are different.

PS: I tried following and able to read ${exec.type}
1) If I define exec.type in pom.xml
<properties>
        <exec.type>package</exec.type>
</properties>
or
2) If I define exec.type=package as windows environment variable then, also
it is fine.

Only problem is I'm not able to read from properties file.

Any pointers would be highly appreciated.

Thanks,
SR

 

--
View this message in context: 
http://maven.40175.n5.nabble.com/Can-t-read-phase-value-from-properties-file-tp5711621.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to