gnodet commented on code in PR #618:
URL: https://github.com/apache/maven-jar-plugin/pull/618#discussion_r4294084652
##########
src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java:
##########
@@ -425,12 +422,10 @@ public Map<String, Map<String, Path>> createArchives()
throws IOException, MojoE
return Map.of();
}
}
- archive.setForced(forceCreation);
+ archive.forced = forceCreation;
// TODO: we want a null manifest if there is no <archive>
configuration.
Review Comment:
Removed — the TODO was speculative and the current design (always building a
manifest) is intentional. The tool always receives the manifest via , so
there's no path where would be useful today.
##########
src/main/java/org/apache/maven/plugins/jar/ArchiveConfiguration.java:
##########
@@ -0,0 +1,79 @@
+/*
+ * 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.Path;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Configuration for archive creation, provided through the {@code <archive>}
plugin parameter.
+ *
+ * <p>This class replaces {@code
org.apache.maven.shared.archiver.MavenArchiveConfiguration},
+ * removing the dependency on {@code maven-archiver} and {@code
plexus-archiver}.</p>
+ *
+ * <p><strong>Note:</strong> This class and its inner classes must remain
{@code public} until
Review Comment:
The fields are package-private (no access modifier), so they're already
inaccessible from outside the package — `@Deprecated` would not add any
meaningful protection or compiler warning for external callers. The `public`
modifier on the outer class is forced by Maven's XML/DI binding (documented in
the class Javadoc), but the fields themselves remain package-private.
--
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]