You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by octalpus <hw...@gmail.com> on 2007/04/16 16:20:41 UTC
Using custom properties with Maven site
Hi all!
Does anyone know of a way to allow the Maven 2 Site Plugin
(http://maven.apache.org/plugins/maven-site-plugin/) to use defined custom
properties within a pom.xml? For example,
<project>
...
<properties>
<parentVersion>0.0.4</parentVersion>
</properties>
<groupId>aGroupID</groupId>
<artifactId>anArtifactID</artifactId>
<version>${parentVersion}</version>
...
</project>
If I try to run "mvn site" against this pom, the site build fails. I can
see from the error logs that Maven site:site is trying to resolve artifacts
without properly replacing the custom property:
[INFO] [site:site]
Downloading:
http://host/repository/aGroupID/anArtifactID/${parentVersion}/anArtifactID-${parentVersion}.pom
I know I can make this work by passing the custom property on the command
line ("mvn site -DparentVersion=0.0.4"), but I would like to re-use the
already defined property from the pom file. From my digging, it looks like
custom properties are resolved during the "process-sources" and
"process-resources" phases, of the default build lifecycle. Since the site
plugin is handled in a different build lifecycle, I'm assuming these phases
are not called. Does anyone know of another way around this?
Thanks very much!
octalpus.
--
View this message in context: http://www.nabble.com/Using-custom-properties-with-Maven-site-tf3584647s177.html#a10016734
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org