See: Description
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:
To determine the Maven artifact metadata for a particular JAR, the
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).
Note that to use the class, you must first obtain a JarAnalyzer
instance as
instructed in its Javadoc.
The resulting information will be populated in the returned
JarIdentification
class.
Example usage:
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()
To determine the Java class metadata for a particular JAR, the
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).
Note that to use the class, you must first obtain a JarAnalyzer
instance as
instructed in its Javadoc.
The resulting information will be populated in the returned
JarClasses
class.
Example usage:
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()
Copyright © 2002–2024 The Apache Software Foundation. All rights reserved.