This is an automated email from the ASF dual-hosted git repository.

pottlinger pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/creadur-rat.git


The following commit(s) were added to refs/heads/master by this push:
     new 5fa60d9c Revert "Using the JWI Groovy Maven plugin to add 
RELEASE_NOTES.txt to the apache-rat-core jar file."
5fa60d9c is described below

commit 5fa60d9c84392a926babd32fef520fd919288e42
Author: P. Ottlinger <[email protected]>
AuthorDate: Sun Dec 1 23:15:28 2024 +0100

    Revert "Using the JWI Groovy Maven plugin to add RELEASE_NOTES.txt to the 
apache-rat-core jar file."
    
    This reverts commit 3d514a3230e79c0095bab1776be206dfe718be67.
    
    Fix the build.
---
 apache-rat-core/pom.xml                            | 36 +++----------
 .../main/build-grv/copyResourcesFromParent.groovy  | 59 ----------------------
 apache-rat-plugin/pom.xml                          | 13 ++---
 apache-rat-tasks/pom.xml                           | 13 ++---
 apache-rat-tools/pom.xml                           | 13 ++---
 apache-rat/pom.xml                                 | 17 ++++---
 6 files changed, 39 insertions(+), 112 deletions(-)

diff --git a/apache-rat-core/pom.xml b/apache-rat-core/pom.xml
index 1d41667a..8a500a5f 100644
--- a/apache-rat-core/pom.xml
+++ b/apache-rat-core/pom.xml
@@ -36,6 +36,13 @@
         <filtering>true</filtering>
         <directory>src/main/filtered-resources</directory>
       </resource>
+      <resource>
+        <directory>..</directory>
+        <targetPath>META-INF</targetPath>
+        <includes>
+          <include>RELEASE_NOTES.txt</include>
+        </includes>
+      </resource>
     </resources>
     <pluginManagement>
       <plugins>
@@ -44,12 +51,6 @@
           <artifactId>apache-rat-plugin</artifactId>
           <configuration>
             <excludes>
-              <!-- Generated by Eclipse, thus ignorable. -->
-              <exclude>.classpath</exclude>
-              <exclude>.project</exclude>
-              <exclude>.settings/**/*</exclude>
-              <exclude>bin/**/*</exclude>
-
               <!-- These files have bad license headers because they are used 
