You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by JeremieB <je...@gmail.com> on 2009/08/06 10:25:47 UTC

Why is maven looking for snapshot plugins ?

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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is maven looking for snapshot plugins ?

Posted by JeremieB <je...@gmail.com>.
Logs won't be necessary, I must say I feel quite stupid right now ... :/

Have a closer look at my description :

JeremieB wrote:
> 
> [...]
> 5- install corporate pom
> [...]
> 9- deleted my local repository
> [...]
> 

So, I happily deleted my local repository, including the correct corporate
pom I just installed... You understand easily the strange behaviour.
Now it works like a charm - as it always did.

Sorry for this... :( And thanks for help anyway !

-- 
View this message in context: http://www.nabble.com/Why-is-maven-looking-for-snapshot-plugins---tp24840838p24866606.html
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


RE: Why is maven looking for snapshot plugins ?

Posted by Mohan KR <km...@gmail.com>.
Can you paste the surrounding context around the log message or attach the
whole log?
Some plugins still go outside (is the log from the project-info plugin by
any chance?)

Thanks,
mohan kr

-----Original Message-----
From: JeremieB [mailto:jeremie.bousquet@gmail.com] 
Sent: Friday, August 07, 2009 7:58 AM
To: users@maven.apache.org
Subject: RE: Why is maven looking for snapshot plugins ?


Sorry if I did not precise it exhaustively, but in fact taglist 2.3 is
declared in <pluginManagement>, in <plugins>, in <dependencies>, in
<dependencyManagement> and in <reporting> sections as well... (in the
corporate pom). maven-site-plugin is declared only in <pluginManagement>
section.
I also deleted anything about this snapshot version of taglist (metadata and
jar) from my archiva managed repositories, with no change.

What I don't understand is this log :
"[DEBUG] taglist-maven-plugin: resolved to version 2.4-SNAPSHOT from
repository central"

...because this version is NOT in central repository... I really miss some
understanding on maven plugins way of working I'm afraid :(

I understand it's retrieving youngest version, but it should not as I
declared a specific version ?




mkr wrote:
> 
> You have to specify the version
> of the
> plugin in the "reporting"/"plugins" *also*, it is not enough to put the
> version in the
> "pluginManagement" or "build"/"plugins" section.
> 
> The other thing is I believe for plugins Maven is going to retrieve the
> youngest version
> (regardless of SNAPSHOT or RELEASE). cheers
> 

-- 
View this message in context:
http://www.nabble.com/Why-is-maven-looking-for-snapshot-plugins---tp24840838
p24864407.html
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


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


RE: Why is maven looking for snapshot plugins ?

Posted by JeremieB <je...@gmail.com>.
Sorry if I did not precise it exhaustively, but in fact taglist 2.3 is
declared in <pluginManagement>, in <plugins>, in <dependencies>, in
<dependencyManagement> and in <reporting> sections as well... (in the
corporate pom). maven-site-plugin is declared only in <pluginManagement>
section.
I also deleted anything about this snapshot version of taglist (metadata and
jar) from my archiva managed repositories, with no change.

What I don't understand is this log :
"[DEBUG] taglist-maven-plugin: resolved to version 2.4-SNAPSHOT from
repository central"

...because this version is NOT in central repository... I really miss some
understanding on maven plugins way of working I'm afraid :(

I understand it's retrieving youngest version, but it should not as I
declared a specific version ?




mkr wrote:
> 
> You have to specify the version
> of the
> plugin in the "reporting"/"plugins" *also*, it is not enough to put the
> version in the
> "pluginManagement" or "build"/"plugins" section.
> 
> The other thing is I believe for plugins Maven is going to retrieve the
> youngest version
> (regardless of SNAPSHOT or RELEASE). cheers
> 

-- 
View this message in context: http://www.nabble.com/Why-is-maven-looking-for-snapshot-plugins---tp24840838p24864407.html
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


RE: Why is maven looking for snapshot plugins ?

Posted by Mohan KR <km...@gmail.com>.
This has been answered a few times already. You have to specify the version
of the
plugin in the "reporting"/"plugins" *also*, it is not enough to put the
version in the
"pluginManagement" or "build"/"plugins" section.

The other thing is I believe for plugins Maven is going to retrieve the
youngest version
(regardless of SNAPSHOT or RELEASE). cheers

Thanks,
mohan kr

-----Original Message-----
From: JeremieB [mailto:jeremie.bousquet@gmail.com] 
Sent: Thursday, August 06, 2009 6:33 AM
To: users@maven.apache.org
Subject: Re: Why is maven looking for snapshot plugins ?


I think my request is not very clear, this is what I did more clearly (I
hope
so) :
1- add a managed repository for staged-releases in archiva, proxy of central
snapshots
2- add this repository in my repository group
3- declare my repository group as a pluginRepository in my corporate pom
4- change version of maven-site-plugin from 2.0-beta-7 to 2.1-SNAPSHOT in
corporate pom
5- install corporate pom
6- run "site-deploy" on a child of corporate pom --> ok
7- removed proxy connector from my staged-releases repository (to avoid non
wanted plugins to be downloaded)
8- re-run step 6 to check --> still ok
9- deleted my local repository
10- re-run step 6 --> fails and complains about taglist-maven-plugin not
finding 2.4-SNAPSHOT version, while 2.3 is specified eveywhere
-- 
View this message in context:
http://www.nabble.com/Why-is-maven-looking-for-snapshot-plugins---tp24840838
p24844830.html
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


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


Re: Why is maven looking for snapshot plugins ?

Posted by JeremieB <je...@gmail.com>.
I think my request is not very clear, this is what I did more clearly (I hope
so) :
1- add a managed repository for staged-releases in archiva, proxy of central
snapshots
2- add this repository in my repository group
3- declare my repository group as a pluginRepository in my corporate pom
4- change version of maven-site-plugin from 2.0-beta-7 to 2.1-SNAPSHOT in
corporate pom
5- install corporate pom
6- run "site-deploy" on a child of corporate pom --> ok
7- removed proxy connector from my staged-releases repository (to avoid non
wanted plugins to be downloaded)
8- re-run step 6 to check --> still ok
9- deleted my local repository
10- re-run step 6 --> fails and complains about taglist-maven-plugin not
finding 2.4-SNAPSHOT version, while 2.3 is specified eveywhere
-- 
View this message in context: http://www.nabble.com/Why-is-maven-looking-for-snapshot-plugins---tp24840838p24844830.html
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