Copilot commented on code in PR #11029:
URL: https://github.com/apache/maven/pull/11029#discussion_r3470355291


##########
impl/maven-classworlds/src/main/java/org/codehaus/plexus/classworlds/launcher/ConfigurationException.java:
##########
@@ -0,0 +1,66 @@
+/*
+ * 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.codehaus.plexus.classworlds.launcher;
+
+/*
+ * Copyright 2001-2006 Codehaus Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * Indicates an error during <code>Launcher</code> configuration.
+ *
+ * @author <a href="mailto:[email protected]";>bob mcwhirter</a>
+ */
+public class ConfigurationException extends Exception {
+    /**
+     * Construct.
+     *
+     * @param msg The message.
+     */
+    public ConfigurationException(String msg) {
+        super(msg);
+    }
+
+    /**
+     * Construct.
+     *
+     * @param msg    The message.
+     * @param lineNo The number of configuraton line where the problem occured.
+     * @param line   The configuration line where the problem occured.

Review Comment:
   Spelling in Javadoc: "configuraton" and "occured" should be "configuration" 
and "occurred".



##########
apache-maven/src/main/appended-resources/META-INF/LICENSE.vm:
##########
@@ -270,9 +270,13 @@ subject to the terms and conditions of the following 
licenses:
 #*    *##end ##
 #*    *###
 #*    *### Classworlds is in boot directory, not in lib
-#*    *##if ( $project.artifact.artifactId == "plexus-classworlds" )
+#*    *##if ( $project.artifact.artifactId == "maven-classworlds" )

Review Comment:
   `maven-api-classworlds` is also assembled into the `boot/` directory (see 
assembly/component.xml), but this template only special-cases 
`maven-classworlds`. That will generate an incorrect path/license filename for 
`maven-api-classworlds` (it will be listed under `lib/`).



##########
impl/maven-classworlds/pom.xml:
##########
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.maven</groupId>
+    <artifactId>maven-impl-modules</artifactId>
+    <version>4.1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>maven-classworlds</artifactId>
+  <packaging>jar</packaging>
+
+  <name>Maven 4 Classworlds</name>
+  <description>A class loader framework</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-api-annotations</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-api-classworlds</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude>src/test/test-data/**</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <excludes>org/codehaus/classworlds/**</excludes>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              
<mainClass>org.codehaus.plexus.classworlds.launcher.Launcher</mainClass>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <redirectTestOutputToFile>true</redirectTestOutputToFile>
+          
<argLine>-ea:org.codehaus.classworlds:org.codehaus.plexus.classworlds</argLine>

Review Comment:
   The `-ea` JVM option syntax here is invalid: `-ea` accepts at most one 
target after the first colon. As written, assertions will not be enabled as 
intended (and may be ignored). Use plain `-ea` or multiple `-ea:<pkg>...` 
options separated by spaces.



##########
apache-maven/src/assembly/component.xml:
##########
@@ -23,14 +23,25 @@ under the License.
       <useProjectArtifact>false</useProjectArtifact>
       <outputDirectory>boot</outputDirectory>
       <includes>
-        <include>org.codehaus.plexus:plexus-classworlds</include>
+        <include>org.apache.maven:maven-api-classworlds</include>
+        <include>org.apache.maven:maven-classworlds</include>
       </includes>
     </dependencySet>
+
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+      <outputDirectory>lib/modules</outputDirectory>
+      <includes>
+        <include>org.jline:*</include>
+      </includes>
+    </dependencySet>
+
     <dependencySet>
       <useProjectArtifact>false</useProjectArtifact>
       <outputDirectory>lib</outputDirectory>
       <excludes>
-        <exclude>org.codehaus.plexus:plexus-classworlds</exclude>
+        <exclude>org.apache.maven:maven-api-classworlds</exclude>
+        <exclude>org.apache.maven:maven-classworlds</exclude>
       </excludes>

Review Comment:
   `org.jline:*` artifacts are included both in `lib/modules` (second 
dependencySet) and again in `lib` (third dependencySet has no `org.jline:*` 
exclusion). Because `m2.conf` still loads `${maven.home}/lib/*.jar`, JLine will 
remain on the classpath, which defeats the goal of loading it as named modules 
for targeted `--enable-native-access`.



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