geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r931626 - /geronimo/server/trunk/framework/buildsupport/geronimo-property-plugin/src/main/java/org/apache/geronimo/mavenplugins/property/SetPropertyMojo.java
Date Wed, 07 Apr 2010 17:34:17 GMT
Author: gawor
Date: Wed Apr  7 17:34:17 2010
New Revision: 931626

URL: http://svn.apache.org/viewvc?rev=931626&view=rev
Log:
GERONIMO-5231: Added option so that set property could contain files or directories

Modified:
    geronimo/server/trunk/framework/buildsupport/geronimo-property-plugin/src/main/java/org/apache/geronimo/mavenplugins/property/SetPropertyMojo.java

Modified: geronimo/server/trunk/framework/buildsupport/geronimo-property-plugin/src/main/java/org/apache/geronimo/mavenplugins/property/SetPropertyMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/geronimo-property-plugin/src/main/java/org/apache/geronimo/mavenplugins/property/SetPropertyMojo.java?rev=931626&r1=931625&r2=931626&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/geronimo-property-plugin/src/main/java/org/apache/geronimo/mavenplugins/property/SetPropertyMojo.java
(original)
+++ geronimo/server/trunk/framework/buildsupport/geronimo-property-plugin/src/main/java/org/apache/geronimo/mavenplugins/property/SetPropertyMojo.java
Wed Apr  7 17:34:17 2010
@@ -52,6 +52,11 @@ public class SetPropertyMojo extends Abs
     protected String propertyValuePrefix;
     
     /**
+     * @parameter default-value = "true"
+     */
+    protected boolean listFiles;
+    
+    /**
      * @parameter
      */
     protected Dependency[] classpath;
@@ -102,7 +107,13 @@ public class SetPropertyMojo extends Abs
                 if (!file.exists()) {
                     getLog().warn("File " + file + " does not exist");
                 }
-                buffer.append(file.getAbsolutePath());
+                
+                if (listFiles) {
+                    buffer.append(file.getAbsolutePath());
+                } else {
+                    buffer.append(file.getParentFile().getAbsolutePath());
+                }
+                
                 if (i + 1 < classpath.length) {
                     buffer.append(File.pathSeparator);
                 }



Mime
View raw message