From ba16932e836dbaa53d5a39bd5f5c049568f6d465 Mon Sep 17 00:00:00 2001 From: Cedric Gatay Date: Wed, 16 Jan 2013 17:54:16 +0100 Subject: [PATCH] Update groovy/CleanDir.groovy Allowed to set dryRun and verbose via command line --- groovy/CleanDir.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groovy/CleanDir.groovy b/groovy/CleanDir.groovy index 5dc2628..9ebf7ca 100644 --- a/groovy/CleanDir.groovy +++ b/groovy/CleanDir.groovy @@ -29,8 +29,8 @@ nonSnapshotDirectoryFilter = new NonSnapshotDirectoryFilter() def class Configuration { def homeFolder = System.getProperty("user.home") def path = homeFolder + "/.m2/repository" - def dryRun = true - def printDetails = true + def dryRun = System.getProperty("dryRun", "true").toBoolean() + def printDetails = System.getProperty("verbose", "true").toBoolean() def maxAgeSnapshotsInDays = 60 def maxAgeInDays = 90 def versionsToKeep = ["3.1.0.M1"] @@ -216,4 +216,4 @@ def class NonSnapshotDirectoryFilter implements FileFilter { boolean accept(File file) { return file.directory && !file.name.endsWith("-SNAPSHOT") } -} \ No newline at end of file +}