maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r762369 - /maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java
Date Mon, 06 Apr 2009 14:55:44 GMT
Author: jvanzyl
Date: Mon Apr  6 14:55:44 2009
New Revision: 762369

URL: http://svn.apache.org/viewvc?rev=762369&view=rev
Log:
MRRESOURCES-35: ClassCastException using RELEASE versions
Submitted by: Christian Schulte

Modified:
    maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java

Modified: maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java?rev=762369&r1=762368&r2=762369&view=diff
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java
(original)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java
Mon Apr  6 14:55:44 2009
@@ -486,7 +486,7 @@
             Artifact artifact = (Artifact) it.next();
             try
             {
-                List remoteRepo = repositories;
+                List remoteRepo = null;
                 if ( artifact.isSnapshot() )
                 {
                     VersionRange rng = VersionRange.createFromVersion( artifact.getBaseVersion()
);
@@ -497,6 +497,14 @@
                                                                          artifact.isOptional()
);
                     remoteRepo = remoteArtifactRepositories;
                 }
+                else
+                {
+                    remoteRepo =
+                        ProjectUtils.buildArtifactRepositories( repositories,
+                                                                artifactRepositoryFactory,
+                                                                mavenSession.getContainer()
);
+
+                }
 
                 getLog().debug( "Building project for " + artifact );
                 MavenProject p = null;
@@ -535,6 +543,10 @@
                 // TODO Auto-generated catch block
                 e.printStackTrace();
             }
+            catch ( InvalidRepositoryException e )
+            {
+                throw new MojoExecutionException( e.getMessage(), e );
+            }
         }
         Collections.sort( projects, new ProjectComparator() );
         return projects;



Mime
View raw message