Hello all, sorry to bump ... :-( but I'm still having issues understanding what's wrong with the maven dependency plugin and maven 3... I attached a pom to demonstrate the problem : Using maven 3, 1) do a mvn package 2) then do a mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:purge-local-repository -Dverbose=true -DresolutionFuzziness=version -U
You will see the following output : [INFO] --- maven-dependency-plugin:2.4:purge-local-repository (default-cli) @ pof --- [WARNING] Missing POM for javax.servlet:servlet-api:jar:2.5 [INFO] Skipping: pof. It cannot be resolved. [INFO] Nothing to do for project: net.dahanne:pof:jar:1.0.0-SNAPSHOT But I can tell you javax.servlet:servlet-api:jar:2.5 has a pom, and is already installed in the local maven repository. Could you guys share some light on this ? I think the maven dependency plugin is not working fine with maven 3 , as opposed to what the documentation says : https://cwiki.apache.org/MAVEN/maven-3x-plugin-compatibility-matrix.html Thanks, Anthony ---------- Forwarded message ---------- From: Anthony Dahanne <anthony.daha...@gmail.com> Date: Thu, May 31, 2012 at 5:50 PM Subject: maven dependency plugin and maven 3 To: users@maven.apache.org Hello all, I'm only using maven 3 on my machine (be it command line or m2e). I tried to use the maven dependency plugin on a project, mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:purge-local-repository -Dverbose=true -DresolutionFuzziness=version and it printed such warnings : [WARNING] Missing POM for javax.servlet:servlet-api:jar:2.5 [WARNING] Missing POM for org.easymock:easymock:jar:3.0 [WARNING] Missing POM for junit:junit:jar:4.8.2 before telling me that the build was successful. Thing is, it did not purge anything from my repo; because of those warnings actually; launching the same command with -X, I could see : [DEBUG] Verifying availability of /Users/anthony/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.pom from [] [WARNING] Missing POM for javax.servlet:servlet-api:jar:2.5: Error resolving project artifact: Could not find artifact javax.servlet:servlet-api:pom:2.5 for project javax.servlet:servlet-api:pom:2.5 [DEBUG] javax.servlet:servlet-api:jar:2.5:provided (selected for provided) and... I can tell you /Users/anthony/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.pom exists and contains : <project> <modelVersion>4.0.0</modelVersion> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> </project> Debugging the code a little, I could notice that this goal was using org.apache.maven.artifact.resolver.DefaultArtifactResolver#resolveTransitively from maven-artifact-manager 2.0.9 to find the dependencies. I am wondering if this plugin failed purging my dependencies because it used a maven 2 library to scan the dependencies, and my local repo has only been built and used by mvn3 (and the repo metadata/layout could be different to what this plugin was expecting) .. Any thoughts ? thanks a lot in advance Anthony
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>net.dahanne</groupId> <artifactId>pof</artifactId> <version>1.0.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>net.dahanne.gallery</groupId> <artifactId>commons-gallery</artifactId> <version>2.1.0-SNAPSHOT</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> </dependency> </dependencies> <repositories> <repository> <id>dahanne-snapshots</id> <url>http://nexus.dahanne.net/nexus/content/repositories/snapshots/</url> </repository> <repository> <id>dahanne-releases</id> <url>http://nexus.dahanne.net/nexus/content/repositories/releases/</url> </repository> </repositories> </project>
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org