geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r453848 - /geronimo/genesis/trunk/plugins/plugin-support/src/main/java/org/apache/geronimo/genesis/AntMojoSupport.java
Date Sat, 07 Oct 2006 05:21:53 GMT
Author: jdillon
Date: Fri Oct  6 22:21:52 2006
New Revision: 453848

URL: http://svn.apache.org/viewvc?view=rev&rev=453848
Log:
Adding setSystemProperty() helpers for Java tasks

Modified:
    geronimo/genesis/trunk/plugins/plugin-support/src/main/java/org/apache/geronimo/genesis/AntMojoSupport.java

Modified: geronimo/genesis/trunk/plugins/plugin-support/src/main/java/org/apache/geronimo/genesis/AntMojoSupport.java
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/plugins/plugin-support/src/main/java/org/apache/geronimo/genesis/AntMojoSupport.java?view=diff&rev=453848&r1=453847&r2=453848
==============================================================================
--- geronimo/genesis/trunk/plugins/plugin-support/src/main/java/org/apache/geronimo/genesis/AntMojoSupport.java
(original)
+++ geronimo/genesis/trunk/plugins/plugin-support/src/main/java/org/apache/geronimo/genesis/AntMojoSupport.java
Fri Oct  6 22:21:52 2006
@@ -31,6 +31,8 @@
 import org.apache.tools.ant.Task;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.types.Environment;
+import org.apache.tools.ant.taskdefs.Java;
 import org.apache.tools.ant.taskdefs.Mkdir;
 import org.apache.tools.ant.taskdefs.Property;
 
@@ -90,6 +92,28 @@
         prop.execute();
     }
 
+    protected void setSystemProperty(final Java java, final String name, final String value)
{
+        assert java != null;
+        assert name != null;
+        assert value != null;
+
+        Environment.Variable var = new Environment.Variable();
+        var.setKey(name);
+        var.setValue(value);
+        java.addSysproperty(var);
+    }
+
+    protected void setSystemProperty(final Java java, final String name, final File value)
{
+        assert java != null;
+        assert name != null;
+        assert value != null;
+
+        Environment.Variable var = new Environment.Variable();
+        var.setKey(name);
+        var.setFile(value);
+        java.addSysproperty(var);
+    }
+    
     protected void inheritProperties() {
         // Propagate properties
         Map props = getProject().getProperties();



Mime
View raw message