From 42b83ad55d54fd7a5b0321ac143561b851dbc626 Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Fri, 10 Apr 2026 11:54:49 +0200 Subject: [PATCH] Feat: new artifact handler "fatjar". --- .../handler/types/FatJarArtifactHandler.java | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 maven-core/src/main/java/org/apache/maven/artifact/handler/types/FatJarArtifactHandler.java diff --git a/maven-core/src/main/java/org/apache/maven/artifact/handler/types/FatJarArtifactHandler.java b/maven-core/src/main/java/org/apache/maven/artifact/handler/types/FatJarArtifactHandler.java new file mode 100644 index 000000000000..b696acb9e2ed --- /dev/null +++ b/maven-core/src/main/java/org/apache/maven/artifact/handler/types/FatJarArtifactHandler.java @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.maven.artifact.handler.types; + +import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; + +import org.apache.maven.artifact.handler.ArtifactHandler; +import org.apache.maven.artifact.handler.ArtifactHandlerImpl; + +/** + * Fat-JAR Artifact Handler. + * + * @since 3.10.0 + */ +@Singleton +@Named(FatJarArtifactHandler.NAME) +public final class FatJarArtifactHandler implements Provider { + public static final String NAME = "fatjar"; + + private final ArtifactHandler instance; + + public FatJarArtifactHandler() { + this.instance = new ArtifactHandlerImpl(NAME, "jar", null, null, true, ArtifactHandlerImpl.LANGUAGE_JAVA, true); + } + + @Override + public ArtifactHandler get() { + return instance; + } +}