continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From batkin...@apache.org
Subject svn commit: r1661831 - /continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DataManagementCli.java
Date Tue, 24 Feb 2015 02:15:50 GMT
Author: batkinson
Date: Tue Feb 24 02:15:49 2015
New Revision: 1661831

URL: http://svn.apache.org/r1661831
Log:
[CONTINUUM-2558] Data management tool fails with ZipException when reading a pom file

Modified:
    continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DataManagementCli.java

Modified: continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DataManagementCli.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DataManagementCli.java?rev=1661831&r1=1661830&r2=1661831&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DataManagementCli.java
(original)
+++ continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DataManagementCli.java
Tue Feb 24 02:15:49 2015
@@ -40,6 +40,7 @@ import org.apache.maven.artifact.resolve
 import org.apache.maven.artifact.resolver.ResolutionListener;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
 import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter;
+import org.apache.maven.artifact.resolver.filter.TypeArtifactFilter;
 import org.apache.maven.continuum.management.util.PlexusFileSystemXmlApplicationContext;
 import org.apache.maven.settings.MavenSettingsBuilder;
 import org.apache.maven.settings.Mirror;
@@ -227,6 +228,16 @@ public class DataManagementCli
                                             setting ) );
         artifacts.addAll( downloadArtifact( container, "jpox", "jpox", databaseFormat.getJpoxVersion(),
setting ) );
 
+        // Filter the list so we only use jars
+        TypeArtifactFilter jarFilter = new TypeArtifactFilter( "jar" );
+        for ( Iterator<Artifact> iter = artifacts.iterator(); iter.hasNext(); iter.next()
)
+        {
+            if ( !jarFilter.include( iter.next() ) )
+            {
+                iter.remove();
+            }
+        }
+
         List<String> jars = new ArrayList<String>();
 
         // Little hack to make it work more nicely in the IDE



Mime
View raw message