michael-o commented on code in PR #67:
URL: https://github.com/apache/maven-jar-plugin/pull/67#discussion_r1557063948


##########
src/it/MJAR-296-exclude-default/setup.groovy:
##########
@@ -0,0 +1,29 @@
+import java.nio.file.Files
+import java.nio.file.Paths
+
+/*
+ * 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.
+ */
+
+// excluded files are not copied by m-invoker-p - so we need create one
+
+def resDir = basedir.toPath().resolve("src/main/resources")
+Files.createDirectories(resDir)
+Files.createFile(resDir.resolve(".cvsignore"))
+
+return true

Review Comment:
   Why not simply add them to revision control instead of creating them?



##########
src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java:
##########
@@ -169,6 +170,38 @@ public abstract class AbstractJarMojo extends AbstractMojo 
{
     @Parameter(property = "maven.jar.detectMultiReleaseJar", defaultValue = 
"true")
     private boolean detectMultiReleaseJar;
 
+    /**
+     * If set to {@code false}, the files that by default are excluded from 
the resulting archive,

Review Comment:
   files and directories



##########
src/it/MJAR-296-exclude-default/pom.xml:
##########
@@ -0,0 +1,58 @@
+<?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/maven-v4_0_0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins</groupId>
+  <artifactId>mjar-296-exclude-default</artifactId>
+  <name>mjar-296-suppress-default-excludes</name>
+  <description>Verifies that the resulting jar not includes files excluded by 
default</description>
+  <packaging>jar</packaging>
+  <version>1.0-SNAPSHOT</version>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    
<project.build.outputTimestamp>2023-11-19T13:25:58Z</project.build.outputTimestamp>
+  </properties>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>@version.maven-resources-plugin@</version>
+          <configuration>
+            <addDefaultExcludes>false</addDefaultExcludes>

Review Comment:
   I wonder why this is `false`, but the `.cvsignore` is excluded`



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