This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-resources-plugin.git
commit 6f2218559f25f194c8d00788b3878b9373d313c6 Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Thu Nov 26 06:52:43 2026 +0000 Remove ITs covered by unit tests and an unused IT hook profile-override/prebuild.groovy never ran: the configured pre-build hook is named setup. The IT keeps passing without it. --- src/it/MRESOURCES-105/my.properties | 19 ------- src/it/MRESOURCES-105/pom.xml | 55 -------------------- .../src/main/resources/test.properties | 22 -------- src/it/MRESOURCES-105/verify.groovy | 30 ----------- src/it/MRESOURCES-106/pom.xml | 48 ----------------- src/it/MRESOURCES-106/src/main/resources/file.txt | 18 ------- .../src/main/resources/filter.properties | 19 ------- src/it/MRESOURCES-106/verify.groovy | 37 ------------- src/it/MRESOURCES-231/pom.xml | 48 ----------------- src/it/MRESOURCES-231/src/main/resources/test.txt | 20 -------- src/it/MRESOURCES-231/verify.groovy | 23 --------- src/it/MRESOURCES-99/pom.xml | 49 ------------------ .../src/main/resources/SomeResource.txt | 28 ---------- src/it/MRESOURCES-99/verify.groovy | 60 ---------------------- src/it/profile-override/prebuild.groovy | 27 ---------- 15 files changed, 503 deletions(-) diff --git a/src/it/MRESOURCES-105/my.properties b/src/it/MRESOURCES-105/my.properties deleted file mode 100644 index 207f663..0000000 --- a/src/it/MRESOURCES-105/my.properties +++ /dev/null @@ -1,19 +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. - -test.value=true -toto.value=foo diff --git a/src/it/MRESOURCES-105/pom.xml b/src/it/MRESOURCES-105/pom.xml deleted file mode 100644 index f5929fe..0000000 --- a/src/it/MRESOURCES-105/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?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-105</artifactId> - <name>Bug Test</name> - <version>0.0.1-SNAPSHOT</version> - <build> - <resources> - <resource> - <directory>src/main/resources</directory> - <filtering>true</filtering> - </resource> - </resources> - <filters> - <filter>my.properties</filter> - </filters> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-resources-plugin</artifactId> - <version>@project.version@</version> - <configuration> - <delimiters> - <delimiter>$</delimiter> - <delimiter>@</delimiter> - <delimiter>#</delimiter> - <delimiter>${*}</delimiter> - </delimiters> - <useDefaultDelimiters>false</useDefaultDelimiters> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - </plugins> - </build> -</project> \ No newline at end of file diff --git a/src/it/MRESOURCES-105/src/main/resources/test.properties b/src/it/MRESOURCES-105/src/main/resources/test.properties deleted file mode 100644 index 9903054..0000000 --- a/src/it/MRESOURCES-105/src/main/resources/test.properties +++ /dev/null @@ -1,22 +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. - -#init test value (true|false) LINE IS essential for this bug report.# -toto.value=$toto.value$ -test.value=#test.value# [email protected]@ -test.value=${test.value} diff --git a/src/it/MRESOURCES-105/verify.groovy b/src/it/MRESOURCES-105/verify.groovy deleted file mode 100644 index 6c19b9d..0000000 --- a/src/it/MRESOURCES-105/verify.groovy +++ /dev/null @@ -1,30 +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. - */ - -def lines = new File(basedir, 'target/classes/test.properties').readLines() - -// the first line has to survive: it is the reason for the bug report -assert lines.contains('#init test value (true|false) LINE IS essential for this bug report.#') -// $toto.value$ is replaced -assert lines.contains('toto.value=foo') -// #test.value# and @test.value@ are replaced; ${test.value} is not, because the $ delimiter takes its -// opening $ and finds no closing $ on the line (#572) -assert lines.findAll { - it.startsWith('test.value=') -} == ['test.value=true', 'test.value=true', 'test.value=${test.value}'] diff --git a/src/it/MRESOURCES-106/pom.xml b/src/it/MRESOURCES-106/pom.xml deleted file mode 100644 index 09210bb..0000000 --- a/src/it/MRESOURCES-106/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?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>MSHARED-106</artifactId> - <packaging>jar</packaging> - <version>1.0-SNAPSHOT</version> - - <build> - <resources> - <resource> - <directory>src/main/resources</directory> - <filtering>true</filtering> - </resource> - </resources> - <plugins> - <plugin> - <artifactId>maven-resources-plugin</artifactId> - <version>@project.version@</version> - </plugin> - </plugins> - </build> - - <properties> - <location>${basedir}/src/main/resources/file.txt</location> - </properties> - -</project> diff --git a/src/it/MRESOURCES-106/src/main/resources/file.txt b/src/it/MRESOURCES-106/src/main/resources/file.txt deleted file mode 100644 index 7d765fa..0000000 --- a/src/it/MRESOURCES-106/src/main/resources/file.txt +++ /dev/null @@ -1,18 +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. - -Dummy content diff --git a/src/it/MRESOURCES-106/src/main/resources/filter.properties b/src/it/MRESOURCES-106/src/main/resources/filter.properties deleted file mode 100644 index 3ff12b7..0000000 --- a/src/it/MRESOURCES-106/src/main/resources/filter.properties +++ /dev/null @@ -1,19 +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. - -location=${location} -basedir=${basedir} diff --git a/src/it/MRESOURCES-106/verify.groovy b/src/it/MRESOURCES-106/verify.groovy deleted file mode 100644 index 88c7214..0000000 --- a/src/it/MRESOURCES-106/verify.groovy +++ /dev/null @@ -1,37 +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. - */ - -File target = new File(basedir, "target") -assert target.isDirectory() : "target file is missing or a directory." - -File someResource = new File( target, "/classes/filter.properties" ) -assert someResource.isFile() : "file.txt is missing or not a file." - -Properties p = new Properties() -someResource.withInputStream { p.load( it ) } - -File f = new File( p.getProperty( "location" ) ) -assert f.exists() : "Property was not correctly filtered: " + f + "\n" + f.getAbsolutePath() - -File filteredBasedir = new File( p.getProperty( "basedir" ) ) -assert filteredBasedir.exists() : "Property was not correctly filtered: " + filteredBasedir + "\n" + filteredBasedir.getAbsolutePath() - -File expectedLocation = new File( filteredBasedir, "src/main/resources/file.txt" ) -assert expectedLocation.equals( f ) : "Files doesn't match:\n" + filteredBasedir + "\n" + expectedLocation diff --git a/src/it/MRESOURCES-231/pom.xml b/src/it/MRESOURCES-231/pom.xml deleted file mode 100644 index b420f4c..0000000 --- a/src/it/MRESOURCES-231/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?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-231</artifactId> - <name>Bug Test</name> - <version>0.0.1-SNAPSHOT</version> - <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> - <configuration> - <escapeString>∅</escapeString> - </configuration> - </plugin> - </plugins> - </build> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> -</project> diff --git a/src/it/MRESOURCES-231/src/main/resources/test.txt b/src/it/MRESOURCES-231/src/main/resources/test.txt deleted file mode 100644 index 4fca97b..0000000 --- a/src/it/MRESOURCES-231/src/main/resources/test.txt +++ /dev/null @@ -1,20 +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. ---> - -something\with\default\escape\string\and\a\property\like\${project.build.sourceEncoding}\in\between diff --git a/src/it/MRESOURCES-231/verify.groovy b/src/it/MRESOURCES-231/verify.groovy deleted file mode 100644 index 6a1c148..0000000 --- a/src/it/MRESOURCES-231/verify.groovy +++ /dev/null @@ -1,23 +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. - */ -assert new File(basedir, 'target/classes/test.txt').exists() - -content = new File(basedir, 'target/classes/test.txt').text -assert content.contains('something\\with\\default\\escape\\string\\and\\a\\property\\like\\UTF-8\\in\\between') -return true diff --git a/src/it/MRESOURCES-99/pom.xml b/src/it/MRESOURCES-99/pom.xml deleted file mode 100644 index b9320d7..0000000 --- a/src/it/MRESOURCES-99/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?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>maven-resources-plugin-it-filter</artifactId> - <packaging>jar</packaging> - <version>1.0-SNAPSHOT</version> - - <properties> - <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'</maven.build.timestamp.format> - </properties> - <build> - <resources> - <resource> - <directory>src/main/resources</directory> - <filtering>true</filtering> - </resource> - </resources> - <pluginManagement> - <plugins> - <plugin> - <artifactId>maven-resources-plugin</artifactId> - <version>@project.version@</version> - </plugin> - </plugins> - </pluginManagement> - </build> - -</project> diff --git a/src/it/MRESOURCES-99/src/main/resources/SomeResource.txt b/src/it/MRESOURCES-99/src/main/resources/SomeResource.txt deleted file mode 100644 index 74a7ae9..0000000 --- a/src/it/MRESOURCES-99/src/main/resources/SomeResource.txt +++ /dev/null @@ -1,28 +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. - -timestamp=${maven.build.timestamp} [email protected]@ -build.timestamp=${build.timestamp} -project.build.timestamp=${project.build.timestamp} -baseUri=${baseUri} -project.baseUri=${project.baseUri} -pom.baseUri=${pom.baseUri} -at.baseUri=@baseUri@ -groupId=${project.groupId} -basedir=${basedir} -project.basedir=${project.basedir} diff --git a/src/it/MRESOURCES-99/verify.groovy b/src/it/MRESOURCES-99/verify.groovy deleted file mode 100644 index 59da17c..0000000 --- a/src/it/MRESOURCES-99/verify.groovy +++ /dev/null @@ -1,60 +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. - */ - -def resource = new File(basedir, 'target/classes/SomeResource.txt') -assert resource.isFile() : 'target/classes/SomeResource.txt is missing' - -def props = new Properties() -resource.withReader('ISO-8859-1') { reader -> props.load(reader) } - -// each of these keys has to be present in the filtered file -def keysWhichHaveToExist = [ - 'timestamp', - 'at.timestamp', - 'build.timestamp', - 'project.build.timestamp', - 'baseUri', - 'project.baseUri', - 'pom.baseUri', - 'at.baseUri', - 'groupId', - 'basedir', - 'project.basedir', -] -for (key in keysWhichHaveToExist) { - assert props.containsKey(key) : "Missing the key '${key}'" -} - -// ${maven.build.timestamp} and @maven.build.timestamp@ are replaced by the plugin -def timestampFormat = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z/ -assert props['timestamp'] ==~ timestampFormat : "\${maven.build.timestamp} was not replaced: ${props['timestamp']}" -assert props['at.timestamp'] == props['timestamp'] : "@maven.build.timestamp@ was not replaced the same way: ${props['at.timestamp']}" - -// only these expressions are replaced -assert props['project.baseUri'] == basedir.getAbsoluteFile().toURI().toString() -assert props['groupId'] == 'org.apache.maven.plugins' -assert props['basedir'] == basedir.getAbsolutePath() -assert props['project.basedir'] == basedir.getAbsolutePath() - -// these have no value in the filtering context and stay as they are -assert props['build.timestamp'] == '${build.timestamp}' -assert props['project.build.timestamp'] == '${project.build.timestamp}' -assert props['baseUri'] == '${baseUri}' -assert props['pom.baseUri'] == '${pom.baseUri}' -assert props['at.baseUri'] == '@baseUri@' diff --git a/src/it/profile-override/prebuild.groovy b/src/it/profile-override/prebuild.groovy deleted file mode 100644 index ebc74ae..0000000 --- a/src/it/profile-override/prebuild.groovy +++ /dev/null @@ -1,27 +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. - */ - -import java.io.* - -import org.codehaus.plexus.util.* - -File conf = new File(basedir, "src/main/resources/test/config.properties") -conf.setLastModified(System.currentTimeMillis()) -
