You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mario Matias Urbieta <ma...@fluxit.com.ar> on 2011/05/03 14:18:25 UTC

Problem resolving snapshot version of plugin thru a Mirror

   Hi, i have been facing a problem when resolving snaphot version of 
plugin thru a mirror. It works well when there is no mirror.
  I have configured in my setting.xml repositories pointing out our 
Artifactory server and also a mirror pointing out to the same server to 
capture any request.
In my case, i downloaded the latest version of maven-archetype-plugin 
(2.1-SNAPSHOT) from the svn's trunk. Then i deployed it in our 
artifactory server and ,finally, i deleted my whole local repo. Next, 
when running "mvn archetype:generate", Maven tries to resolve latest 
version of the plugin , in this case snapshot, throwing the following error:

/Reason: Error getting POM for 
'org.apache.maven.plugins:maven-archetype-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.apache.maven.plugins:maven-archetype-plugin:pom:2.1-SNAPSHOT
/
Both plugin's and snapshot's maven-metadata  are ok:

*org/apache/maven/plugins/maven-archetype-plugin/maven-metadata.xml*

<metadata>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-archetype-plugin</artifactId>
   <version>2.1-SNAPSHOT</version>
   <versioning>
     <latest>2.1-SNAPSHOT</latest>
     <release>2.0</release>

     <versions>
       <version>1.0-alpha-3</version>
       <version>1.0-alpha-4</version>
       <version>1.0-alpha-7</version>
       <version>2.0-alpha-1</version>
       <version>2.0-alpha-2</version>

       <version>2.0-alpha-3</version>
       <version>2.0-alpha-4</version>
       <version>2.0-alpha-5</version>
       <version>2.0</version>
       <version>2.1-SNAPSHOT</version>
     </versions>

     <lastUpdated>20110420113107</lastUpdated>
   </versioning>
</metadata>


*org/apache/maven/plugins/maven-archetype-plugin/2.1-SNAPSHOT/maven-metadata.xml*

<metadata>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-archetype-plugin</artifactId>
   <version>2.1-SNAPSHOT</version>
   <versioning>
     <snapshot>
       <timestamp>20110420.112731</timestamp>

       <buildNumber>1</buildNumber>
     </snapshot>
     <lastUpdated>20110420111844</lastUpdated>
   </versioning>
</metadata>


After debuging Maven I noticed that even having the mirror defined, 
SNAPSTHOP version of plugins always were resolved agains Maven`s central 
repository (repo1.apache.org). So we found a workaround  overriding 
central and snapshot repositories in the setting xml. After that, it worked.

is this an expected behavior?
Thanks


Re: Problem resolving snapshot version of plugin thru a Mirror

Posted by Brian Fox <br...@infinity.nu>.
>
> After debuging Maven I noticed that even having the mirror defined,
> SNAPSTHOP version of plugins always were resolved agains Maven`s central
> repository (repo1.apache.org). So we found a workaround  overriding central
> and snapshot repositories in the setting xml. After that, it worked.
>
> is this an expected behavior?
> Thanks

You need to tell Maven where the repos are, both for releases and for
snapshots, and for plugin releases and snapshots. It sounds like you
may have been missing one of those.

>
>

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


Re: Problem resolving snapshot version of plugin thru a Mirror

Posted by lukechiam <lu...@webesse.com>.
My solution was to change the latest node

  <versioning>
    <latest>2.0</latest>
    <release>2.0</release>
    <versions>

--
View this message in context: http://maven.40175.n5.nabble.com/Problem-resolving-snapshot-version-of-plugin-thru-a-Mirror-tp4367106p4402415.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