Class MavenJarHandler
java.lang.Object
uno.anahata.asi.toolkit.java.classpath.AbstractJarHandler
uno.anahata.asi.toolkit.java.classpath.MavenJarHandler
- All Implemented Interfaces:
JarHandler
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this handler is capable of extracting metadata from the given JAR file.extractMetadata(File jarFile) Extracts semantic metadata (ID, version, vendor) from the JAR file.Methods inherited from class AbstractJarHandler
getBaseName, readEntry, readManifest
-
Constructor Details
-
MavenJarHandler
public MavenJarHandler()
-
-
Method Details
-
canHandle
Description copied from interface:JarHandlerChecks 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
Description copied from interface:JarHandlerExtracts semantic metadata (ID, version, vendor) from the JAR file.- Parameters:
jarFile- The file to inspect.- Returns:
- The extracted metadata, or null if extraction failed.
-

