You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Casey Butterworth (JIRA)" <ji...@codehaus.org> on 2007/08/09 01:33:13 UTC

[jira] Commented: (MNG-3142) Some Built in Maven plugins fail when central and apache.snapshots both defined as pluginRepositories

    [ http://jira.codehaus.org/browse/MNG-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_104345 ] 

Casey Butterworth commented on MNG-3142:
----------------------------------------

More detail:

The actual error that is occurring is a NoClassDefFoundError when attempting to run the plugin (e.g. mvn clean). This is occurring because when attempting to retrieve the POM for the plugin, Maven reported a "Artifact not found - using stub model: Unable to locate resource in repository" error (even though the POM is available - just not in the repo that Maven attempted to retrieve it from).

Interestingly Maven does proceed to retrieve the JAR for the plugin from the correct repo, but when it attempts to execute the plugin there are missing dependencies (as the pom was not retrieved) hence the NoClassDefFoundError.

> Some Built in Maven plugins fail when central and apache.snapshots both defined as pluginRepositories
> -----------------------------------------------------------------------------------------------------
>
>                 Key: MNG-3142
>                 URL: http://jira.codehaus.org/browse/MNG-3142
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Artifacts and Repositories, Dependencies, Plugins and Lifecycle, Settings
>    Affects Versions: 2.0.6, 2.0.7
>            Reporter: Casey Butterworth
>         Attachments: pom.xml
>
>
> A pom file with both central and apache.snapshots defined (see attached pom.xml) causes errors in usages of a number of the default plugins including CLEAN and COMPILE (i'm sure that there are others as well). The bug can be reproduced by adding the following to your pom.xml:
> 	<pluginRepositories>
> 		<pluginRepository>
>             <id>central</id>
> 			<url>http://repo1.maven.org/maven2</url>
> 		</pluginRepository>
> 		<pluginRepository>
>             <id>apache.snapshot</id>
> 			<url>http://people.apache.org/maven-snapshot-repository</url>
> 		</pluginRepository>
> 	</pluginRepositories>
> This is caused by the bug described in MNG-2098. As these plugins are not assigned explicit versions in the parent pom, the LATEST version processing is used and failing as described in MNG-2098. Within our project we can avoid the problem by using an explicit version (e.g.)
> 	<build>
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-clean-plugin</artifactId>
> 				<version>2.1.1</version>
> 			</plugin>
> 		</plugins>
> 	</build>
> This bug would occur for any plugin (which has dependencies) that has different versions available in different repositories (e.g. releases in one repo and snapshots in another) and is proving frustrating for our Maven users.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira