[MNG-8089] Introduce fat-JAR types (#1459)

These are dependency types to be used when dependency is "self contained", or is wanted be used as such: handle if like it has no dependencies, if any.

---

https://issues.apache.org/jira/browse/MNG-8089
This commit is contained in:
Tamas Cservenak 2024-03-29 10:32:19 +01:00 committed by GitHub
parent 2594047014
commit c16f45d858
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -60,6 +60,13 @@ public interface Type extends ExtensibleEnum {
*/
String JAR = "jar";
/**
* Artifact type name for a fat-JAR file that can be only on the class-path.
* The fat-JAR is a self-contained JAR and its transitive dependencies will not be resolved, if any.
* This type is new in Maven 4.
*/
String FATJAR = "fatjar";
/**
* Artifact type name for a JAR file to unconditionally place on the class-path.
* If the JAR is modular, its module information are ignored.

View File

@ -57,6 +57,7 @@ public class DefaultTypeProvider implements TypeProvider {
JavaPathType.PATCH_MODULE),
new DefaultType(Type.MODULAR_JAR, Language.JAVA_FAMILY, "jar", null, false, JavaPathType.MODULES),
new DefaultType(Type.CLASSPATH_JAR, Language.JAVA_FAMILY, "jar", null, false, JavaPathType.CLASSES),
new DefaultType(Type.FATJAR, Language.JAVA_FAMILY, "jar", null, true, JavaPathType.CLASSES),
// j2ee types
new DefaultType("ejb", Language.JAVA_FAMILY, "jar", null, false, JavaPathType.CLASSES),
new DefaultType("ejb-client", Language.JAVA_FAMILY, "jar", "client", false, JavaPathType.CLASSES),