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


##########
src/main/java/org/apache/maven/plugins/jar/DirectoryRole.java:
##########
@@ -0,0 +1,73 @@
+/*
+ * 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;
+
+/**
+ * Directories that the archiver needs to handle in a special way.
+ */
+enum DirectoryRole {
+    /**
+     * The root directory. This is usually {@code "target/classes"}.
+     * The next locations can be {@link #META_INF}, {@link #NAMED_MODULE} or 
{@link #RESOURCES}.
+     */
+    ROOT,
+
+    /**
+     * The {@code "META-INF"} or {@code "<module>/META-INF"} directory.
+     * This is part of the <abbr>JAR</abbr> specification.
+     * The next locations can be {@link #VERSIONS} or {@link 
#VERSIONS_MODULAR}.
+     */
+    META_INF,
+
+    /**
+     * The {@code "META-INF/versions"} or {@code "<module>/META-INF/versions"} 
directory.
+     * This is part of the <abbr>JAR</abbr> specification, except the {@code 
<module>} prefix.
+     * The sub-directories are named according to Java releases such as "21".
+     * The next location can only be {@link #RESOURCES}.
+     */
+    VERSIONS,
+
+    /**
+     * The Maven-specific {@code "META-INF/versions-modular"} directory.
+     * {@code "<module>/META-INF/versions-modular"} is not forbidden, but does 
not make sense.
+     * The sub-directories are named according to Java releases such as "21".
+     * The next location can only be {@link #MODULES}.
+     */
+    VERSIONS_MODULAR,
+
+    /**
+     * The Maven-specific {@code "META-INF/versions-modular"} directory.

Review Comment:
   Indeed, it was a documentation issue. Replaced by "A directory other than 
the root directory which contains many modules. This is typically a 
`META-INF/versions-modular/<n>` directory containing all modules for Java 
version _n_."



-- 
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