Hi,
I want to build and site-deploy a project, using maven-site-plugin
2.1-SNAPSHOT (in order to be able to manage permissions correctly through
its configuration).
I have a corporate parent pom, in which I declare maven-site-plugin
2.1-SNAPSHOT, as well as my reporting plugins and their dependencies (pmd,
taglist, jxr...). If I let maven decide for these versions, site:site will
fail with NPE, while with site plugin 2.0-beta-7 it worked well.
So I fixed all versions to what was used with maven-site-plugin 2.0-beta-7
and it works. When I install my corporate pom, all dependencies are
downloaded in correct versions, and when I site-deploy a child everything is
ok.
Now if at this stage I delete my local repository and try to site-deploy a
child (what users will do), maven will complain about missing
taglist-maven-plugin version 2.4-SNAPSHOT, though in corporate pom parent I
specified to use 2.3 (in plugins, pluginManagement and reporting sections).
I really do not understand why maven bothers with this snapshot version
instead of using the one specified ? I believe it should work if I add a
plugin section listing maven-site-plugin in the child, but I don't want to
have to update the childs in the field (and I don't believe I should).
If I re-deploy the corporate parent pom, correct plugins versions are
downloaded, and then later used by childs (who do not complain about
taglist-maven-plugin anymore).
Note : to be able to build against snapshot site plugin, I added the
following to my corporate pom (it points to an archiva repository proxy-ing
apache snapshots), and tried to set updatePolicies to never to avoid maven
looking for snapshot of other plugins (with no success) :
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<updatePolicy>never</updatePolicy>
<enabled>true</enabled>
</snapshots>
<id>plugin-snapshots</id>
<url>http://varsovie:8080/archiva/repository/plugins-staged-releases</url>
</pluginRepository>
Note2 : in fact chain of inheritance is "corp pom" --> "parent pom" -->
"child pom", but "parent pom" does not define anything about plugins.
Following is an extract of debug logs for "mvn clean install site-deploy -X
-e" on one of the childs :
[DEBUG] Connecting to repository: 'GGS repository' with url:
'http://varsovie:8080/archiva/repository/GGS'.
[DEBUG] taglist-maven-plugin: resolved to version 2.4-SNAPSHOT from
repository central
[DEBUG] Skipping disabled repository central
[DEBUG] taglist-maven-plugin: using locally installed snapshot
[DEBUG] Skipping disabled repository central
[DEBUG] Using mirror: http://varsovie:8080/archiva/repository/GGS (id: GGS
repository)
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.codehaus.mojo:taglist-maven-plugin
Reason: Error getting POM for 'org.codehaus.mojo:taglist-maven-plugin' from
the repository: Failed to resolve artifact, possibly due to a repository
list that is not appropriately equipped for this artifact's metadata.
org.codehaus.mojo:taglist-maven-plugin:pom:2.4-SNAPSHOT
--
View this message in context:
http://www.nabble.com/Why-is-maven-looking-for-snapshot-plugins---tp24840838p24840838.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]