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-install-plugin.git
commit f59b0b1a7da3775941d025f2e02650911e31e0c3 Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Wed Nov 25 23:10:24 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/install-at-end-default/verify.groovy | 4 ++-- src/it/install-at-end-fail/verify.groovy | 8 ++++---- src/it/install-at-end-pass/verify.groovy | 14 +++++++------- src/it/install-file-embedded-pom/verify.groovy | 10 +++++----- src/it/non-changed-artifact/verify.groovy | 10 +++++----- src/it/non-default-pom/setup.groovy | 6 +++--- src/it/non-default-pom/verify.groovy | 17 ++++++++--------- src/it/parallel-reactor-install/verify.groovy | 6 +++--- src/it/per-project-config/verify.groovy | 6 +++--- src/it/pom-packaged-project-installs-pom/setup.groovy | 4 ++-- src/it/pom-packaged-project-installs-pom/verify.groovy | 9 ++++----- 11 files changed, 46 insertions(+), 48 deletions(-) diff --git a/src/it/install-at-end-default/verify.groovy b/src/it/install-at-end-default/verify.groovy index dec0f6a..286e23c 100644 --- a/src/it/install-at-end-default/verify.groovy +++ b/src/it/install-at-end-default/verify.groovy @@ -17,9 +17,9 @@ * under the License. */ -File buildLog = new File( basedir, 'build.log' ) +File buildLog = new File(basedir, 'build.log') assert buildLog.exists() /* UNTIL MINSTALL-108 will be fixed the result * should not be <installAtEnd default-value="false">false</installAtEnd> */ -assert buildLog.text.contains ( '<installAtEnd default-value="false">true</installAtEnd>') +assert buildLog.text.contains('<installAtEnd default-value="false">true</installAtEnd>') diff --git a/src/it/install-at-end-fail/verify.groovy b/src/it/install-at-end-fail/verify.groovy index a2801f5..1c0dced 100644 --- a/src/it/install-at-end-fail/verify.groovy +++ b/src/it/install-at-end-fail/verify.groovy @@ -17,10 +17,10 @@ * under the License. */ -assert !( new File( basedir, "../../local-repo/org/apache/maven/its/install/dae/fail/dae/1.0/dae-1.0.pom" ).exists() ) -assert !( new File( basedir, "../../local-repo/org/apache/maven/its/install/dae/fail/module1/1.0/module1-1.0.pom" ).exists() ) +assert !(new File(basedir, "../../local-repo/org/apache/maven/its/install/dae/fail/dae/1.0/dae-1.0.pom").exists()) +assert !(new File(basedir, "../../local-repo/org/apache/maven/its/install/dae/fail/module1/1.0/module1-1.0.pom").exists()) -File buildLog = new File( basedir, 'build.log' ) +File buildLog = new File(basedir, 'build.log') assert buildLog.exists() -assert buildLog.text.contains( "[INFO] Deferring install for org.apache.maven.its.install.dae.fail:dae:1.0 at end" ) +assert buildLog.text.contains("[INFO] Deferring install for org.apache.maven.its.install.dae.fail:dae:1.0 at end") diff --git a/src/it/install-at-end-pass/verify.groovy b/src/it/install-at-end-pass/verify.groovy index 2d4ea4b..b2d9ef9 100644 --- a/src/it/install-at-end-pass/verify.groovy +++ b/src/it/install-at-end-pass/verify.groovy @@ -17,13 +17,13 @@ * under the License. */ -assert new File( basedir, "../../local-repo/org/apache/maven/its/install/dae/pass/dae/1.0/dae-1.0.pom" ).exists() -assert new File( basedir, "../../local-repo/org/apache/maven/its/install/dae/pass/module1/1.0/module1-1.0.pom" ).exists() -assert new File( basedir, "../../local-repo/org/apache/maven/its/install/dae/pass/module3/1.0/module3-1.0.pom" ).exists() +assert new File(basedir, "../../local-repo/org/apache/maven/its/install/dae/pass/dae/1.0/dae-1.0.pom").exists() +assert new File(basedir, "../../local-repo/org/apache/maven/its/install/dae/pass/module1/1.0/module1-1.0.pom").exists() +assert new File(basedir, "../../local-repo/org/apache/maven/its/install/dae/pass/module3/1.0/module3-1.0.pom").exists() -File buildLog = new File( basedir, 'build.log' ) +File buildLog = new File(basedir, 'build.log') assert buildLog.exists() -assert buildLog.text.contains( "[INFO] Deferring install for org.apache.maven.its.install.dae.pass:dae:1.0 at end" ) -assert buildLog.text.contains( "[INFO] Deferring install for org.apache.maven.its.install.dae.pass:module1:1.0 at end" ) -assert buildLog.text.contains( "[INFO] Deferring install for org.apache.maven.its.install.dae.pass:module3:1.0 at end" ) +assert buildLog.text.contains("[INFO] Deferring install for org.apache.maven.its.install.dae.pass:dae:1.0 at end") +assert buildLog.text.contains("[INFO] Deferring install for org.apache.maven.its.install.dae.pass:module1:1.0 at end") +assert buildLog.text.contains("[INFO] Deferring install for org.apache.maven.its.install.dae.pass:module3:1.0 at end") diff --git a/src/it/install-file-embedded-pom/verify.groovy b/src/it/install-file-embedded-pom/verify.groovy index 4f28e28..b14b0cb 100644 --- a/src/it/install-file-embedded-pom/verify.groovy +++ b/src/it/install-file-embedded-pom/verify.groovy @@ -17,10 +17,10 @@ * under the License. */ -assert new File( basedir, "../../local-repo/org/apache/maven/plugins/install/its/minstall52/1.0-SNAPSHOT/minstall52-1.0-SNAPSHOT.jar" ).exists() -assert new File( basedir, "../../local-repo/org/apache/maven/plugins/install/its/minstall52/1.0-SNAPSHOT/minstall52-1.0-SNAPSHOT.pom" ).exists() +assert new File(basedir, "../../local-repo/org/apache/maven/plugins/install/its/minstall52/1.0-SNAPSHOT/minstall52-1.0-SNAPSHOT.jar").exists() +assert new File(basedir, "../../local-repo/org/apache/maven/plugins/install/its/minstall52/1.0-SNAPSHOT/minstall52-1.0-SNAPSHOT.pom").exists() -File buildLog = new File( basedir, 'build.log' ) +File buildLog = new File(basedir, 'build.log') assert buildLog.exists() -assert buildLog.text.contains( "[INFO] Loading META-INF/maven/org.apache.maven.plugins.install.its/minstall52/pom.xml from" ) -assert buildLog.text.contains( "[INFO] Using JAR embedded POM as pomFile" ) +assert buildLog.text.contains("[INFO] Loading META-INF/maven/org.apache.maven.plugins.install.its/minstall52/pom.xml from") +assert buildLog.text.contains("[INFO] Using JAR embedded POM as pomFile") diff --git a/src/it/non-changed-artifact/verify.groovy b/src/it/non-changed-artifact/verify.groovy index 0be1085..a0b89dc 100644 --- a/src/it/non-changed-artifact/verify.groovy +++ b/src/it/non-changed-artifact/verify.groovy @@ -17,14 +17,14 @@ * under the License. */ -File buildLog = new File( basedir, 'build.log' ) +File buildLog = new File(basedir, 'build.log') assert buildLog.exists() def logText = buildLog.text -artifactPath = new File( basedir, 'target/minstall-39-1.0-SNAPSHOT.jar' ).canonicalPath -copyArtifactPath = new File( basedir, '../../local-repo/org/apache/maven/plugins/install/its/minstall-39/1.0-SNAPSHOT/minstall-39-1.0-SNAPSHOT.jar' ).canonicalPath +artifactPath = new File(basedir, 'target/minstall-39-1.0-SNAPSHOT.jar').canonicalPath +copyArtifactPath = new File(basedir, '../../local-repo/org/apache/maven/plugins/install/its/minstall-39/1.0-SNAPSHOT/minstall-39-1.0-SNAPSHOT.jar').canonicalPath -assert 2 == logText.count( "[INFO] Installing ${artifactPath} to ${copyArtifactPath}" ) -assert 1 == logText.count( "[DEBUG] Skipped re-installing ${artifactPath} to ${copyArtifactPath}, seems unchanged" ) +assert 2 == logText.count("[INFO] Installing ${artifactPath} to ${copyArtifactPath}") +assert 1 == logText.count("[DEBUG] Skipped re-installing ${artifactPath} to ${copyArtifactPath}, seems unchanged") diff --git a/src/it/non-default-pom/setup.groovy b/src/it/non-default-pom/setup.groovy index 772037b..f5dc5e6 100644 --- a/src/it/non-default-pom/setup.groovy +++ b/src/it/non-default-pom/setup.groovy @@ -17,6 +17,6 @@ * under the License. */ -File file = new File( localRepositoryPath, "org/apache/maven/its/install/ndp" ); -System.out.println( "Deleting " + file ); -assert file.deleteDir(); +File file = new File(localRepositoryPath, "org/apache/maven/its/install/ndp") +System.out.println("Deleting " + file) +assert file.deleteDir() diff --git a/src/it/non-default-pom/verify.groovy b/src/it/non-default-pom/verify.groovy index 458fa94..774808f 100644 --- a/src/it/non-default-pom/verify.groovy +++ b/src/it/non-default-pom/verify.groovy @@ -18,14 +18,13 @@ */ String[] paths = -[ - "org/apache/maven/its/install/ndp/test/maven-metadata-local.xml", - "org/apache/maven/its/install/ndp/test/1.0-SNAPSHOT/maven-metadata-local.xml", - "org/apache/maven/its/install/ndp/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.pom", -]; + [ + "org/apache/maven/its/install/ndp/test/maven-metadata-local.xml", + "org/apache/maven/its/install/ndp/test/1.0-SNAPSHOT/maven-metadata-local.xml", + "org/apache/maven/its/install/ndp/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.pom", + ] -for ( String path : paths ) -{ - File file = new File( localRepositoryPath, path ); - assert file.isFile() : "Missing: " + file.getAbsolutePath(); +for (String path : paths) { + File file = new File(localRepositoryPath, path) + assert file.isFile() : "Missing: " + file.getAbsolutePath() } diff --git a/src/it/parallel-reactor-install/verify.groovy b/src/it/parallel-reactor-install/verify.groovy index 670bd40..e35aa86 100644 --- a/src/it/parallel-reactor-install/verify.groovy +++ b/src/it/parallel-reactor-install/verify.groovy @@ -17,6 +17,6 @@ * under the License. */ -assert new File( basedir, "../../local-repo/org/apache/maven/its/minstall-98/multithread/1.0/multithread-1.0.pom" ).exists() -assert new File( basedir, "../../local-repo/org/apache/maven/its/minstall-98/module1/1.0/module1-1.0.pom" ).exists() -assert new File( basedir, "../../local-repo/org/apache/maven/its/minstall-98/module2/1.0/module2-1.0.pom" ).exists() +assert new File(basedir, "../../local-repo/org/apache/maven/its/minstall-98/multithread/1.0/multithread-1.0.pom").exists() +assert new File(basedir, "../../local-repo/org/apache/maven/its/minstall-98/module1/1.0/module1-1.0.pom").exists() +assert new File(basedir, "../../local-repo/org/apache/maven/its/minstall-98/module2/1.0/module2-1.0.pom").exists() diff --git a/src/it/per-project-config/verify.groovy b/src/it/per-project-config/verify.groovy index ac36073..3045167 100644 --- a/src/it/per-project-config/verify.groovy +++ b/src/it/per-project-config/verify.groovy @@ -17,6 +17,6 @@ * under the License. */ -assert new File( basedir, "../../local-repo/org/apache/maven/its/minstall-99/configperproject/1.0/configperproject-1.0.pom" ).exists() -assert new File( basedir, "../../local-repo/org/apache/maven/its/minstall-99/module1/1.0/module1-1.0.pom" ).exists() -assert !( new File( basedir, "../../local-repo/org/apache/maven/its/minstall-99/module2/1.0/module2-1.0.pom" ).exists() ) +assert new File(basedir, "../../local-repo/org/apache/maven/its/minstall-99/configperproject/1.0/configperproject-1.0.pom").exists() +assert new File(basedir, "../../local-repo/org/apache/maven/its/minstall-99/module1/1.0/module1-1.0.pom").exists() +assert !(new File(basedir, "../../local-repo/org/apache/maven/its/minstall-99/module2/1.0/module2-1.0.pom").exists()) diff --git a/src/it/pom-packaged-project-installs-pom/setup.groovy b/src/it/pom-packaged-project-installs-pom/setup.groovy index c5d81de..c48dde8 100644 --- a/src/it/pom-packaged-project-installs-pom/setup.groovy +++ b/src/it/pom-packaged-project-installs-pom/setup.groovy @@ -17,8 +17,8 @@ * under the License. */ -File dir = new File( localRepositoryPath, "org/apache/maven/its/install/minstall315" ) -System.out.println( "Deleting " + dir ) +File dir = new File(localRepositoryPath, "org/apache/maven/its/install/minstall315") +System.out.println("Deleting " + dir) dir.deleteDir() return true diff --git a/src/it/pom-packaged-project-installs-pom/verify.groovy b/src/it/pom-packaged-project-installs-pom/verify.groovy index f44bcef..aac5b95 100644 --- a/src/it/pom-packaged-project-installs-pom/verify.groovy +++ b/src/it/pom-packaged-project-installs-pom/verify.groovy @@ -21,15 +21,14 @@ // A subsequent install:install must install the POM, not that JAR. Maven 4 also installs a // -build.pom next to the consumer POM, so check every installed .pom file. -File dir = new File( localRepositoryPath, "org/apache/maven/its/install/minstall315/test/1.0" ) -File installed = new File( dir, "test-1.0.pom" ) +File dir = new File(localRepositoryPath, "org/apache/maven/its/install/minstall315/test/1.0") +File installed = new File(dir, "test-1.0.pom") assert installed.isFile() : "Installed file not found: " + installed // A JAR (ZIP) starts with the magic bytes PK (0x50 0x4B). -for ( File pom : dir.listFiles().findAll { it.name.endsWith( ".pom" ) } ) -{ +for ( File pom : dir.listFiles().findAll { it.name.endsWith( ".pom" ) } ) { byte[] magic = new byte[2] pom.withInputStream { it.read( magic ) } assert !( magic[0] == 0x50 && magic[1] == 0x4B ) : - "install:install installed a JAR (ZIP) instead of the POM as " + pom.name + "install:install installed a JAR (ZIP) instead of the POM as " + pom.name }
