Class JarIdentificationAnalysis


  • public class JarIdentificationAnalysis
    extends java.lang.Object
    Analyze the JAR file to identify Maven artifact metadata. This class is thread safe and immutable as long as all provided exposers are, as it retains no state.

    If using Plexus, the class will use all available exposers in the container.

    If not using Plexus, the exposers must be set using setExposers(java.util.List) before calling analyze(org.apache.maven.shared.jar.JarAnalyzer)

    Note that you must first create an instance of JarAnalyzer - see its Javadoc for a typical use.

    • Constructor Detail

      • JarIdentificationAnalysis

        public JarIdentificationAnalysis()
    • Method Detail

      • analyze

        public JarIdentification analyze​(JarAnalyzer jarAnalyzer)
        Analyze a JAR and find any associated Maven metadata. Note that if the provided JAR analyzer has previously analyzed the JAR, the cached results will be returned. You must obtain a new JAR analyzer to the re-read the contents of the file.
        Parameters:
        jarAnalyzer - the JAR to analyze. This must not yet have been closed.
        Returns:
        the Maven metadata discovered
      • setExposers

        public void setExposers​(java.util.List exposers)