You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2020/07/17 12:24:40 UTC

[maven-resources-plugin] branch master updated: [MRESOURCES-257] property from list element in pom model - Added an IT to verify that this has been solved.

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 4b46898  [MRESOURCES-257] property from list element in pom model - Added an IT to verify that this has been solved.
4b46898 is described below

commit 4b468985e02465f9991a2d14ce7f3e4b2e611091
Author: Dennis Lundberg <de...@apache.org>
AuthorDate: Fri Jul 17 14:24:19 2020 +0200

    [MRESOURCES-257] property from list element in pom model
    - Added an IT to verify that this has been solved.
---
 src/it/MRESOURCES-257/pom.xml                     | 75 +++++++++++++++++++++++
 src/it/MRESOURCES-257/src/main/resources/test.txt | 22 +++++++
 src/it/MRESOURCES-257/verify.groovy               | 23 +++++++
 3 files changed, 120 insertions(+)

diff --git a/src/it/MRESOURCES-257/pom.xml b/src/it/MRESOURCES-257/pom.xml
new file mode 100644
index 0000000..faa2990
--- /dev/null
+++ b/src/it/MRESOURCES-257/pom.xml
@@ -0,0 +1,75 @@
+<?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.maven-resources-plugin.its</groupId>
+  <artifactId>MRESOURCES-257</artifactId>
+  <name>Bug Test</name>
+  <version>0.0.1-SNAPSHOT</version>
+
+  <organization>
+    <name>orga</name>
+  </organization>
+
+  <description>This is a minimal description
+    of the project developed by ${project.developers[0].email}
+  </description>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <developers>
+    <developer>
+      <id>jdoe</id>
+      <name>John Doe</name>
+      <email>jdoe@example.com</email>
+      <url>http://www.example.com/jdoe</url>
+      <organization>ACME</organization>
+      <organizationUrl>http://www.example.com</organizationUrl>
+      <roles>
+        <role>architect</role>
+        <role>developer</role>
+      </roles>
+      <timezone>America/New_York</timezone>
+      <properties>
+        <picUrl>http://www.example.com/jdoe/pic</picUrl>
+      </properties>
+    </developer>
+  </developers>
+
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>@project.version@</version>
+      </plugin>
+    </plugins>
+  </build>
+</project>
+
diff --git a/src/it/MRESOURCES-257/src/main/resources/test.txt b/src/it/MRESOURCES-257/src/main/resources/test.txt
new file mode 100644
index 0000000..6f098c6
--- /dev/null
+++ b/src/it/MRESOURCES-257/src/main/resources/test.txt
@@ -0,0 +1,22 @@
+<!--
+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.
+-->
+
+to be filtered:
+does not work: ${project.developers[0].email}
+works: ${project.organization.name}
diff --git a/src/it/MRESOURCES-257/verify.groovy b/src/it/MRESOURCES-257/verify.groovy
new file mode 100644
index 0000000..dab0203
--- /dev/null
+++ b/src/it/MRESOURCES-257/verify.groovy
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+assert new File(basedir, 'target/classes/test.txt').exists();
+
+content = new File(basedir, 'target/classes/test.txt').text;
+assert content.contains( 'jdoe@example.com' );
+return true;