to test bad license headers -->
               <exclude>src/test/resources/**</exclude>
               <exclude>src/it/resources/ReportTest/**</exclude>
@@ -135,29 +136,6 @@
           </execution>
         </executions>
       </plugin>
-     <plugin>
-       <groupId>com.github.jochenw.jmp</groupId>
-       <artifactId>jwigrv-maven-plugin</artifactId>
-       <version>0.1</version>
-       <executions>
-         <execution>
-           <!-- Copy a set of resource files from the parent project to 
target/classes/META-INF,
-             so that they become a part of the generated jar file. See RAT-379.
-           -->
-           <phase>generate-resources</phase>
-           <goals><goal>run</goal></goals>
-           <configuration>
-            
<scriptFile>src/main/build-grv/copyResourcesFromParent.groovy</scriptFile>
-            <scriptProperties>
-              <sourceDir>${basedir}/..</sourceDir>
-              <targetDir>${project.build.outputDirectory}/META-INF</targetDir>
-              <!-- Comma separated list of files, which are being copied -->
-              <filesToCopy>RELEASE_NOTES.txt</filesToCopy>
-            </scriptProperties>
-           </configuration> 
-         </execution>
-       </executions>
-     </plugin> 
     </plugins>
   </build>
   <dependencies>
diff --git a/apache-rat-core/src/main/build-grv/copyResourcesFromParent.groovy 
b/apache-rat-core/src/main/build-grv/copyResourcesFromParent.groovy
deleted file mode 100644
index 8e54ca63..00000000
--- a/apache-rat-core/src/main/build-grv/copyResourcesFromParent.groovy
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.
- */
-
-// Copy a set of resource files from the parent project to 
target/classes/META-INF,
-// so that they become a part of the generated jar file. See RAT-379.
-
-import java.io.FileNotFoundException;
-import java.nio.file.attribute.FileTime;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
-final Path sourceDir = Paths.get("${sourceDir}");
-final Path targetDir = Paths.get("${targetDir}");
-if (!Files.isDirectory(sourceDir)) {
-       final String msg = "Source directory not found: " + 
sourceDir.toAbsolutePath();
-       log.error(msg);
-       throw new FileNotFoundException(msg);
-}
-log.debug("copyResourcesFromParent: Using source directory " + sourceDir + ", 
resolved to " + sourceDir.toAbsolutePath());
-log.debug("copyResourcesFromParent: Using target directory " + targetDir + ", 
resolved to " + targetDir.toAbsolutePath());
-Files.createDirectories(targetDir);
-for (StringTokenizer st = new StringTokenizer("${filesToCopy}",  ",");  
st.hasMoreTokens();  ) {
-       final String token = st.nextToken();
-       final Path sourceFile = sourceDir.resolve(token);
-       if (!Files.isRegularFile(sourceFile)) {
-               final String msg = "Source file " + token + " not found in 
source directory " + sourceDir;
-               log.error("copyResourcesFromParent: " + msg);
-               log.error("copyResourcesFromParent: A possible reason is, that 
you did clone only the apache-rat-core subproject from Git.");
-           throw new FileNotFoundException(msg);
-       }
-       final Path targetFile = targetDir.resolve(token);
-       if (Files.isRegularFile(targetFile)) {
-               final FileTime sourceTime = 
Files.getLastModifiedTime(sourceFile);
-               final FileTime targetTime = 
Files.getLastModifiedTime(targetFile);
-               if (sourceTime != null  &&  targetTime != null  &&  
sourceTime.compareTo(targetTime) >= 0) {
-                       log.debug("copyResourcesFromParent: Skipping source 
file "
-                                 + sourceFile + ", because target file " + 
targetFile + " appears to be uptodate.");
-                       continue;
-           }
-       }
-       log.debug("copyResourcesFromParent: Copying source file " + sourceFile
-                 + " to target file " + targetFile);
-       Files.copy(sourceFile, targetFile);
-}
\ No newline at end of file
diff --git a/apache-rat-plugin/pom.xml b/apache-rat-plugin/pom.xml
index 02e0000d..739982a2 100644
--- a/apache-rat-plugin/pom.xml
+++ b/apache-rat-plugin/pom.xml
@@ -46,6 +46,13 @@
         <filtering>true</filtering>
         <directory>src/main/filtered-resources</directory>
       </resource>
+      <resource>
+        <directory>..</directory>
+        <targetPath>META-INF</targetPath>
+        <includes>
+          <include>RELEASE_NOTES.txt</include>
+        </includes>
+      </resource>
     </resources>
     <testResources>
       <testResource>
@@ -85,12 +92,6 @@
           <artifactId>apache-rat-plugin</artifactId>
           <configuration>
             <excludes>
-              <!-- Generated by Eclipse, thus ignorable. -->
-              <exclude>.classpath</exclude>
-              <exclude>.project</exclude>
-              <exclude>.settings/**/*</exclude>
-              <exclude>bin/**/*</exclude>
-
               <!-- These files do not have license headers because they are 
used to test license headers -->
               <exclude>src/it/**</exclude>
               <exclude>src/it/**/src.apt</exclude>
diff --git a/apache-rat-tasks/pom.xml b/apache-rat-tasks/pom.xml
index 28eb901e..32f7b5d7 100644
--- a/apache-rat-tasks/pom.xml
+++ b/apache-rat-tasks/pom.xml
@@ -82,6 +82,13 @@
         <filtering>true</filtering>
         <directory>src/main/filtered-resources</directory>
       </resource>
+      <resource>
+        <directory>..</directory>
+        <targetPath>META-INF</targetPath>
+        <includes>
+          <include>RELEASE_NOTES.txt</include>
+        </includes>
+      </resource>
     </resources>
     <plugins>
       <plugin>
@@ -235,12 +242,6 @@
           <artifactId>apache-rat-plugin</artifactId>
           <configuration>
             <excludes>
-              <!-- Generated by Eclipse, thus ignorable. -->
-              <exclude>.classpath</exclude>
-              <exclude>.project</exclude>
-              <exclude>.settings/**/*</exclude>
-              <exclude>bin/**/*</exclude>
-
               <!-- These files do not have license headers -->
               <exclude>src/test/resources/</exclude>
               <exclude>src/site/apt/*.txt</exclude>
diff --git a/apache-rat-tools/pom.xml b/apache-rat-tools/pom.xml
index 52e777ff..8ae90987 100644
--- a/apache-rat-tools/pom.xml
+++ b/apache-rat-tools/pom.xml
@@ -36,6 +36,13 @@
         <filtering>true</filtering>
         <directory>src/main/filtered-resources</directory>
       </resource>
+      <resource>
+        <directory>..</directory>
+        <targetPath>META-INF</targetPath>
+        <includes>
+          <include>RELEASE_NOTES.txt</include>
+        </includes>
+      </resource>
     </resources>
     <pluginManagement>
       <plugins>
@@ -44,12 +51,6 @@
           <artifactId>apache-rat-plugin</artifactId>
           <configuration>
             <excludes>
-              <!-- Generated by Eclipse, thus ignorable. -->
-              <exclude>.classpath</exclude>
-              <exclude>.project</exclude>
-              <exclude>.settings/**/*</exclude>
-              <exclude>bin/**/*</exclude>
-
               <!-- This file is included into a generated file. -->
               <exclude>src/main/resources/Args.tpl</exclude>
               <exclude>src/main/resources/ant/report.tpl</exclude>
diff --git a/apache-rat/pom.xml b/apache-rat/pom.xml
index 72e50296..55916e53 100644
--- a/apache-rat/pom.xml
+++ b/apache-rat/pom.xml
@@ -42,6 +42,17 @@
     </dependency>
   </dependencies>
   <build>
+    <resources>
+      <resource>
+        <directory>..</directory>
+        <targetPath>META-INF</targetPath>
+        <includes>
+          <include>RELEASE_NOTES.txt</include>
+          <include>LICENSE</include>
+          <include>NOTICE</include>
+        </includes>
+      </resource>
+    </resources>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
@@ -208,12 +219,6 @@
           <artifactId>apache-rat-plugin</artifactId>
           <configuration>
             <excludes>
-              <!-- Generated by Eclipse, thus ignorable. -->
-              <exclude>.classpath</exclude>
-              <exclude>.project</exclude>
-              <exclude>.settings/**/*</exclude>
-              <exclude>bin/**/*</exclude>
-
               <!-- These files only describe how to use the project and they
                    have no license headers -->
               <exclude>README-ANT.txt</exclude>

Reply via email to