desruisseaux commented on code in PR #618:
URL: https://github.com/apache/maven-jar-plugin/pull/618#discussion_r4293586669


##########
src/main/java/org/apache/maven/plugins/jar/ManifestBuilder.java:
##########
@@ -0,0 +1,415 @@
+/*
+ * 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.plugins.jar;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.Map;
+import java.util.Set;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+import org.apache.maven.api.Dependency;
+import org.apache.maven.api.PathScope;
+import org.apache.maven.api.Project;
+import org.apache.maven.api.Session;
+import org.apache.maven.api.model.Model;
+import org.apache.maven.api.model.Plugin;
+import org.apache.maven.api.plugin.MojoException;
+import org.apache.maven.api.services.DependencyResolver;
+import org.apache.maven.api.services.DependencyResolverResult;
+import org.apache.maven.api.services.Interpolator;
+import org.apache.maven.api.xml.XmlNode;
+
+/**
+ * Builds a {@link Manifest} from the Maven project and plugin configuration,
+ * without depending on {@code maven-archiver} or {@code plexus-archiver}.
+ *
+ * <p>This class replaces the use of {@code MavenArchiver#getManifest}
+ * in this plugin, allowing removal of the {@code maven-archiver} and {@code 
plexus-archiver} dependencies.</p>
+ */
+final class ManifestBuilder {
+
+    private static final String CLASSPATH_LAYOUT_TYPE_SIMPLE = "simple";
+    private static final String CLASSPATH_LAYOUT_TYPE_REPOSITORY = 
"repository";
+    private static final String CLASSPATH_LAYOUT_TYPE_CUSTOM = "custom";

Review Comment:
   Maybe replace by a `ClassPathLayout` enumeration with these 3 values. The 
enumeration would have 2 additional fields: `path` and `pathNonUnique` with the 
values currently declared as constants below.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to