You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Richard Eggert <ri...@gmail.com> on 2012/04/23 19:06:28 UTC

Unresolveable build extension (wagon-ssh) when executing site:site on multi-module project

Greetings,

I have found what appears to be a bug in the maven-site-plugin (or
some component upon which it depends) that is causing it to fail if a
build extension cannot be resolved against "central" when executing
site:site on a multi-module project.


My setup is as follows:

I am working on a development network that is not connected to the
Internet.  Within that network, we have a Sonatype Nexus server
running and providing various Maven repositories as well as proxying
other Nexus servers within the network.

I have configured (in my $HOME/.m2/settings.xml file) an active
profile that refers to various repositories and pluginRepositories
that are provided by the Nexus server.  I have configured different
updatePolicy entries for each repository (set to "always" for
repositories hosting artifacts that we developed, and "daily" for
repositories hosting third-party artifacts), which is why I have
configured separate entries for them rather than lumping them in as a
single repository "group" in Nexus.  Additionally, in order to ensure
that Maven always uses the repository configurations (with appropriate
update policies) from the active profile, I have configured a "mirror"
entry for the "central" repository that points to a repository that
will always be empty (which I've named "bitbucket"), ensuring that
Maven always needs to fall back on the configured repositories.

The (external to the build tree) parent of the top-level POM
configures org.apache.maven.wagon:wagon-ssh:1.0 as a build extension.
I have confirmed that this artifact exists both in the configured
remote repositories as well as in my local repository.  Additionally,
several of the child module POM's make use of the
org.apache.felix:maven-bundle-plugin and packaging type "bundle".
I've also confirmed that plexus-utils and maven-bundle-plugin exist in
both the remote repositories and in my local repository.


This works fine for the clean/compile/package/deploy stages.  However,
when I try to build the site stage (or the site:site goal
specifically), it fails with the following error:

Failed to execute goal
org.apache.maven.plugins:maven-site-plugin:3.0:site (default-cli) on
project parent: SiteToolException: Unable to read local module-POM: 2
problems were encountered while building the effective model for
my-group-id:child-module-id:1.2.3-SNAPSHOT
Unresolveable build extension: Plugin
org.apache.maven.wagon:wagon-ssh:1.0 or one of its dependencies could
not be resolved: The following artifacts could not be resolved:
org.apache.maven.wagon:wagon-ssh:jar:1.0,
org.codehaus.plexus:plexus-utils:jar:1.1: Could not find artifact
org.apache.maven.wagon:wagon-ssh:jar:1.0 in bitbucket (http://....)
Unknown packaging: bundle @ line 6, column 13

Analysis of the debugging output seems to indicate that Maven sees the
artifacts in the local repository and acknowledges that they are up to
date (saying that it will skip the remote update), but then tries to
download from the central mirror ("bitbucket") anyway.  Since they
don't exist in that repository, the build fails.

Note that this appears to be happening while maven-site-plugin is
attempting to assemble the child module project models in order to
create links between the parent and child sites.  For some reason, it
insists on resolving build extensions against "central", even though
they are already in the local repository (and also available in remote
repositories configured in the active profile).  None of the other
plugins (maven-assembly-plugin, maven-deploy-plugin, etc.) seem to
have any problem with this configuration.

Am I overlooking something here, or is this a bug?

Note that I can provide a set of sample POM's that reproduce the
problem when I get home tonight if needed.  I am unable to install
Maven on my Internet-connected machine at work.

-- 
Rich Eggert

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org