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 9901191193bc9f52fed4587b77b6971a06640c3d Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Wed Nov 25 22:31:05 2026 +0000 Format Groovy IT scripts Formatting only: the CONVERSION-phase AST of every file is unchanged. See https://github.com/apache/maven-invoker-plugin/issues/811. --- src/it/MRESOURCES-105/verify.groovy | 4 +++- src/it/MRESOURCES-106/verify.groovy | 12 ++++++------ src/it/MRESOURCES-231/verify.groovy | 8 ++++---- src/it/MRESOURCES-99/verify.groovy | 14 +++++++++++--- src/it/profile-override/prebuild.groovy | 8 ++++---- src/it/profile-override/verify.groovy | 6 +++--- src/it/user-filters/verify.groovy | 12 ++++++------ 7 files changed, 37 insertions(+), 27 deletions(-) diff --git a/src/it/MRESOURCES-105/verify.groovy b/src/it/MRESOURCES-105/verify.groovy index e1f5a3c..6c19b9d 100644 --- a/src/it/MRESOURCES-105/verify.groovy +++ b/src/it/MRESOURCES-105/verify.groovy @@ -25,4 +25,6 @@ assert lines.contains('#init test value (true|false) LINE IS essential for this 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}'] +assert lines.findAll { + it.startsWith('test.value=') +} == ['test.value=true', 'test.value=true', 'test.value=${test.value}'] diff --git a/src/it/MRESOURCES-106/verify.groovy b/src/it/MRESOURCES-106/verify.groovy index f02012f..88c7214 100644 --- a/src/it/MRESOURCES-106/verify.groovy +++ b/src/it/MRESOURCES-106/verify.groovy @@ -18,20 +18,20 @@ * under the License. */ -File target = new File( basedir, "target" ); +File target = new File(basedir, "target") assert target.isDirectory() : "target file is missing or a directory." -File someResource = new File( target, "/classes/filter.properties" ); +File someResource = new File( target, "/classes/filter.properties" ) assert someResource.isFile() : "file.txt is missing or not a file." -Properties p = new Properties(); +Properties p = new Properties() someResource.withInputStream { p.load( it ) } -File f = new File( p.getProperty( "location" ) ); +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" ) ); +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" ); +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/verify.groovy b/src/it/MRESOURCES-231/verify.groovy index b85a00b..6a1c148 100644 --- a/src/it/MRESOURCES-231/verify.groovy +++ b/src/it/MRESOURCES-231/verify.groovy @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -assert new File(basedir, 'target/classes/test.txt').exists(); +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; +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/verify.groovy b/src/it/MRESOURCES-99/verify.groovy index 1c7bf5d..59da17c 100644 --- a/src/it/MRESOURCES-99/verify.groovy +++ b/src/it/MRESOURCES-99/verify.groovy @@ -25,9 +25,17 @@ 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', + '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}'" diff --git a/src/it/profile-override/prebuild.groovy b/src/it/profile-override/prebuild.groovy index 18fb7af..ebc74ae 100644 --- a/src/it/profile-override/prebuild.groovy +++ b/src/it/profile-override/prebuild.groovy @@ -18,10 +18,10 @@ * under the License. */ -import java.io.*; +import java.io.* -import org.codehaus.plexus.util.*; +import org.codehaus.plexus.util.* -File conf = new File( basedir, "src/main/resources/test/config.properties" ); -conf.setLastModified( System.currentTimeMillis() ); +File conf = new File(basedir, "src/main/resources/test/config.properties") +conf.setLastModified(System.currentTimeMillis()) diff --git a/src/it/profile-override/verify.groovy b/src/it/profile-override/verify.groovy index ebc9a58..9a28674 100644 --- a/src/it/profile-override/verify.groovy +++ b/src/it/profile-override/verify.groovy @@ -18,12 +18,12 @@ * under the License. */ -File target = new File( basedir, "target" ); +File target = new File(basedir, "target") assert target.isDirectory() : "target file is missing or a directory." -File someResource = new File( target, "/classes/config.properties" ); +File someResource = new File( target, "/classes/config.properties" ) assert someResource.isFile() : "config.properties is missing or not a file." -String paramContent = someResource.getText( 'UTF-8' ); +String paramContent = someResource.getText( 'UTF-8' ) assert paramContent.contains( "env=production" ) : "config.properties not contains env=production" diff --git a/src/it/user-filters/verify.groovy b/src/it/user-filters/verify.groovy index 3749dc5..b7c1b92 100644 --- a/src/it/user-filters/verify.groovy +++ b/src/it/user-filters/verify.groovy @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -assert new File(basedir, 'target/classes/foo.txt').exists(); +assert new File(basedir, 'target/classes/foo.txt').exists() -content = new File(basedir, 'target/classes/foo.txt').text; -assert content.contains( 'foo'); -assert content.contains( 'version=1.0.16-SNAPSHOT'); -assert content.contains( 'toto=titi'); +content = new File(basedir, 'target/classes/foo.txt').text +assert content.contains('foo') +assert content.contains('version=1.0.16-SNAPSHOT') +assert content.contains('toto=titi') -return true; \ No newline at end of file +return true \ No newline at end of file
