This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch maven-clean-plugin-4.x
in repository https://gitbox.apache.org/repos/asf/maven-clean-plugin.git
The following commit(s) were added to refs/heads/maven-clean-plugin-4.x by this
push:
new d66388e Format Groovy IT scripts
d66388e is described below
commit d66388e699f006e610e627c491b08ed109430443
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Wed Nov 25 20:48:12 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/dangling-symlinks/setup.groovy | 35 ++++++-------
src/it/dangling-symlinks/verify.groovy | 31 +++++------
src/it/default/setup.groovy | 31 +++++------
src/it/default/verify.groovy | 31 +++++------
src/it/exclude-default-dirs/verify.groovy | 54 +++++++++----------
src/it/fast-delete-default/verify.groovy | 7 ++-
src/it/fast-delete-multi-module/verify.groovy | 4 +-
src/it/fast-delete/verify.groovy | 14 +++--
src/it/file-sets-absolute-paths/verify.groovy | 38 ++++++--------
src/it/file-sets-includes-excludes/verify.groovy | 60 +++++++++-------------
src/it/file-sets-relative-paths/verify.groovy | 55 +++++++++-----------
.../multi-module-with-dependencies/verify.groovy | 4 +-
src/it/only-test-clean/setup.groovy | 31 +++++------
src/it/only-test-clean/verify.groovy | 50 ++++++++----------
src/it/read-only-fast/setup.groovy | 12 ++---
src/it/read-only-fast/verify.groovy | 10 ++--
src/it/read-only/setup.groovy | 16 +++---
src/it/read-only/verify.groovy | 8 +--
src/it/sources-targetPath/setup.groovy | 4 +-
src/it/sources-targetPath/verify.groovy | 4 +-
src/it/special-characters/setup.groovy | 20 ++++----
src/it/special-characters/verify.groovy | 32 +++++-------
src/it/symlink-dont-follow/setup.groovy | 34 ++++++------
src/it/symlink-dont-follow/verify.groovy | 45 ++++++----------
24 files changed, 274 insertions(+), 356 deletions(-)
diff --git a/src/it/dangling-symlinks/setup.groovy
b/src/it/dangling-symlinks/setup.groovy
index be18cfd..539f839 100644
--- a/src/it/dangling-symlinks/setup.groovy
+++ b/src/it/dangling-symlinks/setup.groovy
@@ -17,29 +17,26 @@
* under the License.
*/
-import java.nio.file.*;
-import java.nio.file.attribute.*;
+import java.nio.file.*
+import java.nio.file.attribute.*
-try
-{
- Path targetDir = basedir.toPath().resolve( "target" );
- Path link = targetDir.resolve( "link" );
- Path target = targetDir.resolve( "link-target.txt" );
+try {
+ Path targetDir = basedir.toPath().resolve("target")
+ Path link = targetDir.resolve("link")
+ Path target = targetDir.resolve("link-target.txt")
- System.out.println( "Creating symlink " + link + " -> " + target );
- Files.createSymbolicLink( link, target, new FileAttribute[0] );
- if ( !Files.exists( link, new LinkOption[0] ) )
- {
- System.out.println( "Platform does not support symlinks, skipping
test." );
+ System.out.println("Creating symlink " + link + " -> " + target)
+ Files.createSymbolicLink(link, target, new FileAttribute[0])
+ if (!Files.exists(link, new LinkOption[0])) {
+ System.out.println("Platform does not support symlinks, skipping
test.")
}
- System.out.println( "Deleting symlink target " + target );
- Files.delete( target );
+ System.out.println("Deleting symlink target " + target)
+ Files.delete(target)
}
-catch( Exception ex )
-{
- ex.printStackTrace();
- return false;
+catch(Exception ex) {
+ ex.printStackTrace()
+ return false
}
-return true;
+return true
diff --git a/src/it/dangling-symlinks/verify.groovy
b/src/it/dangling-symlinks/verify.groovy
index 9814365..c0f28c2 100644
--- a/src/it/dangling-symlinks/verify.groovy
+++ b/src/it/dangling-symlinks/verify.groovy
@@ -17,25 +17,22 @@
* under the License.
*/
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import java.util.regex.*;
+import java.io.*
+import java.util.*
+import java.util.jar.*
+import java.util.regex.*
-try
-{
- File targetDir = new File( basedir, "target" );
- System.out.println( "Checking for absence of " + targetDir );
- if ( targetDir.exists() )
- {
- System.out.println( "FAILURE!" );
- return false;
+try {
+ File targetDir = new File(basedir, "target")
+ System.out.println("Checking for absence of " + targetDir)
+ if (targetDir.exists()) {
+ System.out.println("FAILURE!")
+ return false
}
}
-catch( Throwable t )
-{
- t.printStackTrace();
- return false;
+catch(Throwable t) {
+ t.printStackTrace()
+ return false
}
-return true;
+return true
diff --git a/src/it/default/setup.groovy b/src/it/default/setup.groovy
index 4cf09f7..289c9a1 100644
--- a/src/it/default/setup.groovy
+++ b/src/it/default/setup.groovy
@@ -17,25 +17,22 @@
* under the License.
*/
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import java.util.regex.*;
+import java.io.*
+import java.util.*
+import java.util.jar.*
+import java.util.regex.*
-try
-{
- File targetDir = new File( basedir, "target" );
- System.out.println( "Checking for existence of " + targetDir );
- if ( !targetDir.isDirectory() )
- {
- System.out.println( "FAILURE!" );
- return false;
+try {
+ File targetDir = new File(basedir, "target")
+ System.out.println("Checking for existence of " + targetDir)
+ if (!targetDir.isDirectory()) {
+ System.out.println("FAILURE!")
+ return false
}
}
-catch( Throwable t )
-{
- t.printStackTrace();
- return false;
+catch(Throwable t) {
+ t.printStackTrace()
+ return false
}
-return true;
+return true
diff --git a/src/it/default/verify.groovy b/src/it/default/verify.groovy
index 9814365..c0f28c2 100644
--- a/src/it/default/verify.groovy
+++ b/src/it/default/verify.groovy
@@ -17,25 +17,22 @@
* under the License.
*/
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import java.util.regex.*;
+import java.io.*
+import java.util.*
+import java.util.jar.*
+import java.util.regex.*
-try
-{
- File targetDir = new File( basedir, "target" );
- System.out.println( "Checking for absence of " + targetDir );
- if ( targetDir.exists() )
- {
- System.out.println( "FAILURE!" );
- return false;
+try {
+ File targetDir = new File(basedir, "target")
+ System.out.println("Checking for absence of " + targetDir)
+ if (targetDir.exists()) {
+ System.out.println("FAILURE!")
+ return false
}
}
-catch( Throwable t )
-{
- t.printStackTrace();
- return false;
+catch(Throwable t) {
+ t.printStackTrace()
+ return false
}
-return true;
+return true
diff --git a/src/it/exclude-default-dirs/verify.groovy
b/src/it/exclude-default-dirs/verify.groovy
index 979af19..80106ca 100644
--- a/src/it/exclude-default-dirs/verify.groovy
+++ b/src/it/exclude-default-dirs/verify.groovy
@@ -17,13 +17,12 @@
* under the License.
*/
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import java.util.regex.*;
+import java.io.*
+import java.util.*
+import java.util.jar.*
+import java.util.regex.*
-try
-{
+try {
String[] expected = [
"target",
"target/test-1.0-SNAPSHOT.jar",
@@ -33,36 +32,29 @@ try
"target/test-classes/test.properties",
"target/site",
"target/site/index.html",
- ];
- for ( String path : expected )
- {
- File file = new File( basedir, path );
- System.out.println( "Checking for existence of " + file );
- if ( !file.exists() )
- {
- System.out.println( "FAILURE!" );
- return false;
+ ]
+ for (String path : expected) {
+ File file = new File(basedir, path)
+ System.out.println("Checking for existence of " + file)
+ if (!file.exists()) {
+ System.out.println("FAILURE!")
+ return false
}
}
- String[] unexpected = [
- "delete-me",
- ];
- for ( String path : unexpected )
- {
- File file = new File( basedir, path );
- System.out.println( "Checking for absence of " + file );
- if ( file.exists() )
- {
- System.out.println( "FAILURE!" );
- return false;
+ String[] unexpected = ["delete-me",]
+ for (String path : unexpected) {
+ File file = new File(basedir, path)
+ System.out.println("Checking for absence of " + file)
+ if (file.exists()) {
+ System.out.println("FAILURE!")
+ return false
}
}
}
-catch( Throwable t )
-{
- t.printStackTrace();
- return false;
+catch(Throwable t) {
+ t.printStackTrace()
+ return false
}
-return true;
+return true
diff --git a/src/it/fast-delete-default/verify.groovy
b/src/it/fast-delete-default/verify.groovy
index 582542d..af38bdf 100644
--- a/src/it/fast-delete-default/verify.groovy
+++ b/src/it/fast-delete-default/verify.groovy
@@ -17,10 +17,9 @@
* under the License.
*/
-if ( new File( basedir, "target" ).exists() )
-{
- System.out.println( "FAILURE: 'target' has not been deleted." );
- return false;
+if (new File(basedir, "target").exists()) {
+ System.out.println("FAILURE: 'target' has not been deleted.")
+ return false
}
File buildLog = new File(basedir, 'build.log')
diff --git a/src/it/fast-delete-multi-module/verify.groovy
b/src/it/fast-delete-multi-module/verify.groovy
index 2aeecc3..5b16cb5 100644
--- a/src/it/fast-delete-multi-module/verify.groovy
+++ b/src/it/fast-delete-multi-module/verify.groovy
@@ -22,10 +22,10 @@
// - The shared staging directory (.fastdir) should be cleaned up
// - The background cleaner thread should have run (session-scoped sharing)
-def log = new File( basedir, 'build.log' ).text
+def log = new File(basedir, 'build.log').text
// Both modules must have their target directories cleaned
-assert !new File( basedir, 'module-force/target' ).exists() :
'module-force/target should have been deleted'
+assert !new File(basedir, 'module-force/target').exists() :
'module-force/target should have been deleted'
assert !new File( basedir, 'module-noforce/target' ).exists() :
'module-noforce/target should have been deleted'
// The shared staging directory should be cleaned after the session ends
diff --git a/src/it/fast-delete/verify.groovy b/src/it/fast-delete/verify.groovy
index 07c5202..99a9b50 100644
--- a/src/it/fast-delete/verify.groovy
+++ b/src/it/fast-delete/verify.groovy
@@ -17,15 +17,13 @@
* under the License.
*/
-if ( new File( basedir, "target" ).exists() )
-{
- System.out.println( "FAILURE: 'target' has not been deleted." );
- return false;
+if (new File(basedir, "target").exists()) {
+ System.out.println("FAILURE: 'target' has not been deleted.")
+ return false
}
-if ( new File( basedir, ".fastdir" ).exists() )
-{
- System.out.println( "FAILURE: '.fastdir' has not been deleted." );
- return false;
+if (new File(basedir, ".fastdir").exists()) {
+ System.out.println("FAILURE: '.fastdir' has not been deleted.")
+ return false
}
File buildLog = new File(basedir, 'build.log')
diff --git a/src/it/file-sets-absolute-paths/verify.groovy
b/src/it/file-sets-absolute-paths/verify.groovy
index fb7c62c..1a6143c 100644
--- a/src/it/file-sets-absolute-paths/verify.groovy
+++ b/src/it/file-sets-absolute-paths/verify.groovy
@@ -17,31 +17,25 @@
* under the License.
*/
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import java.util.regex.*;
+import java.io.*
+import java.util.*
+import java.util.jar.*
+import java.util.regex.*
-try
-{
- String[] unexpected = [
- "delete-me",
- ];
- for ( String path : unexpected )
- {
- File file = new File( basedir, path );
- System.out.println( "Checking for absence of " + file );
- if ( file.exists() )
- {
- System.out.println( "FAILURE!" );
- return false;
+try {
+ String[] unexpected = ["delete-me",]
+ for (String path : unexpected) {
+ File file = new File(basedir, path)
+ System.out.println("Checking for absence of " + file)
+ if (file.exists()) {
+ System.out.println("FAILURE!")
+ return false
}
}
}
-catch( Throwable t )
-{
- t.printStackTrace();
- return false;
+catch(Throwable t) {
+ t.printStackTrace()
+ return false
}
-return true;
+return true
diff --git a/src/it/file-sets-includes-excludes/verify.groovy
b/src/it/file-sets-includes-excludes/verify.groovy
index 5f71ed6..2ec324e 100644
--- a/src/it/file-sets-includes-excludes/verify.groovy
+++ b/src/it/file-sets-includes-excludes/verify.groovy
@@ -17,42 +17,35 @@
* under the License.
*/
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import java.util.regex.*;
+import java.io.*
+import java.util.*
+import java.util.jar.*
+import java.util.regex.*
-try
-{
+try {
String[] expected = [
"dir0/excluded.txt",
"dir0/sub0/excluded.txt",
"dir0/sub1",
"dir0/sub2/excluded.txt",
-
"dir1/excluded.txt",
"dir1/sub0/excluded.txt",
"dir1/sub1",
"dir1/sub2/excluded.txt",
-
"dir2/excluded.txt",
"dir2/sub0/excluded.txt",
"dir2/sub2/excluded.txt",
-
"dir3/excluded.txt",
"dir3/sub0/excluded.txt",
"dir3/sub2/excluded.txt",
-
"dir4/excluded/file.txt",
- ];
- for ( String path : expected )
- {
- File file = new File( new File( basedir, "dirs" ), path );
- System.out.println( "Checking for existence of " + file );
- if ( !file.exists() )
- {
- System.out.println( "FAILURE!" );
- return false;
+ ]
+ for (String path : expected) {
+ File file = new File(new File(basedir, "dirs"), path)
+ System.out.println("Checking for existence of " + file)
+ if (!file.exists()) {
+ System.out.println("FAILURE!")
+ return false
}
}
@@ -60,37 +53,30 @@ try
"dir0/included.txt",
"dir0/sub0/included.txt",
"dir0/sub1/included.txt",
-
"dir1/included.txt",
"dir1/sub0/included.txt",
"dir1/sub1/included.txt",
-
"dir2/included.txt",
"dir2/sub0/included.txt",
"dir2/sub1",
-
"dir3/included.txt",
"dir3/sub0/included.txt",
"dir3/sub1",
-
"dir4/file.txt",
"dir4/included/file.txt",
- ];
- for ( String path : unexpected )
- {
- File file = new File( new File( basedir, "dirs" ), path );
- System.out.println( "Checking for absence of " + file );
- if ( file.exists() )
- {
- System.out.println( "FAILURE!" );
- return false;
+ ]
+ for (String path : unexpected) {
+ File file = new File(new File(basedir, "dirs"), path)
+ System.out.println("Checking for absence of " + file)
+ if (file.exists()) {
+ System.out.println("FAILURE!")
+ return false
}
}
}
-catch( Throwable t )
-{
- t.printStackTrace();
- return false;
+catch(Throwable t) {
+ t.printStackTrace()
+ return false
}
-return true;
+return true
diff --git a/src/it/file-sets-relative-paths/verify.groovy
b/src/it/file-sets-relative-paths/verify.groovy
index cdee852..93d60b2 100644
--- a/src/it/file-sets-relative-paths/verify.groovy
+++ b/src/it/file-sets-relative-paths/verify.groovy
@@ -17,25 +17,19 @@
* under the License.
*/
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import java.util.regex.*;
+import java.io.*
+import java.util.*
+import java.util.jar.*
+import java.util.regex.*
-try
-{
- String[] expected = [
- "temp-stuff/test.txt",
- "deploy/test.txt",
- ];
- for ( String path : expected )
- {
- File file = new File( basedir, path );
- System.out.println( "Checking for existence of " + file );
- if ( !file.exists() )
- {
- System.out.println( "FAILURE!" );
- return false;
+try {
+ String[] expected = ["temp-stuff/test.txt", "deploy/test.txt",]
+ for (String path : expected) {
+ File file = new File(basedir, path)
+ System.out.println("Checking for existence of " + file)
+ if (!file.exists()) {
+ System.out.println("FAILURE!")
+ return false
}
}
@@ -45,22 +39,19 @@ try
"child-a/temp-stuff",
"child-b/target",
"child-b/deploy",
- ];
- for ( String path : unexpected )
- {
- File file = new File( basedir, path );
- System.out.println( "Checking for absence of " + file );
- if ( file.exists() )
- {
- System.out.println( "FAILURE!" );
- return false;
+ ]
+ for (String path : unexpected) {
+ File file = new File(basedir, path)
+ System.out.println("Checking for absence of " + file)
+ if (file.exists()) {
+ System.out.println("FAILURE!")
+ return false
}
}
}
-catch( Throwable t )
-{
- t.printStackTrace();
- return false;
+catch(Throwable t) {
+ t.printStackTrace()
+ return false
}
-return true;
+return true
diff --git a/src/it/multi-module-with-dependencies/verify.groovy
b/src/it/multi-module-with-dependencies/verify.groovy
index 2d49017..4f7089e 100644
--- a/src/it/multi-module-with-dependencies/verify.groovy
+++ b/src/it/multi-module-with-dependencies/verify.groovy
@@ -22,8 +22,8 @@
// This regression was introduced in Maven 4.0.0-beta-1 and fixed in
apache/maven#2124.
// The clean lifecycle should not resolve dependencies, so module1 need not be
installed.
-def log = new File( basedir, 'build.log' ).text
+def log = new File(basedir, 'build.log').text
-assert log.contains( 'BUILD SUCCESS' ) : 'expected BUILD SUCCESS'
+assert log.contains('BUILD SUCCESS') : 'expected BUILD SUCCESS'
assert !log.contains( 'Could not resolve dependencies' ) : 'clean should not
attempt dependency resolution'
assert !log.contains( 'DependencyResolutionException' ) : 'clean should not
attempt dependency resolution'
diff --git a/src/it/only-test-clean/setup.groovy
b/src/it/only-test-clean/setup.groovy
index 4cf09f7..289c9a1 100644
--- a/src/it/only-test-clean/setup.groovy
+++ b/src/it/only-test-clean/setup.groovy
@@ -17,25 +17,22 @@
* under the License.
*/
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import java.util.regex.*;
+import java.io.*
+import java.util.*
+import java.util.jar.*
+import java.util.regex.*
-try
-{
- File targetDir = new File( basedir, "target" );
- System.out.println( "Checking for existence of " + targetDir );
- if ( !targetDir.isDirectory() )
- {
- System.out.println( "FAILURE!" );
- return false;
+try {
+ File targetDir = new File(basedir, "target")
+ System.out.println("Checking for existence of " + targetDir)
+ if (!targetDir.isDirectory()) {
+ System.out.println("FAILURE!")
+ return false
}
}
-catch( Throwable t )
-{
- t.printStackTrace();
- return false;
+catch(Throwable t) {
+ t.printStackTrace()
+ return false
}
-return true;
+return true
diff --git a/src/it/only-test-clean/verify.groovy
b/src/it/only-test-clean/verify.groovy
index 377caed..3532823 100644
--- a/src/it/only-test-clean/verify.groovy
+++ b/src/it/only-test-clean/verify.groovy
@@ -17,40 +17,34 @@
* under the License.
*/
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import java.util.regex.*;
+import java.io.*
+import java.util.*
+import java.util.jar.*
+import java.util.regex.*
-try
-{
- File targetDir = new File( basedir, "target" );
- System.out.println( "Checking for absence of " + targetDir );
- if ( !targetDir.exists() )
- {
- System.out.println( "FAILURE! target must exists" );
- return false;
+try {
+ File targetDir = new File(basedir, "target")
+ System.out.println("Checking for absence of " + targetDir)
+ if (!targetDir.exists()) {
+ System.out.println("FAILURE! target must exists")
+ return false
}
- File targetClasses = new File( targetDir, "classes" );
- if ( !targetClasses.exists() )
- {
- System.out.println( "FAILURE! target/classes must exists" );
- return false;
+ File targetClasses = new File(targetDir, "classes")
+ if (!targetClasses.exists()) {
+ System.out.println("FAILURE! target/classes must exists")
+ return false
}
- File targetTestsClasses = new File( targetDir, "test-classes" );
- if ( targetTestsClasses.exists() )
- {
- System.out.println( "FAILURE! target/test-classes must not exists" );
- return false;
+ File targetTestsClasses = new File(targetDir, "test-classes")
+ if (targetTestsClasses.exists()) {
+ System.out.println("FAILURE! target/test-classes must not exists")
+ return false
}
-
}
-catch( Throwable t )
-{
- t.printStackTrace();
- return false;
+catch(Throwable t) {
+ t.printStackTrace()
+ return false
}
-return true;
+return true
diff --git a/src/it/read-only-fast/setup.groovy
b/src/it/read-only-fast/setup.groovy
index 45bafdb..57f4487 100644
--- a/src/it/read-only-fast/setup.groovy
+++ b/src/it/read-only-fast/setup.groovy
@@ -17,18 +17,18 @@
* under the License.
*/
-import java.io.File;
+import java.io.File
// Make the file read-only.
if (!new File(basedir,
"target/read-only-dir/read-only.properties").setWritable(false)) {
- System.out.println("Cannot change file permission.");
- return false;
+ System.out.println("Cannot change file permission.")
+ return false
}
if (File.separatorChar == '/' as char) {
// Directory permission can be changed only on Unix, not on Windows.
if (!new File(basedir, "target/read-only-dir").setWritable(false)) {
- System.out.println("Cannot change directory permission.");
- return false;
+ System.out.println("Cannot change directory permission.")
+ return false
}
}
-return true;
+return true
diff --git a/src/it/read-only-fast/verify.groovy
b/src/it/read-only-fast/verify.groovy
index 5de6da0..1043f81 100644
--- a/src/it/read-only-fast/verify.groovy
+++ b/src/it/read-only-fast/verify.groovy
@@ -17,15 +17,15 @@
* under the License.
*/
-import java.io.File;
+import java.io.File
if (new File(basedir, "target").exists()) {
- System.out.println("FAILURE: 'target' has not been deleted.");
- return false;
+ System.out.println("FAILURE: 'target' has not been deleted.")
+ return false
}
if (new File(basedir, ".fastdir").exists()) {
- System.out.println("FAILURE: '.fastdir' has not been deleted (read-only
files left behind).");
- return false;
+ System.out.println("FAILURE: '.fastdir' has not been deleted (read-only
files left behind).")
+ return false
}
File buildLog = new File(basedir, 'build.log')
diff --git a/src/it/read-only/setup.groovy b/src/it/read-only/setup.groovy
index a98d21e..0114aee 100644
--- a/src/it/read-only/setup.groovy
+++ b/src/it/read-only/setup.groovy
@@ -17,21 +17,21 @@
* under the License.
*/
-import java.io.File;
+import java.io.File
if (!new File(basedir,
"target/read-only-dir/read-only.properties").setWritable(false)) {
- System.out.println("Cannot change file permission.");
- return false;
+ System.out.println("Cannot change file permission.")
+ return false
}
if (File.separatorChar == '/' as char) {
// Directory permission can be changed only on Unix, not on Windows.
if (!new File(basedir, "target/read-only-dir").setWritable(false)) {
- System.out.println("Cannot change directory permission.");
- return false;
+ System.out.println("Cannot change directory permission.")
+ return false
}
}
if (!new File(basedir, "target/writable-dir/writable.properties").canWrite()) {
- System.out.println("Expected a writable file.");
- return false;
+ System.out.println("Expected a writable file.")
+ return false
}
-return true;
+return true
diff --git a/src/it/read-only/verify.groovy b/src/it/read-only/verify.groovy
index ed830cc..f4b8ca4 100644
--- a/src/it/read-only/verify.groovy
+++ b/src/it/read-only/verify.groovy
@@ -17,10 +17,10 @@
* under the License.
*/
-import java.io.File;
+import java.io.File
if (new File(basedir, "target").exists()) {
- System.out.println("target should have been deleted.");
- return false;
+ System.out.println("target should have been deleted.")
+ return false
}
-return true;
+return true
diff --git a/src/it/sources-targetPath/setup.groovy
b/src/it/sources-targetPath/setup.groovy
index a9fc136..58adcaf 100644
--- a/src/it/sources-targetPath/setup.groovy
+++ b/src/it/sources-targetPath/setup.groovy
@@ -17,7 +17,7 @@
* under the License.
*/
-import java.io.File;
+import java.io.File
-return new File(basedir, "target").exists() && new File(basedir,
"outside-target").exists();
+return new File(basedir, "target").exists() && new File(basedir,
"outside-target").exists()
// The opposite condition is tested in "verify.bsh".
diff --git a/src/it/sources-targetPath/verify.groovy
b/src/it/sources-targetPath/verify.groovy
index 5022ea2..7f4c435 100644
--- a/src/it/sources-targetPath/verify.groovy
+++ b/src/it/sources-targetPath/verify.groovy
@@ -17,6 +17,6 @@
* under the License.
*/
-import java.io.File;
+import java.io.File
-return !(new File(basedir, "target").exists() || new File(basedir,
"outside-target").exists());
+return !(new File(basedir, "target").exists() || new File(basedir,
"outside-target").exists())
diff --git a/src/it/special-characters/setup.groovy
b/src/it/special-characters/setup.groovy
index 1aa9ed5..86a3b7e 100644
--- a/src/it/special-characters/setup.groovy
+++ b/src/it/special-characters/setup.groovy
@@ -17,15 +17,15 @@
* under the License.
*/
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import java.util.regex.*;
-import org.apache.maven.plugin.clean.*;
+import java.io.*
+import java.util.*
+import java.util.jar.*
+import java.util.regex.*
+import org.apache.maven.plugin.clean.*
-File parentDir = new File( basedir, "target" );
-File target = new File( parentDir, "Pep\u00E9 le Pew" );
-target.mkdirs();
-target = new File( parentDir, "Conditions_g\u00E9n\u00E9rales_d'isalaire.txt"
);
-target.createNewFile();
+File parentDir = new File(basedir, "target")
+File target = new File(parentDir, "Pep\u00E9 le Pew")
+target.mkdirs()
+target = new File(parentDir, "Conditions_g\u00E9n\u00E9rales_d'isalaire.txt")
+target.createNewFile()
diff --git a/src/it/special-characters/verify.groovy
b/src/it/special-characters/verify.groovy
index f18659c..d6e6125 100644
--- a/src/it/special-characters/verify.groovy
+++ b/src/it/special-characters/verify.groovy
@@ -17,26 +17,22 @@
* under the License.
*/
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import java.util.regex.*;
+import java.io.*
+import java.util.*
+import java.util.jar.*
+import java.util.regex.*
-try
-{
- // this confirms that special character file and directory are deleted
- File targetDir = new File( basedir, "target" );
- if ( targetDir.exists() )
- {
- System.out.println( "FAILURE! target must not exist" );
- return false;
+try {
+ // this confirms that special character file and directory are deleted
+ File targetDir = new File(basedir, "target")
+ if (targetDir.exists()) {
+ System.out.println("FAILURE! target must not exist")
+ return false
}
-
}
-catch( Throwable t )
-{
- t.printStackTrace();
- return false;
+catch(Throwable t) {
+ t.printStackTrace()
+ return false
}
-return true;
+return true
diff --git a/src/it/symlink-dont-follow/setup.groovy
b/src/it/symlink-dont-follow/setup.groovy
index 37fac7e..e3a9b06 100644
--- a/src/it/symlink-dont-follow/setup.groovy
+++ b/src/it/symlink-dont-follow/setup.groovy
@@ -17,26 +17,24 @@
* under the License.
*/
-import java.nio.file.*;
-import java.nio.file.attribute.*;
+import java.nio.file.*
+import java.nio.file.attribute.*
def pairs =
-[
- [ "ext/file.txt", "target/link.txt" ],
- [ "ext/dir", "target/link" ],
- [ "ext/file.txt", "target2/link.txt" ],
- [ "ext/dir", "target2/link" ],
-];
+ [
+ ["ext/file.txt", "target/link.txt"],
+ ["ext/dir", "target/link"],
+ ["ext/file.txt", "target2/link.txt"],
+ ["ext/dir", "target2/link"],
+ ]
-for ( pair : pairs )
-{
- Path target = basedir.toPath().resolve( pair[0] );
- Path link = basedir.toPath().resolve( pair[1] );
- System.out.println( "Creating symlink " + link + " -> " + target );
- Files.createSymbolicLink( link, target, new FileAttribute[0] );
- if ( !Files.exists( link, new LinkOption[0] ) )
- {
- println "Platform does not support symlinks, skipping test.";
- return;
+for (pair : pairs) {
+ Path target = basedir.toPath().resolve(pair[0])
+ Path link = basedir.toPath().resolve(pair[1])
+ System.out.println("Creating symlink " + link + " -> " + target)
+ Files.createSymbolicLink(link, target, new FileAttribute[0])
+ if (!Files.exists(link, new LinkOption[0])) {
+ println "Platform does not support symlinks, skipping test."
+ return
}
}
diff --git a/src/it/symlink-dont-follow/verify.groovy
b/src/it/symlink-dont-follow/verify.groovy
index dae47c9..0836f2a 100644
--- a/src/it/symlink-dont-follow/verify.groovy
+++ b/src/it/symlink-dont-follow/verify.groovy
@@ -17,41 +17,26 @@
* under the License.
*/
-import java.io.*;
+import java.io.*
-def expected = [
- "ext",
- "ext/file.txt",
- "ext/dir/file.txt",
-];
+def expected = ["ext", "ext/file.txt", "ext/dir/file.txt",]
-for ( String path : expected )
-{
- File file = new File( basedir, path );
- println "Checking for existence of " + file;
- if ( !file.exists() )
- {
- println "FAILURE!";
- return false;
+for (String path : expected) {
+ File file = new File(basedir, path)
+ println "Checking for existence of " + file
+ if (!file.exists()) {
+ println "FAILURE!"
+ return false
}
}
-def unexpected = [
- "target/link.txt",
- "target/link",
- "target",
- "target2/link.txt",
- "target2/link",
- "target2",
-];
+def unexpected = ["target/link.txt", "target/link", "target",
"target2/link.txt", "target2/link", "target2",]
-for ( String path : unexpected )
-{
- File file = new File( basedir, path );
- println "Checking for absence of " + file;
- if ( file.exists() )
- {
- println "FAILURE!";
- return false;
+for (String path : unexpected) {
+ File file = new File(basedir, path)
+ println "Checking for absence of " + file
+ if (file.exists()) {
+ println "FAILURE!"
+ return false
}
}