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

sjaranowski pushed a commit to branch maven-resources-plugin-3.x
in repository https://gitbox.apache.org/repos/asf/maven-resources-plugin.git


The following commit(s) were added to refs/heads/maven-resources-plugin-3.x by 
this push:
     new ad31b55  Add IT for #444 issue
ad31b55 is described below

commit ad31b557b0d30e3f7b42cfcc542e272f2570e10b
Author: Slawomir Jaranowski <[email protected]>
AuthorDate: Mon Dec 1 19:29:10 2025 +0100

    Add IT for #444 issue
    
    Try to reproduce reported issue #444
    As we don't have an IT with includes and filtering add one
---
 src/it/gh-444/pom.xml                       | 59 +++++++++++++++++++++++++++++
 src/it/gh-444/src/main/java/test.properties | 19 ++++++++++
 src/it/gh-444/src/main/java/test.txt        | 18 +++++++++
 src/it/gh-444/src/main/java/test.xml        | 22 +++++++++++
 src/it/gh-444/verify.groovy                 | 28 ++++++++++++++
 5 files changed, 146 insertions(+)

diff --git a/src/it/gh-444/pom.xml b/src/it/gh-444/pom.xml
new file mode 100644
index 0000000..10f4f0c
--- /dev/null
+++ b/src/it/gh-444/pom.xml
@@ -0,0 +1,59 @@
+<?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>gh-444</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0-SNAPSHOT</version>
+
+  <properties>
+    <cacheName>cacheNameValue</cacheName>
+  </properties>
+
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/java</directory>
+        <filtering>true</filtering>
+        <includes>
+          <include>**/*.properties</include>
+        </includes>
+      </resource>
+      <resource>
+        <directory>src/main/java</directory>
+        <includes>
+          <include>**/*.xml</include>
+        </includes>
+      </resource>
+    </resources>
+
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>@project.version@</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>
diff --git a/src/it/gh-444/src/main/java/test.properties 
b/src/it/gh-444/src/main/java/test.properties
new file mode 100644
index 0000000..c8895bc
--- /dev/null
+++ b/src/it/gh-444/src/main/java/test.properties
@@ -0,0 +1,19 @@
+# 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.version=${project.version}
+loginSession.refNoCl_cache=@cacheName@
diff --git a/src/it/gh-444/src/main/java/test.txt 
b/src/it/gh-444/src/main/java/test.txt
new file mode 100644
index 0000000..e11921f
--- /dev/null
+++ b/src/it/gh-444/src/main/java/test.txt
@@ -0,0 +1,18 @@
+# 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.
+
+Test text file.
diff --git a/src/it/gh-444/src/main/java/test.xml 
b/src/it/gh-444/src/main/java/test.xml
new file mode 100644
index 0000000..8fe9f4c
--- /dev/null
+++ b/src/it/gh-444/src/main/java/test.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+<test>
+  <version>${project.version}</version>
+</test>
diff --git a/src/it/gh-444/verify.groovy b/src/it/gh-444/verify.groovy
new file mode 100644
index 0000000..74e26cc
--- /dev/null
+++ b/src/it/gh-444/verify.groovy
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+def propertiesFile = new File(basedir, 'target/classes/test.properties').text
+assert propertiesFile.contains('project.version=1.0-SNAPSHOT')
+assert propertiesFile.contains('loginSession.refNoCl_cache=cacheNameValue')
+
+def xmlFile = new File(basedir, 'target/classes/test.xml').text
+assert xmlFile.contains('<version>${project.version}</version>')
+
+def textFile = new File(basedir, 'target/classes/test.txt')
+assert !textFile.exists()

Reply via email to