You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by cs...@apache.org on 2011/02/25 19:55:46 UTC
svn commit: r1074665 - in
/maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/creator:
JarFileContentsIndexCreator.java MavenArchetypeArtifactInfoIndexCreator.java
Author: cstamas
Date: Fri Feb 25 18:55:46 2011
New Revision: 1074665
URL: http://svn.apache.org/viewvc?rev=1074665&view=rev
Log:
Be smarter with (blindly) opening a JAR.
Modified:
maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/creator/JarFileContentsIndexCreator.java
maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/creator/MavenArchetypeArtifactInfoIndexCreator.java
Modified: maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/creator/JarFileContentsIndexCreator.java
URL: http://svn.apache.org/viewvc/maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/creator/JarFileContentsIndexCreator.java?rev=1074665&r1=1074664&r2=1074665&view=diff
==============================================================================
--- maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/creator/JarFileContentsIndexCreator.java (original)
+++ maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/creator/JarFileContentsIndexCreator.java Fri Feb 25 18:55:46 2011
@@ -66,7 +66,7 @@ public class JarFileContentsIndexCreator
File artifactFile = artifactContext.getArtifact();
- if ( artifactFile != null && artifactFile.exists() && artifactFile.getName().endsWith( ".jar" ) )
+ if ( artifactFile != null && artifactFile.isFile() && artifactFile.getName().endsWith( ".jar" ) )
{
updateArtifactInfo( ai, artifactFile );
}
Modified: maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/creator/MavenArchetypeArtifactInfoIndexCreator.java
URL: http://svn.apache.org/viewvc/maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/creator/MavenArchetypeArtifactInfoIndexCreator.java?rev=1074665&r1=1074664&r2=1074665&view=diff
==============================================================================
--- maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/creator/MavenArchetypeArtifactInfoIndexCreator.java (original)
+++ maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/creator/MavenArchetypeArtifactInfoIndexCreator.java Fri Feb 25 18:55:46 2011
@@ -58,7 +58,7 @@ public class MavenArchetypeArtifactInfoI
ArtifactInfo ai = ac.getArtifactInfo();
// we need the file to perform these checks, and those may be only JARs
- if ( artifact != null && !MAVEN_ARCHETYPE_PACKAGING.equals( ai.packaging )
+ if ( artifact != null && artifact.isFile() && !MAVEN_ARCHETYPE_PACKAGING.equals( ai.packaging )
&& artifact.getName().endsWith( ".jar" ) )
{
// TODO: recheck, is the following true? "Maven plugins and Maven Archetypes can be only JARs?"