You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christian Kölle <ch...@switch.ch> on 2008/02/20 13:09:43 UTC
Problem with property inheritance in maven site plugin
Hi all
I have a problem with the property inheritance in the maven site project.
I have a multi-module project. The base pom looks like this:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>my.project</groupId>
<artifactId>all</artifactId>
<packaging>pom</packaging>
<version>${project.version}</version>
<properties>
<project.version>1.0</project.version>
</properties>
...
</project>
The poms of the subprojects look like this:
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>my.project</groupId>
<artifactId>all</artifactId>
<version>${project.version}</version>
<relativePath>../Build/pom.xml</relativePath>
</parent>
...
</project>
This works fine for the install goal (wich use a lot of different
plugins for special purposes) but not for the site plugin. A call to
"mvn site" produces the following error:
[INFO] [site:stage]
Downloading:
http://repo1.maven.org/maven2/my/project/${project.version}/all-${project.version}.pom
[INFO] Parent project loaded from repository.
[INFO] Parent project loaded from repository.
Downloading:
http://repo1.maven.org/maven2/my/project/${project.version}/all-${project.version}-site_en.xml
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] The site descriptor cannot be resolved from the repository: No
such file or directory
When I change to explicit version numbers in both poms everything works
fine. Obviously the site plugin has problems with resolving the property.
Any ideas?
Thanks
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Problem with property inheritance in maven site plugin
Posted by Christian Kölle <ch...@switch.ch>.
VUB Stefan Seidel wrote:
>
> ${project.version} is an internal maven property, so it is absolutely
> not a good idea to use it. So the first try should be to rename that one.
>
Hi
Obviously this was a bad example. In my real poms the variable has
another name. I changed that in the mail because i don't want to expose
internal details of our application and haven't thought about the name
very well.
So this is not the problem.
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Problem with property inheritance in maven site plugin
Posted by VUB Stefan Seidel <ss...@vub.de>.
Hi,
${project.version} is an internal maven property, so it is absolutely
not a good idea to use it. So the first try should be to rename that one.
Stefan
Christian Kölle wrote:
> Hi all
>
> I have a problem with the property inheritance in the maven site project.
>
> I have a multi-module project. The base pom looks like this:
>
> <project>
>
> <modelVersion>4.0.0</modelVersion>
> <groupId>my.project</groupId>
> <artifactId>all</artifactId>
> <packaging>pom</packaging>
> <version>${project.version}</version>
>
> <properties>
> <project.version>1.0</project.version>
> </properties>
>
> ...
> </project>
>
> The poms of the subprojects look like this:
>
> <project>
> <modelVersion>4.0.0</modelVersion>
> <parent>
> <groupId>my.project</groupId>
> <artifactId>all</artifactId>
> <version>${project.version}</version>
> <relativePath>../Build/pom.xml</relativePath>
> </parent>
> ...
> </project>
>
> This works fine for the install goal (wich use a lot of different
> plugins for special purposes) but not for the site plugin. A call to
> "mvn site" produces the following error:
>
> [INFO] [site:stage]
> Downloading:
> http://repo1.maven.org/maven2/my/project/${project.version}/all-${project.version}.pom
> [INFO] Parent project loaded from repository.
> [INFO] Parent project loaded from repository.
> Downloading:
> http://repo1.maven.org/maven2/my/project/${project.version}/all-${project.version}-site_en.xml
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] The site descriptor cannot be resolved from the repository: No
> such file or directory
>
> When I change to explicit version numbers in both poms everything works
> fine. Obviously the site plugin has problems with resolving the property.
>
> Any ideas?
>
> Thanks
> Christian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
--
best regards,
Stefan Seidel
software developer
________________________
VUB Printmedia GmbH
Chopinstraße 4
D-04103 Leipzig
Germany
tel. +49 (341) 9 60 50 07
fax. +49 (341) 9 60 50 92
mail. sseidel@vub.de
web. www.vub.de
HRB Köln 24015
UStID DE 122 649 251
GF Dr. Achim Preuss Neudorf,
Dr. Christian Preuss Neudorf
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org