Well, I never saw a response to this, and finally got tired of the missing 'parent' links in maven generated sites.

At some point, it appears the maven-site-plugin stopped using the parent projects URL, and instead looks for the parent projects distributionManagement -> site -> url to determine if the parent project is reachable during site generation.

So...to answer my own question: My workaround was to define a distMgt->site-url tag in the parent pom.

Due to the way m-s-p tries to inherit the parent value of this URL and then append it's own artifactId (which works if your parent is located above you - was more viable in a svn world, not so true in a git world anymore), I also have to re-define the distMgt->site->url again in each of my child poms to ensure the child site's value is correct.

Hope this might help anyone else who is wondering how to fix the message:
[WARNING] Unable to find a URL to the parent project. The parent menu will NOT be added.

(My original post was about a build problem, but the missing parent link was also annoying...)

Dan

On 12/12/2012 11:11 PM, Dan Rollo wrote:
Hi,

I'm seeing something I can't figure out, and wondering if this is a
known issue.

I have a multi-module maven project, which has as its parent a shared
corporate pom (in a totally different source bank location). I can build
this project successfully via "mvn package".

However, when I try to run the site goal, I get strange errors:

[INFO] Parent project loaded from repository: xxx:pom-parent:pom:1.0.1
...
[WARNING] Unable to find a URL to the parent project. The parent menu
will NOT be added.
Downloading:
http://xxx:8080/archiva/repository/cache-central/xxx/pom-parent/1.0.1/pom-parent-1.0.1.pom

mojoFailed org.apache.maven.plugins:maven-site-plugin:3.2(default-site)

and after that message, the build fails.


Just in case, I verified the parent poms site descriptor is available
both in our shared repo, and was downloaded to the local repo.


It as if the site plugin can't find the parent pom. Here's a another
error message:

Unable to read local module-POM
cause : SiteToolException: Unable to read local module-POM


Odder still, the "site" goal used to work fine. This problem just
started happening after I released a new version of the parent pom, and
updated the project to use the new released parent.

Thanks,
Dan


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

Reply via email to