You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2007/07/02 06:51:00 UTC
svn commit: r552400 [2/2] - in /maven:
plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/
plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/
pl...
Modified: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/ManifestExposer.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/ManifestExposer.java?view=diff&rev=552400&r1=552399&r2=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/ManifestExposer.java (original)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/ManifestExposer.java Sun Jul 1 21:50:57 2007
@@ -19,38 +19,29 @@
* under the License.
*/
-import org.apache.maven.shared.jar.identification.AbstractJarIdentificationExposer;
+import org.apache.maven.shared.jar.JarAnalyzer;
+import org.apache.maven.shared.jar.identification.JarIdentification;
+import org.apache.maven.shared.jar.identification.JarIdentificationExposer;
import java.util.Iterator;
import java.util.Map;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
-
/**
- * JarAnalyzer Taxon Exposer for the Manifest.mf contents.
+ * Exposer that examines a JAR's manifest to derive Maven metadata.
*
* @plexus.component role="org.apache.maven.shared.jar.identification.JarIdentificationExposer" role-hint="manifest"
*/
public class ManifestExposer
- extends AbstractJarIdentificationExposer
+ implements JarIdentificationExposer
{
- public String getExposerName()
- {
- return "Manifest.mf";
- }
-
- public boolean isAuthoritative()
- {
- return false;
- }
-
- public void expose()
+ public void expose( JarIdentification identification, JarAnalyzer jarAnalyzer )
{
- Manifest manifest = getJar().getManifest();
+ Manifest manifest = jarAnalyzer.getJarData().getManifest();
if ( manifest != null )
{
- addManifestAttributeValues( manifest.getMainAttributes() );
+ addManifestAttributeValues( manifest.getMainAttributes(), identification );
Map entries = manifest.getEntries();
Iterator itentries = entries.entrySet().iterator();
@@ -59,21 +50,21 @@
Map.Entry entry = (Map.Entry) itentries.next();
Attributes attribs = (Attributes) entry.getValue();
- addManifestAttributeValues( attribs );
+ addManifestAttributeValues( attribs, identification );
}
}
}
- private void addManifestAttributeValues( Attributes attribs )
+ private void addManifestAttributeValues( Attributes attribs, JarIdentification identification )
{
- addName( attribs.getValue( Attributes.Name.IMPLEMENTATION_TITLE ) );
- addVersion( attribs.getValue( Attributes.Name.IMPLEMENTATION_VERSION ) );
- addVendor( attribs.getValue( Attributes.Name.IMPLEMENTATION_VENDOR ) );
-
- addName( attribs.getValue( Attributes.Name.SPECIFICATION_TITLE ) );
- addVersion( attribs.getValue( Attributes.Name.SPECIFICATION_VERSION ) );
- addVendor( attribs.getValue( Attributes.Name.SPECIFICATION_VENDOR ) );
+ identification.addName( attribs.getValue( Attributes.Name.IMPLEMENTATION_TITLE ) );
+ identification.addVersion( attribs.getValue( Attributes.Name.IMPLEMENTATION_VERSION ) );
+ identification.addVendor( attribs.getValue( Attributes.Name.IMPLEMENTATION_VENDOR ) );
+
+ identification.addName( attribs.getValue( Attributes.Name.SPECIFICATION_TITLE ) );
+ identification.addVersion( attribs.getValue( Attributes.Name.SPECIFICATION_VERSION ) );
+ identification.addVendor( attribs.getValue( Attributes.Name.SPECIFICATION_VENDOR ) );
- addGroupId( attribs.getValue( Attributes.Name.EXTENSION_NAME ) );
+ identification.addGroupId( attribs.getValue( Attributes.Name.EXTENSION_NAME ) );
}
}
Modified: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/RepositorySearchExposer.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/RepositorySearchExposer.java?view=diff&rev=552400&r1=552399&r2=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/RepositorySearchExposer.java (original)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/RepositorySearchExposer.java Sun Jul 1 21:50:57 2007
@@ -20,67 +20,70 @@
*/
import org.apache.maven.artifact.Artifact;
-import org.apache.maven.shared.jar.identification.AbstractJarIdentificationExposer;
-import org.apache.maven.shared.jar.identification.RepositoryHashSearch;
-import org.codehaus.plexus.digest.Digester;
-import org.codehaus.plexus.digest.StreamingDigester;
+import org.apache.maven.shared.jar.JarAnalyzer;
+import org.apache.maven.shared.jar.identification.JarIdentification;
+import org.apache.maven.shared.jar.identification.JarIdentificationExposer;
+import org.apache.maven.shared.jar.identification.hash.JarHashAnalyzer;
+import org.apache.maven.shared.jar.identification.repository.RepositoryHashSearch;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
- * JarAnalyzer Taxon Exposer for the hashcode hits within a repository.
+ * Exposer that examines a Maven repository for identical files to the JAR being analyzed. It will look for both
+ * identical files, and files with identical classes.
+ * <p/>
+ * Note: if not using Plexus, you must call the following methods to be able to expose any data from the class:
+ * {@link #setBytecodeHashAnalyzer(org.apache.maven.shared.jar.identification.hash.JarHashAnalyzer)},
+ * {@link #setFileHashAnalyzer(org.apache.maven.shared.jar.identification.hash.JarHashAnalyzer)},
+ * {@link #setRepositoryHashSearch(org.apache.maven.shared.jar.identification.repository.RepositoryHashSearch)}
*
* @plexus.component role="org.apache.maven.shared.jar.identification.JarIdentificationExposer" role-hint="repositorySearch"
*/
public class RepositorySearchExposer
- extends AbstractJarIdentificationExposer
+ extends AbstractLogEnabled
+ implements JarIdentificationExposer
{
/**
- * @plexus.requirement role-hint="sha1"
- * @noinspection UnusedDeclaration
+ * The repository searcher to use.
+ *
+ * @plexus.requirement
+ * @todo this currently only provides for the 'empty' repository search, which isn't very useful
*/
- private Digester digester;
+ private RepositoryHashSearch repositoryHashSearch;
/**
- * @plexus.requirement role-hint="sha1"
- * @noinspection UnusedDeclaration
+ * The hash analyzer for the entire file.
+ *
+ * @plexus.requirement role-hint="file"
*/
- private StreamingDigester streamingDigester;
+ private JarHashAnalyzer fileHashAnalyzer;
/**
- * @plexus.requirement
+ * The hash analyzer for the file's bytecode.
+ *
+ * @plexus.requirement role-hint="bytecode"
*/
- private RepositoryHashSearch repositoryHashSearch;
+ private JarHashAnalyzer bytecodeHashAnalyzer;
- public String getExposerName()
+ public void expose( JarIdentification identification, JarAnalyzer jarAnalyzer )
{
- return "Repository Hashcode Hit";
- }
-
- public boolean isAuthoritative()
- {
- return true;
- }
+ List repohits = new ArrayList();
- public RepositoryHashSearch getRepositoryHashSearch()
- {
- return repositoryHashSearch;
- }
+ String hash = fileHashAnalyzer.computeHash( jarAnalyzer );
+ if ( hash != null )
+ {
+ repohits.addAll( repositoryHashSearch.searchFileHash( hash ) );
+ }
- public void setRepositoryHashSearch( RepositoryHashSearch repo )
- {
- this.repositoryHashSearch = repo;
- }
+ String bytecodehash = bytecodeHashAnalyzer.computeHash( jarAnalyzer );
+ if ( bytecodehash != null )
+ {
+ repohits.addAll( repositoryHashSearch.searchBytecodeHash( bytecodehash ) );
+ }
- public void expose()
- {
- String hash = getJar().computeFileHash( digester );
- String bytecodehash = getJar().computeBytecodeHash( streamingDigester );
- List repohits = new ArrayList();
- repohits.addAll( repositoryHashSearch.searchFileHash( hash ) );
- repohits.addAll( repositoryHashSearch.searchBytecodeHash( bytecodehash ) );
if ( !repohits.isEmpty() )
{
// Found hits in the repository.
@@ -88,10 +91,25 @@
while ( it.hasNext() )
{
Artifact artifact = (Artifact) it.next();
- addGroupId( artifact.getGroupId() );
- addArtifactId( artifact.getArtifactId() );
- addVersion( artifact.getVersion() );
+ identification.addAndSetGroupId( artifact.getGroupId() );
+ identification.addAndSetArtifactId( artifact.getArtifactId() );
+ identification.addAndSetVersion( artifact.getVersion() );
}
}
+ }
+
+ public void setRepositoryHashSearch( RepositoryHashSearch repo )
+ {
+ this.repositoryHashSearch = repo;
+ }
+
+ public void setFileHashAnalyzer( JarHashAnalyzer fileHashAnalyzer )
+ {
+ this.fileHashAnalyzer = fileHashAnalyzer;
+ }
+
+ public void setBytecodeHashAnalyzer( JarHashAnalyzer bytecodeHashAnalyzer )
+ {
+ this.bytecodeHashAnalyzer = bytecodeHashAnalyzer;
}
}
Modified: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/StaticMainOutputExposer.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/StaticMainOutputExposer.java?view=diff&rev=552400&r1=552399&r2=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/StaticMainOutputExposer.java (original)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/StaticMainOutputExposer.java Sun Jul 1 21:50:57 2007
@@ -19,32 +19,25 @@
* under the License.
*/
-import org.apache.maven.shared.jar.identification.AbstractJarIdentificationExposer;
+import org.apache.maven.shared.jar.JarAnalyzer;
+import org.apache.maven.shared.jar.identification.JarIdentification;
+import org.apache.maven.shared.jar.identification.JarIdentificationExposer;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-
/**
- * JarAnalyzer Taxon Exposer - Static Main Class Output
+ * Exposer that examines a a JAR for classes that have <code>Version</code> in the name and calls their
+ * <code>main</code> method if it exists to obtain the version.
*
+ * @todo not currently implemented
* @plexus.component role="org.apache.maven.shared.jar.identification.JarIdentificationExposer" role-hint="staticMainOutput"
*/
public class StaticMainOutputExposer
- extends AbstractJarIdentificationExposer
+ implements JarIdentificationExposer
{
- public String getExposerName()
- {
- return "Static Main Output";
- }
-
- public boolean isAuthoritative()
- {
- return false;
- }
-
- public void expose()
+ public void expose( JarIdentification identification, JarAnalyzer jarAnalyzer )
{
List staticMains = findStaticMainVersions();
if ( !staticMains.isEmpty() )
@@ -53,7 +46,7 @@
while ( itvers.hasNext() )
{
String ver = (String) itvers.next();
- addVersion( ver );
+ identification.addVersion( ver );
}
}
}
Modified: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/TextFileExposer.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/TextFileExposer.java?view=diff&rev=552400&r1=552399&r2=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/TextFileExposer.java (original)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/TextFileExposer.java Sun Jul 1 21:50:57 2007
@@ -19,7 +19,11 @@
* under the License.
*/
-import org.apache.maven.shared.jar.identification.AbstractJarIdentificationExposer;
+import org.apache.maven.shared.jar.JarAnalyzer;
+import org.apache.maven.shared.jar.identification.JarIdentification;
+import org.apache.maven.shared.jar.identification.JarIdentificationExposer;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
import java.io.BufferedReader;
@@ -33,41 +37,33 @@
/**
- * JarAnalyzer Taxon Exposer based on Text File contents.
+ * Exposer that examines a a JAR for files that contain the text <code>version</code> (case-insensitive) and
+ * adds the contents as potential version(s).
*
* @plexus.component role="org.apache.maven.shared.jar.identification.JarIdentificationExposer" role-hint="textFile"
*/
public class TextFileExposer
- extends AbstractJarIdentificationExposer
+ extends AbstractLogEnabled
+ implements JarIdentificationExposer
{
- public String getExposerName()
+ public void expose( JarIdentification identification, JarAnalyzer jarAnalyzer )
{
- return "Text File";
- }
-
- public boolean isAuthoritative()
- {
- return false;
- }
-
- public void expose()
- {
- List textFiles = findTextFileVersions();
+ List textFiles = findTextFileVersions( jarAnalyzer );
if ( !textFiles.isEmpty() )
{
Iterator ithits = textFiles.iterator();
while ( ithits.hasNext() )
{
String ver = (String) ithits.next();
- addVersion( ver );
+ identification.addVersion( ver );
}
}
}
- private List findTextFileVersions()
+ private List findTextFileVersions( JarAnalyzer jarAnalyzer )
{
List textVersions = new ArrayList();
- List hits = getJar().getNameRegexEntryList( "[Vv][Ee][Rr][Ss][Ii][Oo][Nn]" ); //$NON-NLS-1$
+ List hits = jarAnalyzer.getVersionEntries();
Iterator it = hits.iterator();
while ( it.hasNext() )
@@ -78,10 +74,12 @@
if ( !entry.getName().endsWith( ".class" ) ) //$NON-NLS-1$
{
getLogger().debug( "Version Hit: " + entry.getName() );
- InputStream is = getJar().getEntryInputStream( entry );
- BufferedReader br = new BufferedReader( new InputStreamReader( is ) );
+ InputStream is = null;
try
{
+ is = jarAnalyzer.getEntryInputStream( entry );
+ BufferedReader br = new BufferedReader( new InputStreamReader( is ) );
+
String line = br.readLine();
// TODO: check for key=value pair.
// TODO: maybe even for groupId entries.
@@ -95,6 +93,10 @@
catch ( IOException e )
{
getLogger().warn( "Unable to read line from " + entry.getName(), e );
+ }
+ finally
+ {
+ IOUtil.close( is );
}
}
}
Modified: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/TimestampExposer.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/TimestampExposer.java?view=diff&rev=552400&r1=552399&r2=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/TimestampExposer.java (original)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/exposers/TimestampExposer.java Sun Jul 1 21:50:57 2007
@@ -21,7 +21,9 @@
import org.apache.commons.collections.Bag;
import org.apache.commons.collections.bag.HashBag;
-import org.apache.maven.shared.jar.identification.AbstractJarIdentificationExposer;
+import org.apache.maven.shared.jar.JarAnalyzer;
+import org.apache.maven.shared.jar.identification.JarIdentification;
+import org.apache.maven.shared.jar.identification.JarIdentificationExposer;
import org.codehaus.plexus.util.StringUtils;
import java.text.SimpleDateFormat;
@@ -31,28 +33,17 @@
import java.util.Locale;
import java.util.jar.JarEntry;
-
/**
- * JarAnalyzer Taxon Exposer - using Majority Timestamp of classes.
+ * Exposer that examines a a JAR and uses the most recent timestamp as a potential version.
*
* @plexus.component role="org.apache.maven.shared.jar.identification.JarIdentificationExposer" role-hint="timestamp"
*/
public class TimestampExposer
- extends AbstractJarIdentificationExposer
+ implements JarIdentificationExposer
{
- public String getExposerName()
- {
- return "Timestamp";
- }
-
- public boolean isAuthoritative()
- {
- return false;
- }
-
- public void expose()
+ public void expose( JarIdentification identification, JarAnalyzer jarAnalyzer )
{
- List entries = getJar().getNameRegexEntryList( ".*" ); //$NON-NLS-1$
+ List entries = jarAnalyzer.getEntries();
SimpleDateFormat tsformat = new SimpleDateFormat( "yyyyMMdd", Locale.US ); //$NON-NLS-1$
Bag timestamps = new HashBag();
Iterator it = entries.iterator();
@@ -80,7 +71,7 @@
if ( StringUtils.isNotEmpty( ts ) )
{
- addVersion( ts );
+ identification.addVersion( ts );
}
}
}
Added: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/hash/JarBytecodeHashAnalyzer.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/hash/JarBytecodeHashAnalyzer.java?view=auto&rev=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/hash/JarBytecodeHashAnalyzer.java (added)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/hash/JarBytecodeHashAnalyzer.java Sun Jul 1 21:50:57 2007
@@ -0,0 +1,102 @@
+package org.apache.maven.shared.jar.identification.hash;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.shared.jar.JarAnalyzer;
+import org.apache.maven.shared.jar.JarData;
+import org.codehaus.plexus.digest.DigesterException;
+import org.codehaus.plexus.digest.StreamingDigester;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.util.IOUtil;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Iterator;
+import java.util.jar.JarEntry;
+
+/**
+ * Analyzer that calculates the hash code for the entire file. Can be used to detect an exact copy of the file's class
+ * data. Useful to see thru a recompile, recompression, or timestamp change.
+ * <p/>
+ * If you are not using Plexus, you must call {@link #setDigester(org.codehaus.plexus.digest.StreamingDigester)} before use
+ *
+ * @plexus.component role="org.apache.maven.shared.jar.identification.hash.JarHashAnalyzer" role-hint="bytecode"
+ */
+public class JarBytecodeHashAnalyzer
+ extends AbstractLogEnabled
+ implements JarHashAnalyzer
+{
+ /**
+ * The streaming digester to use for computing the hash. Under Plexus, the default is SHA-1.
+ *
+ * @plexus.requirement role-hint="sha1"
+ */
+ private StreamingDigester digester;
+
+ public String computeHash( JarAnalyzer jarAnalyzer )
+ {
+ JarData jarData = jarAnalyzer.getJarData();
+
+ String result = jarData.getBytecodeHash();
+ if ( result == null )
+ {
+ Iterator it = jarAnalyzer.getClassEntries().iterator();
+
+ try
+ {
+ digester.reset();
+ while ( it.hasNext() )
+ {
+ JarEntry entry = (JarEntry) it.next();
+ computeEntryBytecodeHash( jarAnalyzer.getEntryInputStream( entry ) );
+ }
+ result = digester.calc();
+ jarData.setBytecodeHash( result );
+ }
+ catch ( DigesterException e )
+ {
+ getLogger().warn( "Unable to calculate the hashcode.", e );
+ }
+ catch ( IOException e )
+ {
+ getLogger().warn( "Unable to calculate the hashcode.", e );
+ }
+ }
+ return result;
+ }
+
+ private void computeEntryBytecodeHash( InputStream is )
+ throws IOException, DigesterException
+ {
+ try
+ {
+ digester.update( is );
+ }
+ finally
+ {
+ IOUtil.close( is );
+ }
+ }
+
+ public void setDigester( StreamingDigester digester )
+ {
+ this.digester = digester;
+ }
+}
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/hash/JarBytecodeHashAnalyzer.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/hash/JarFileHashAnalyzer.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/hash/JarFileHashAnalyzer.java?view=auto&rev=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/hash/JarFileHashAnalyzer.java (added)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/hash/JarFileHashAnalyzer.java Sun Jul 1 21:50:57 2007
@@ -0,0 +1,70 @@
+package org.apache.maven.shared.jar.identification.hash;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.shared.jar.JarAnalyzer;
+import org.apache.maven.shared.jar.JarData;
+import org.codehaus.plexus.digest.Digester;
+import org.codehaus.plexus.digest.DigesterException;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+
+/**
+ * Analyzer that calculates the hash code for the entire file. Can be used to detect an exact copy of the file.
+ * <p/>
+ * If you are not using Plexus, you must call {@link #setDigester(org.codehaus.plexus.digest.Digester)} before use
+ *
+ * @plexus.component role="org.apache.maven.shared.jar.identification.hash.JarHashAnalyzer" role-hint="file"
+ */
+public class JarFileHashAnalyzer
+ extends AbstractLogEnabled
+ implements JarHashAnalyzer
+{
+ /**
+ * The digester to use for computing the hash. Under Plexus, the default is SHA-1.
+ *
+ * @plexus.requirement role-hint="sha1"
+ */
+ private Digester digester;
+
+ public String computeHash( JarAnalyzer jarAnalyzer )
+ {
+ JarData jarData = jarAnalyzer.getJarData();
+
+ String result = jarData.getFileHash();
+ if ( result == null )
+ {
+ try
+ {
+ result = digester.calc( jarData.getFile() );
+ jarData.setFileHash( result );
+ }
+ catch ( DigesterException e )
+ {
+ getLogger().warn( "Unable to calculate the hashcode.", e );
+ }
+ }
+ return result;
+ }
+
+ public void setDigester( Digester digester )
+ {
+ this.digester = digester;
+ }
+}
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/hash/JarFileHashAnalyzer.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/hash/JarHashAnalyzer.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/hash/JarHashAnalyzer.java?view=auto&rev=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/hash/JarHashAnalyzer.java (added)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/hash/JarHashAnalyzer.java Sun Jul 1 21:50:57 2007
@@ -0,0 +1,36 @@
+package org.apache.maven.shared.jar.identification.hash;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.shared.jar.JarAnalyzer;
+
+/**
+ * Classes that can calculate various hash signatures for a JAR file to later uniquely identify them.
+ */
+public interface JarHashAnalyzer
+{
+ /**
+ * Compute the hash for the JAR. The hashcode will then be cached in the JAR data class for later use.
+ *
+ * @param jarAnalyzer the JAR analyzer to use to obtain the entries to hash
+ * @return the hash, or null if not able to be computed due to an exception.
+ */
+ String computeHash( JarAnalyzer jarAnalyzer );
+}
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/hash/JarHashAnalyzer.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/repository/EmptyRepositoryHashSearch.java (from r551486, maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/EmptyRepositoryHashSearch.java)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/repository/EmptyRepositoryHashSearch.java?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/EmptyRepositoryHashSearch.java&r1=551486&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/repository/EmptyRepositoryHashSearch.java&r2=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/EmptyRepositoryHashSearch.java (original)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/repository/EmptyRepositoryHashSearch.java Sun Jul 1 21:50:57 2007
@@ -1,4 +1,4 @@
-package org.apache.maven.shared.jar.identification;
+package org.apache.maven.shared.jar.identification.repository;
/*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -23,21 +23,17 @@
import java.util.List;
/**
- * Empty Repository Hash Search. Always returns an empty list.
- * Used for local only implementation of a RepositoryHashSearch.
- * It is expected for the users of this library to provide an implementation
- * of a RepositoryHashSearch against a real repository.
+ * Empty repository hash search. Always returns an empty list.
+ * <p/>
+ * Used for local only implementation of a RepositoryHashSearch. It is expected for the users of this library to provide
+ * an implementation of a {@link org.apache.maven.shared.jar.identification.repository.RepositoryHashSearch} against a
+ * real repository.
*
- * @plexus.component role="org.apache.maven.shared.jar.identification.RepositoryHashSearch"
+ * @plexus.component role="org.apache.maven.shared.jar.identification.repository.RepositoryHashSearch" role-hint="empty"
*/
public class EmptyRepositoryHashSearch
implements RepositoryHashSearch
{
- public boolean isValid()
- {
- return false;
- }
-
public List searchBytecodeHash( String hash )
{
return Collections.EMPTY_LIST;
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/repository/EmptyRepositoryHashSearch.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/repository/EmptyRepositoryHashSearch.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/repository/RepositoryHashSearch.java (from r551486, maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/RepositoryHashSearch.java)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/repository/RepositoryHashSearch.java?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/RepositoryHashSearch.java&r1=551486&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/repository/RepositoryHashSearch.java&r2=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/RepositoryHashSearch.java (original)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/repository/RepositoryHashSearch.java Sun Jul 1 21:50:57 2007
@@ -1,4 +1,4 @@
-package org.apache.maven.shared.jar.identification;
+package org.apache.maven.shared.jar.identification.repository;
/*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -26,11 +26,20 @@
*/
public interface RepositoryHashSearch
{
- String ROLE = RepositoryHashSearch.class.getName();
-
- boolean isValid();
-
+ /**
+ * Search the repository for artifacts matching the given hash code when consider the entire contents of the file.
+ *
+ * @param hash the hash code to use
+ * @return a list of {@link org.apache.maven.artifact.Artifact} instances that matched
+ */
List searchFileHash( String hash );
+ /**
+ * Search the repository for artifacts matching the given hash code when consider the bytecode of the classes in the
+ * file.
+ *
+ * @param hash the hash code to use
+ * @return a list of {@link org.apache.maven.artifact.Artifact} instances that matched
+ */
List searchBytecodeHash( String hash );
}
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/repository/RepositoryHashSearch.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/main/java/org/apache/maven/shared/jar/identification/repository/RepositoryHashSearch.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/sandbox/trunk/shared/maven-shared-jar/src/main/javadoc/overview.html
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/main/javadoc/overview.html?view=auto&rev=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/main/javadoc/overview.html (added)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/main/javadoc/overview.html Sun Jul 1 21:50:57 2007
@@ -0,0 +1,119 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<html>
+<head>
+ <title>Maven Shared Components: Jar Analyzer</title>
+</head>
+<body>
+
+<h1>Maven Shared Components: Jar Analyzer</h1>
+
+<p>
+ The Maven Jar Analyzer components can be used to gather various pieces of information about a given JAR file.
+
+ Currently, the following operations are supported:
+</p>
+<ul>
+ <li><a href="#Identification">Maven Artifact Identification</a> - examine the JAR and its contents to try and
+ determine any associated Maven metadata such as group and artifact ID.
+ </li>
+ <li><a href="#ClassAnalysis">Java Class Analysis</a> - examine ther JAR's class file contents to determine various
+ pieces of Java metadata.
+ </li>
+</ul>
+
+<a name="Identification"><h2>Maven Artifact Identification</h2></a>
+
+<p>
+ To determine the Maven artifact metadata for a particular JAR, the
+ {@link org.apache.maven.shared.jar.identification.JarIdentificationAnalysis} class is used.
+ The class can be obtained through Plexus, or created standalone (in which case, see the class Javadoc for
+ information on proper wiring).
+</p>
+
+<p>
+ Note that to use the class, you must first obtain a {@link org.apache.maven.shared.jar.JarAnalyzer} instance as
+ instructed in its Javadoc.
+</p>
+
+<p>
+ The resulting information will be populated in the returned
+ {@link org.apache.maven.shared.jar.identification.JarIdentification} class.
+</p>
+
+<p>
+ Example usage:
+ <pre>
+ JarAnalyzer jar = new JarAnalyzer( jarFile );
+ JarIdenfitication jarIdenfitication;
+ try
+ {
+ // instance must have been previously obtained through Plexus or created as instructed in its Javadoc
+ jarIdenfitication = jarIdenfiticationAnalyzer.analyze( jar );
+ }
+ finally
+ {
+ jar.closeQuietly();
+ }
+
+ // continue to use jarIdenfitication or jar.getJarData()
+ </pre>
+</p>
+
+<a name="ClassAnalysis"><h2>Java Class Analysis</h2></a>
+
+<p>
+ To determine the Java class metadata for a particular JAR, the
+ {@link org.apache.maven.shared.jar.classes.JarClassesAnalysis} class is used.
+ The class can be obtained through Plexus, or created standalone (in which case, see the class Javadoc for
+ information on proper wiring).
+</p>
+
+<p>
+ Note that to use the class, you must first obtain a {@link org.apache.maven.shared.jar.JarAnalyzer} instance as
+ instructed in its Javadoc.
+</p>
+
+<p>
+ The resulting information will be populated in the returned
+ {@link org.apache.maven.shared.jar.classes.JarClasses} class.
+</p>
+
+<p>
+ Example usage:
+ <pre>
+ JarAnalyzer jar = new JarAnalyzer( jarFile );
+ JarClasses jarClasses;
+ try
+ {
+ // instance must have been previously obtained through Plexus or created as instructed in its Javadoc
+ jarClasses = jarClassAnalyzer.analyze( jar );
+ }
+ finally
+ {
+ jar.closeQuietly();
+ }
+
+ // continue to use jarClasses or jar.getJarData()
+ </pre>
+</p>
+
+</body>
+</html>
\ No newline at end of file
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/main/javadoc/overview.html
------------------------------------------------------------------------------
svn:eol-style = native
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/AbstractJarAnalyzerTestCase.java (from r551486, maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/AbstractJarTestCase.java)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/AbstractJarAnalyzerTestCase.java?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/AbstractJarTestCase.java&r1=551486&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/AbstractJarAnalyzerTestCase.java&r2=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/AbstractJarTestCase.java (original)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/AbstractJarAnalyzerTestCase.java Sun Jul 1 21:50:57 2007
@@ -23,6 +23,7 @@
import org.codehaus.plexus.PlexusTestCase;
import java.io.File;
+import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
@@ -33,41 +34,13 @@
/**
* Abstract JarAnalyzer TestCase
*/
-public abstract class AbstractJarTestCase
+public abstract class AbstractJarAnalyzerTestCase
extends PlexusTestCase
{
- protected File testdir;
-
- public void setUp()
- throws Exception
- {
- super.setUp();
-
- this.testdir = new File( getBasedir(), "src/test" );
- }
-
- public File getSampleJarsDirectory()
- {
- return new File( testdir, "jars" );
- }
-
- public File getTestLocalRepoDirectory()
- {
- return new File( testdir, "localrepo" );
- }
-
- public JarAnalyzerFactory getJarAnalyzerFactory()
- throws Exception
- {
- return (JarAnalyzerFactory) lookup( JarAnalyzerFactory.ROLE, "default" );
- }
-
- public void assertContains( String msg, Object expected, Collection coll )
+ public File getSampleJar( String filename )
+ throws MalformedURLException
{
- if ( !coll.contains( expected ) )
- {
- throw new AssertionFailedError( msg + " collection did not have: " + expected.toString() );
- }
+ return new File( getClass().getResource( "/jars/" + filename ).getPath() );
}
public void assertNotContainsRegex( String msg, String regex, Collection coll )
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/AbstractJarAnalyzerTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/AbstractJarAnalyzerTestCase.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/JarAnalyzerTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/JarAnalyzerTest.java?view=diff&rev=552400&r1=552399&r2=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/JarAnalyzerTest.java (original)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/JarAnalyzerTest.java Sun Jul 1 21:50:57 2007
@@ -1,5 +1,9 @@
package org.apache.maven.shared.jar;
+import java.io.File;
+import java.io.IOException;
+import java.util.zip.ZipException;
+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -19,32 +23,89 @@
* under the License.
*/
-import java.io.File;
-
/**
- * JarAnalyzer Test Case
+ * Tests for the JarAnalyzer class.
*/
public class JarAnalyzerTest
- extends AbstractJarTestCase
+ extends AbstractJarAnalyzerTestCase
{
- private JarAnalyzer getJar( String filename )
+ private JarAnalyzer jarAnalyzer;
+
+
+ protected void tearDown()
+ throws Exception
+ {
+ super.tearDown();
+
+ if ( jarAnalyzer != null )
+ {
+ jarAnalyzer.closeQuietly();
+ }
+ }
+
+ private JarData getJarData( String filename )
throws Exception
{
- File jarfile = new File( getSampleJarsDirectory(), filename );
- return getJarAnalyzerFactory().getJarAnalyzer( jarfile );
+ jarAnalyzer = getJarAnalyzer( filename );
+ return jarAnalyzer.getJarData();
+ }
+
+ private JarAnalyzer getJarAnalyzer( String filename )
+ throws IOException
+ {
+ return new JarAnalyzer( getSampleJar( filename ) );
}
public void testSealed()
throws Exception
{
- JarAnalyzer evil = getJar( "evil-sealed-regex-1.0.jar" );
- assertTrue( evil.isSealed() );
+ JarData jarData = getJarData( "evil-sealed-regex-1.0.jar" );
+ assertTrue( jarData.isSealed() );
}
public void testNotSealed()
throws Exception
{
- JarAnalyzer codec = getJar( "codec.jar" );
- assertFalse( codec.isSealed() );
+ JarData jarData = getJarData( "codec.jar" );
+ assertFalse( jarData.isSealed() );
+ }
+
+ public void testMissingFile()
+ throws Exception
+ {
+ try
+ {
+ jarAnalyzer = new JarAnalyzer( new File( "foo-bar.jar" ) );
+ fail( "Should not have succeeded to get the missing JAR" );
+ }
+ catch ( ZipException e )
+ {
+ assertTrue( true );
+ }
+ }
+
+ public void testInvalidJarFile()
+ throws Exception
+ {
+ try
+ {
+ getJarAnalyzer( "invalid.jar" );
+ fail( "Should not have succeeded to get the invalid JAR" );
+ }
+ catch ( ZipException e )
+ {
+ assertTrue( true );
+ }
+ }
+
+ public void testCloseTwice()
+ throws Exception
+ {
+ JarAnalyzer jarAnalyzer = getJarAnalyzer( "codec.jar" );
+
+ // no exception should be thrown
+ jarAnalyzer.closeQuietly();
+ jarAnalyzer.closeQuietly();
+ assertTrue( true );
}
}
Modified: maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/classes/ImportVisitorTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/classes/ImportVisitorTest.java?view=diff&rev=552400&r1=552399&r2=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/classes/ImportVisitorTest.java (original)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/classes/ImportVisitorTest.java Sun Jul 1 21:50:57 2007
@@ -23,7 +23,7 @@
import org.apache.bcel.classfile.ClassParser;
import org.apache.bcel.classfile.DescendingVisitor;
import org.apache.bcel.classfile.JavaClass;
-import org.apache.maven.shared.jar.AbstractJarTestCase;
+import org.apache.maven.shared.jar.AbstractJarAnalyzerTestCase;
import java.io.File;
import java.io.IOException;
@@ -34,12 +34,12 @@
* Import Visitor Test
*/
public class ImportVisitorTest
- extends AbstractJarTestCase
+ extends AbstractJarAnalyzerTestCase
{
public void testImportsJxr()
throws ClassFormatException, IOException
{
- File jxrjar = new File( getSampleJarsDirectory(), "jxr.jar" );
+ File jxrjar = getSampleJar( "jxr.jar" );
String classname = "org/apache/maven/jxr/DirectoryIndexer.class";
ClassParser classParser = new ClassParser( jxrjar.getAbsolutePath(), classname );
JavaClass javaClass = classParser.parse();
@@ -53,15 +53,15 @@
assertNotContainsRegex( "Import List", "[\\[\\)\\(\\;]", imports );
- assertContains( "imports", "org.apache.maven.jxr.pacman.PackageType", imports );
- assertContains( "imports", "org.codehaus.plexus.util.IOUtil", imports );
- assertContains( "imports", "org.apache.oro.text.perl.Perl5Util", imports );
+ assertTrue( "imports", imports.contains( "org.apache.maven.jxr.pacman.PackageType" ) );
+ assertTrue( "imports", imports.contains( "org.codehaus.plexus.util.IOUtil" ) );
+ assertTrue( "imports", imports.contains( "org.apache.oro.text.perl.Perl5Util" ) );
}
public void testImportsAnt()
throws ClassFormatException, IOException
{
- File jxrjar = new File( getSampleJarsDirectory(), "ant.jar" );
+ File jxrjar = getSampleJar( "ant.jar" );
String classname = "org/apache/tools/ant/Target.class";
ClassParser classParser = new ClassParser( jxrjar.getAbsolutePath(), classname );
JavaClass javaClass = classParser.parse();
@@ -75,7 +75,7 @@
assertNotContainsRegex( "Import List", "[\\[\\)\\(\\;]", imports );
- assertContains( "imports", "org.apache.tools.ant.Location", imports );
- assertContains( "imports", "org.apache.tools.ant.Task", imports );
+ assertTrue( "imports", imports.contains( "org.apache.tools.ant.Location" ) );
+ assertTrue( "imports", imports.contains( "org.apache.tools.ant.Task" ) );
}
}
Modified: maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/classes/JarClassesAnalyzerTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/classes/JarClassesAnalyzerTest.java?view=diff&rev=552400&r1=552399&r2=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/classes/JarClassesAnalyzerTest.java (original)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/classes/JarClassesAnalyzerTest.java Sun Jul 1 21:50:57 2007
@@ -19,7 +19,7 @@
* under the License.
*/
-import org.apache.maven.shared.jar.AbstractJarTestCase;
+import org.apache.maven.shared.jar.AbstractJarAnalyzerTestCase;
import org.apache.maven.shared.jar.JarAnalyzer;
import java.io.File;
@@ -29,18 +29,16 @@
* JarAnalyzer Classes Test Case
*/
public class JarClassesAnalyzerTest
- extends AbstractJarTestCase
+ extends AbstractJarAnalyzerTestCase
{
- private JarClasses getJarClasses( String filename )
+ private JarClassesAnalysis analyzer;
+
+ public void setUp()
throws Exception
{
- File jarfile = new File( getSampleJarsDirectory(), filename );
- JarAnalyzer jar = getJarAnalyzerFactory().getJarAnalyzer( jarfile );
-
- JarClasses jclass = jar.getClasses();
- assertNotNull( "JarClasses", jclass );
+ super.setUp();
- return jclass;
+ analyzer = (JarClassesAnalysis) lookup( JarClassesAnalysis.class.getName() );
}
public void testAnalyzeJXR()
@@ -48,17 +46,18 @@
{
JarClasses jclass = getJarClasses( "jxr.jar" );
- assertTrue( "classes.imports.length > 0", jclass.getImports().size() > 0 );
- assertTrue( "classes.packages.length > 0", jclass.getPackages().size() > 0 );
+ assertFalse( "classes.imports.length > 0", jclass.getImports().isEmpty() );
+ assertFalse( "classes.packages.length > 0", jclass.getPackages().isEmpty() );
+ assertFalse( "classes.methods.length > 0", jclass.getMethods().isEmpty() );
assertNotContainsRegex( "Import List", "[\\[\\)\\(\\;]", jclass.getImports() );
- // TODO: test for classes count.
+ // TODO: test for classes, methods, etc.
- assertContains( "classes.imports", "org.apache.maven.jxr.JXR", jclass.getImports() );
- assertContains( "classes.imports", "org.apache.oro.text.perl.Perl5Util", jclass.getImports() );
- assertContains( "classes.imports", "org.codehaus.plexus.util.IOUtil", jclass.getImports() );
- assertContains( "classes.packages", "org.apache.maven.jxr.pacman", jclass.getPackages() );
+ assertTrue( "classes.imports", jclass.getImports().contains( "org.apache.maven.jxr.JXR" ) );
+ assertTrue( "classes.imports", jclass.getImports().contains( "org.apache.oro.text.perl.Perl5Util" ) );
+ assertTrue( "classes.imports", jclass.getImports().contains( "org.codehaus.plexus.util.IOUtil" ) );
+ assertTrue( "classes.packages", jclass.getPackages().contains( "org.apache.maven.jxr.pacman" ) );
}
public void testAnalyzeANT()
@@ -66,16 +65,30 @@
{
JarClasses jclass = getJarClasses( "ant.jar" );
- assertTrue( "classes.imports.length > 0", jclass.getImports().size() > 0 );
- assertTrue( "classes.packages.length > 0", jclass.getPackages().size() > 0 );
+ assertFalse( "classes.imports.length > 0", jclass.getImports().isEmpty() );
+ assertFalse( "classes.packages.length > 0", jclass.getPackages().isEmpty() );
+ assertFalse( "classes.methods.length > 0", jclass.getMethods().isEmpty() );
assertNotContainsRegex( "Import List", "[\\[\\)\\(\\;]", jclass.getImports() );
- assertContains( "classes.imports", "java.util.zip.GZIPInputStream", jclass.getImports() );
- assertContains( "classes.imports", "org.apache.tools.ant.XmlLogger$TimedElement", jclass.getImports() );
- assertContains( "classes.imports", "org.apache.tools.mail.MailMessage", jclass.getImports() );
- assertContains( "classes.packages", "org.apache.tools.ant", jclass.getPackages() );
- assertContains( "classes.packages", "org.apache.tools.bzip2", jclass.getPackages() );
+ assertTrue( "classes.imports", jclass.getImports().contains( "java.util.zip.GZIPInputStream" ) );
+ assertTrue( "classes.imports", jclass.getImports().contains( "org.apache.tools.ant.XmlLogger$TimedElement" ) );
+ assertTrue( "classes.imports", jclass.getImports().contains( "org.apache.tools.mail.MailMessage" ) );
+ assertTrue( "classes.packages", jclass.getPackages().contains( "org.apache.tools.ant" ) );
+ assertTrue( "classes.packages", jclass.getPackages().contains( "org.apache.tools.bzip2" ) );
+ }
+
+ public void testAnalyzeJarWithInvalidClassFile()
+ throws Exception
+ {
+ JarClasses jclass = getJarClasses( "invalid-class-file.jar" );
+
+ // Doesn't fail, as exceptions are ignored.
+ assertTrue( jclass.getClassNames().isEmpty() );
+ assertTrue( jclass.getPackages().isEmpty() );
+ assertTrue( jclass.getImports().isEmpty() );
+ assertNull( jclass.getJdkRevision() );
+ assertTrue( jclass.getMethods().isEmpty() );
}
public void testAnalyzeJarWithDebug()
@@ -94,6 +107,14 @@
assertFalse( "no debug present", jclass.isDebugPresent() );
}
+ public void testAnalyzeJarVersion16()
+ throws Exception
+ {
+ JarClasses jclass = getJarClasses( "helloworld-1.6.jar" );
+
+ assertEquals( "jdkrevision", "1.6", jclass.getJdkRevision() );
+ }
+
public void testAnalyzeJarVersion15()
throws Exception
{
@@ -132,5 +153,16 @@
JarClasses jclass = getJarClasses( "helloworld-1.1.jar" );
assertEquals( "jdkrevision", "1.1", jclass.getJdkRevision() );
+ }
+
+ private JarClasses getJarClasses( String filename )
+ throws Exception
+ {
+ File file = getSampleJar( filename );
+
+ JarClasses jclass = analyzer.analyze( new JarAnalyzer( file ) );
+ assertNotNull( "JarClasses", jclass );
+
+ return jclass;
}
}
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/identification/JarIdentificationAnalyzerTest.java (from r552399, maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/taxon/JarIdentificationAnalyzerTest.java)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/identification/JarIdentificationAnalyzerTest.java?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/taxon/JarIdentificationAnalyzerTest.java&r1=552399&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/identification/JarIdentificationAnalyzerTest.java&r2=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/taxon/JarIdentificationAnalyzerTest.java (original)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/identification/JarIdentificationAnalyzerTest.java Sun Jul 1 21:50:57 2007
@@ -1,4 +1,4 @@
-package org.apache.maven.shared.jar.taxon;
+package org.apache.maven.shared.jar.identification;
/*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -19,27 +19,28 @@
* under the License.
*/
-import org.apache.maven.shared.jar.AbstractJarTestCase;
+import org.apache.maven.shared.jar.AbstractJarAnalyzerTestCase;
import org.apache.maven.shared.jar.JarAnalyzer;
-import org.apache.maven.shared.jar.identification.JarIdentification;
import java.io.File;
/**
* JarAnalyzer Taxon Analyzer Test Case
+ *
+ * @todo test the exposers individually instead of in aggregate here (and test the normalize, etc. methods here instead with controlled exposers)
*/
public class JarIdentificationAnalyzerTest
- extends AbstractJarTestCase
+ extends AbstractJarAnalyzerTestCase
{
private JarIdentification getJarTaxon( String filename )
throws Exception
{
- File jarfile = new File( getSampleJarsDirectory(), filename );
-
- JarAnalyzer jar = getJarAnalyzerFactory().getJarAnalyzer( jarfile );
+ File jarfile = getSampleJar( filename );
- JarIdentification taxon = jar.getIdentification();
+ JarIdentificationAnalysis analyzer =
+ (JarIdentificationAnalysis) lookup( JarIdentificationAnalysis.class.getName() );
+ JarIdentification taxon = analyzer.analyze( new JarAnalyzer( jarfile ) );
assertNotNull( "JarIdentification", taxon );
return taxon;
@@ -50,13 +51,13 @@
{
JarIdentification taxon = getJarTaxon( "jxr.jar" );
- assertTrue( "taxon.potentials > 0", taxon.getPotentials().size() > 0 );
+ assertEquals( "identification.groupId", "org.apache.maven", taxon.getGroupId() );
+ assertEquals( "identification.artifactId", "maven-jxr", taxon.getArtifactId() );
+ assertEquals( "identification.version", "1.1-SNAPSHOT", taxon.getVersion() );
+ assertEquals( "identification.name", "Maven JXR", taxon.getName() );
+ assertEquals( "identification.vendor", "Apache Software Foundation", taxon.getVendor() );
- assertEquals( "taxon.groupId", "org.apache.maven", taxon.getGroupId() );
- assertEquals( "taxon.artifactId", "maven-jxr", taxon.getArtifactId() );
- assertEquals( "taxon.version", "1.1-SNAPSHOT", taxon.getVersion() );
- assertEquals( "taxon.name", "Maven JXR", taxon.getName() );
- assertEquals( "taxon.vendor", "Apache Software Foundation", taxon.getVendor() );
+ // TODO assert potentials too
}
/**
@@ -69,14 +70,15 @@
{
JarIdentification taxon = getJarTaxon( "codec.jar" );
- assertTrue( "taxon.potentials > 0", taxon.getPotentials().size() > 0 );
+ assertEquals( "identification.groupId", "org.apache.commons.codec", taxon.getGroupId() );
+ assertEquals( "identification.artifactId", "codec", taxon.getArtifactId() );
+ // TODO fix assertion
+ // assertEquals( "identification.version", "codec_release_1_0_0_interim_20030519095102_build", identification.getVersion() );
+ assertEquals( "identification.version", "20030519", taxon.getVersion() );
+ assertEquals( "identification.name", "codec", taxon.getName() );
+ assertNull( "identification.vendor", taxon.getVendor() );
- assertEquals( "taxon.groupId", "org.apache.commons.codec", taxon.getGroupId() );
- assertEquals( "taxon.artifactId", "codec", taxon.getArtifactId() );
- // assertEquals( "taxon.version", "codec_release_1_0_0_interim_20030519095102_build", taxon.getVersion() );
- assertEquals( "taxon.version", "20030519", taxon.getVersion() );
- assertEquals( "taxon.name", "codec", taxon.getName() );
- assertNull( "taxon.vendor", taxon.getVendor() );
+ // TODO assert potentials too
}
public void testTaxonAnalyzerWithANT()
@@ -84,12 +86,13 @@
{
JarIdentification taxon = getJarTaxon( "ant.jar" );
- assertTrue( "taxon.potentials > 0", taxon.getPotentials().size() > 0 );
+ assertEquals( "identification.groupId", "org.apache.tools.ant", taxon.getGroupId() );
+ assertEquals( "identification.artifactId", "ant", taxon.getArtifactId() );
+ assertEquals( "identification.version", "1.6.5", taxon.getVersion() );
+ // TODO fix assertion
+ // assertEquals( "identification.name", "Apache Ant", identification.getName() );
+ assertEquals( "identification.vendor", "Apache Software Foundation", taxon.getVendor() );
- assertEquals( "taxon.groupId", "org.apache.tools.ant", taxon.getGroupId() );
- assertEquals( "taxon.artifactId", "ant", taxon.getArtifactId() );
- assertEquals( "taxon.version", "1.6.5", taxon.getVersion() );
- // assertEquals( "taxon.name", "Apache Ant", taxon.getName() );
- assertEquals( "taxon.vendor", "Apache Software Foundation", taxon.getVendor() );
+ // TODO assert potentials too
}
}
Modified: maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/identification/exposers/EmbeddedMavenModelExposerTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/identification/exposers/EmbeddedMavenModelExposerTest.java?view=diff&rev=552400&r1=552399&r2=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/identification/exposers/EmbeddedMavenModelExposerTest.java (original)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/test/java/org/apache/maven/shared/jar/identification/exposers/EmbeddedMavenModelExposerTest.java Sun Jul 1 21:50:57 2007
@@ -1,4 +1,4 @@
-package org.apache.maven.shared.jar.taxon.exposers;
+package org.apache.maven.shared.jar.identification.exposers;
/*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -19,9 +19,9 @@
* under the License.
*/
-import org.apache.maven.shared.jar.AbstractJarTestCase;
+import org.apache.maven.shared.jar.AbstractJarAnalyzerTestCase;
import org.apache.maven.shared.jar.JarAnalyzer;
-import org.apache.maven.shared.jar.identification.exposers.EmbeddedMavenModelExposer;
+import org.apache.maven.shared.jar.identification.JarIdentification;
import java.io.File;
@@ -30,44 +30,39 @@
* Test Case for Embedded Maven Model Taxon Data.
*/
public class EmbeddedMavenModelExposerTest
- extends AbstractJarTestCase
+ extends AbstractJarAnalyzerTestCase
{
public void testExposerWithJXR()
throws Exception
{
- File jxrfile = new File( getSampleJarsDirectory(), "jxr.jar" );
- JarAnalyzer jxrjar = getJarAnalyzerFactory().getJarAnalyzer( jxrfile );
+ File file = getSampleJar( "jxr.jar" );
- EmbeddedMavenModelExposer exposer = new EmbeddedMavenModelExposer();
- exposer.setJar( jxrjar );
- exposer.expose();
-
- assertTrue( "exposer.isAuthoritative", exposer.isAuthoritative() );
+ JarIdentification identification = new JarIdentification();
- assertNotNull( "exposer.groupIds", exposer.getGroupIds() );
- assertFalse( "exposer.groupIds", exposer.getGroupIds().isEmpty() );
+ EmbeddedMavenModelExposer exposer = new EmbeddedMavenModelExposer();
+ exposer.expose( identification, new JarAnalyzer( file ) );
- assertNotNull( "exposer.artifactIds", exposer.getArtifactIds() );
- assertFalse( "exposer.artifactIds", exposer.getArtifactIds().isEmpty() );
+ assertFalse( "exposer.groupIds", identification.getPotentialGroupIds().isEmpty() );
+ assertFalse( "exposer.artifactIds", identification.getPotentialArtifactIds().isEmpty() );
+ assertFalse( "exposer.versions", identification.getPotentialVersions().isEmpty() );
- assertNotNull( "exposer.versions", exposer.getVersions() );
- assertFalse( "exposer.versions", exposer.getVersions().isEmpty() );
+ // TODO test others
}
public void testExposerWithANT()
throws Exception
{
- File antfile = new File( getSampleJarsDirectory(), "ant.jar" );
- JarAnalyzer antjar = getJarAnalyzerFactory().getJarAnalyzer( antfile );
+ File file = getSampleJar( "ant.jar" );
+
+ JarIdentification identification = new JarIdentification();
EmbeddedMavenModelExposer exposer = new EmbeddedMavenModelExposer();
- exposer.setJar( antjar );
- exposer.expose();
+ exposer.expose( identification, new JarAnalyzer( file ) );
- assertTrue( "exposer.isAuthoritative", exposer.isAuthoritative() );
+ assertTrue( "exposer.groupIds", identification.getPotentialGroupIds().isEmpty() );
+ assertTrue( "exposer.artifactIds", identification.getPotentialArtifactIds().isEmpty() );
+ assertTrue( "exposer.versions", identification.getPotentialVersions().isEmpty() );
- assertNull( "exposer.groupIds", exposer.getGroupIds() );
- assertNull( "exposer.artifactIds", exposer.getArtifactIds() );
- assertNull( "exposer.versions", exposer.getVersions() );
+ // TODO test others
}
}
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/ant.jar (from r551474, maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/ant.jar)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/ant.jar?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/ant.jar&r1=551474&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/ant.jar&r2=552400
==============================================================================
Binary files - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/ant.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/codec.jar (from r551474, maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/codec.jar)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/codec.jar?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/codec.jar&r1=551474&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/codec.jar&r2=552400
==============================================================================
Binary files - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/codec.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/evil-sealed-regex-1.0.jar (from r551474, maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/evil-sealed-regex-1.0.jar)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/evil-sealed-regex-1.0.jar?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/evil-sealed-regex-1.0.jar&r1=551474&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/evil-sealed-regex-1.0.jar&r2=552400
==============================================================================
Binary files - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/evil-sealed-regex-1.0.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.1-debug.jar (from r551474, maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.1-debug.jar)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.1-debug.jar?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.1-debug.jar&r1=551474&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.1-debug.jar&r2=552400
==============================================================================
Binary files - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.1-debug.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.1.jar (from r551474, maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.1.jar)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.1.jar?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.1.jar&r1=551474&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.1.jar&r2=552400
==============================================================================
Binary files - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.1.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.2-debug.jar (from r551474, maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.2-debug.jar)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.2-debug.jar?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.2-debug.jar&r1=551474&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.2-debug.jar&r2=552400
==============================================================================
Binary files - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.2-debug.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.2.jar (from r551474, maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.2.jar)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.2.jar?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.2.jar&r1=551474&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.2.jar&r2=552400
==============================================================================
Binary files - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.2.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.3-debug.jar (from r551474, maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.3-debug.jar)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.3-debug.jar?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.3-debug.jar&r1=551474&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.3-debug.jar&r2=552400
==============================================================================
Binary files - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.3-debug.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.3.jar (from r551474, maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.3.jar)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.3.jar?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.3.jar&r1=551474&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.3.jar&r2=552400
==============================================================================
Binary files - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.3.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.4-debug.jar (from r551474, maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.4-debug.jar)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.4-debug.jar?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.4-debug.jar&r1=551474&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.4-debug.jar&r2=552400
==============================================================================
Binary files - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.4-debug.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.4.jar (from r551474, maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.4.jar)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.4.jar?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.4.jar&r1=551474&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.4.jar&r2=552400
==============================================================================
Binary files - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.4.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.5-debug.jar (from r551474, maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.5-debug.jar)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.5-debug.jar?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.5-debug.jar&r1=551474&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.5-debug.jar&r2=552400
==============================================================================
Binary files - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.5-debug.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.5.jar (from r551474, maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.5.jar)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.5.jar?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/helloworld-1.5.jar&r1=551474&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.5.jar&r2=552400
==============================================================================
Binary files - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.5.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.6.jar
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.6.jar?view=auto&rev=552400
==============================================================================
Binary file - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/helloworld-1.6.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/invalid-class-file.jar
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/invalid-class-file.jar?view=auto&rev=552400
==============================================================================
Binary file - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/invalid-class-file.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/invalid.jar
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/invalid.jar?view=auto&rev=552400
==============================================================================
--- maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/invalid.jar (added)
+++ maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/invalid.jar Sun Jul 1 21:50:57 2007
@@ -0,0 +1 @@
+some random text
Copied: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/jxr.jar (from r551474, maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/jxr.jar)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/jxr.jar?view=diff&rev=552400&p1=maven/sandbox/trunk/shared/maven-shared-jar/src/test/jars/jxr.jar&r1=551474&p2=maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/jxr.jar&r2=552400
==============================================================================
Binary files - no diff available.
Propchange: maven/sandbox/trunk/shared/maven-shared-jar/src/test/resources/jars/jxr.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream