Skip to content

Commit 4b46898

Browse files
committed
[MRESOURCES-257] property from list element in pom model
- Added an IT to verify that this has been solved.
1 parent a2fb8d4 commit 4b46898

File tree

3 files changed

+120
-0
lines changed

3 files changed

+120
-0
lines changed

src/it/MRESOURCES-257/pom.xml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!--
4+
Licensed to the Apache Software Foundation (ASF) under one
5+
or more contributor license agreements. See the NOTICE file
6+
distributed with this work for additional information
7+
regarding copyright ownership. The ASF licenses this file
8+
to you under the Apache License, Version 2.0 (the
9+
"License"); you may not use this file except in compliance
10+
with the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
-->
21+
<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">
22+
<modelVersion>4.0.0</modelVersion>
23+
<groupId>org.apache.maven.plugins.maven-resources-plugin.its</groupId>
24+
<artifactId>MRESOURCES-257</artifactId>
25+
<name>Bug Test</name>
26+
<version>0.0.1-SNAPSHOT</version>
27+
28+
<organization>
29+
<name>orga</name>
30+
</organization>
31+
32+
<description>This is a minimal description
33+
of the project developed by ${project.developers[0].email}
34+
</description>
35+
36+
<properties>
37+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38+
</properties>
39+
40+
<developers>
41+
<developer>
42+
<id>jdoe</id>
43+
<name>John Doe</name>
44+
<email>[email protected]</email>
45+
<url>http://www.example.com/jdoe</url>
46+
<organization>ACME</organization>
47+
<organizationUrl>http://www.example.com</organizationUrl>
48+
<roles>
49+
<role>architect</role>
50+
<role>developer</role>
51+
</roles>
52+
<timezone>America/New_York</timezone>
53+
<properties>
54+
<picUrl>http://www.example.com/jdoe/pic</picUrl>
55+
</properties>
56+
</developer>
57+
</developers>
58+
59+
<build>
60+
<resources>
61+
<resource>
62+
<directory>src/main/resources</directory>
63+
<filtering>true</filtering>
64+
</resource>
65+
</resources>
66+
<plugins>
67+
<plugin>
68+
<groupId>org.apache.maven.plugins</groupId>
69+
<artifactId>maven-resources-plugin</artifactId>
70+
<version>@project.version@</version>
71+
</plugin>
72+
</plugins>
73+
</build>
74+
</project>
75+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
20+
to be filtered:
21+
does not work: ${project.developers[0].email}
22+
works: ${project.organization.name}

src/it/MRESOURCES-257/verify.groovy

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
assert new File(basedir, 'target/classes/test.txt').exists();
20+
21+
content = new File(basedir, 'target/classes/test.txt').text;
22+
assert content.contains( '[email protected]' );
23+
return true;

0 commit comments

Comments
 (0)