Author: brianf Date: Tue Apr 24 19:45:50 2007 New Revision: 532175 URL: http://svn.apache.org/viewvc?view=rev&rev=532175 Log: workarounds for MNG-2961
Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeDepMgt.java maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeMojo.java Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeDepMgt.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeDepMgt.java?view=diff&rev=532175&r1=532174&r2=532175 ============================================================================== --- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeDepMgt.java (original) +++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeDepMgt.java Tue Apr 24 19:45:50 2007 @@ -276,8 +276,10 @@ { ArtifactVersion artifactVersion = new DefaultArtifactVersion( dependencyArtifact.getVersion() ); - if ( !dependencyArtifact.isSnapshot() - && !depFromDepMgt.getVersion().equals( dependencyArtifact.getVersion() ) ) + //workaround for MNG-2961 + dependencyArtifact.isSnapshot(); + + if (!depFromDepMgt.getVersion().equals( dependencyArtifact.getBaseVersion()) ) { mismatchMap.put( dependencyArtifact, depFromDepMgt ); } @@ -307,7 +309,7 @@ getLog().info( "\tDependency: " + StringUtils.stripEnd(dependencyFromDepMgt.getManagementKey(),":") ); getLog().info( "\t\tDepMgt : " + dependencyFromDepMgt.getVersion() ); - getLog().info( "\t\tResolved: " + dependencyArtifact.getVersion() ); + getLog().info( "\t\tResolved: " + dependencyArtifact.getBaseVersion() ); } /** Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeMojo.java?view=diff&rev=532175&r1=532174&r2=532175 ============================================================================== --- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeMojo.java (original) +++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeMojo.java Tue Apr 24 19:45:50 2007 @@ -237,6 +237,10 @@ for ( Iterator iterator = artifacts.iterator(); iterator.hasNext(); ) { Artifact artifact = (Artifact) iterator.next(); + + //called because artifact will set the version to -SNAPSHOT only if I do this. MNG-2961 + artifact.isSnapshot(); + if ( warn ) { getLog().warn( " " + artifact ); @@ -264,6 +268,9 @@ { Artifact artifact = (Artifact) iter.next(); + //called because artifact will set the version to -SNAPSHOT only if I do this. MNG-2961 + artifact.isSnapshot(); + writer.startElement( "dependency" ); writer.startElement( "groupId" ); writer.writeText( artifact.getGroupId() ); @@ -299,8 +306,8 @@ while ( iter.hasNext() ) { Artifact artifact = (Artifact) iter.next(); - - //called because artifact will set the version to -SNAPSHOT only if I do this. + + //called because artifact will set the version to -SNAPSHOT only if I do this. MNG-2961 artifact.isSnapshot(); buf.append( scriptableFlag+":"+pomFile+":"+artifact.getDependencyConflictId()+":"+artifact.getClassifier()+":"+artifact.getBaseVersion()+":"+artifact.getScope()+"\n");