Class MavenJarHandler

java.lang.Object
uno.anahata.asi.toolkit.java.classpath.AbstractJarHandler
uno.anahata.asi.toolkit.java.classpath.MavenJarHandler
All Implemented Interfaces:
JarHandler

public class MavenJarHandler extends AbstractJarHandler
Specialized handler for Maven-packaged JARs.

Implementation detail: It looks for pom.properties inside the META-INF/maven/ directory to extract exact groupIds, artifactIds, and versions.

Author:
anahata
  • Constructor Details

    • MavenJarHandler

      public MavenJarHandler()
  • Method Details

    • canHandle

      public boolean canHandle(File jarFile)
      Description copied from interface: JarHandler
      Checks if this handler is capable of extracting metadata from the given JAR file.
      Parameters:
      jarFile - The file to check.
      Returns:
      true if this handler should be used.
    • extractMetadata

      public JarMetadata extractMetadata(File jarFile)
      Description copied from interface: JarHandler
      Extracts semantic metadata (ID, version, vendor) from the JAR file.
      Parameters:
      jarFile - The file to inspect.
      Returns:
      The extracted metadata, or null if extraction failed.