00001
00027 package org.objectweb.jonas.ant;
00028
00029 import org.apache.tools.ant.BuildException;
00030 import org.apache.tools.ant.taskdefs.Property;
00031
00036 public class JProperty extends Property {
00037
00041 private String internalValue = null;
00042
00047 public void setValue(String value) {
00048 this.internalValue = value;
00049 }
00050
00056 public void execute() throws BuildException {
00057
00058 if (internalValue == null) {
00059 throw new BuildException("The property '" + internalValue
00060 + "' was not set.");
00061 }
00062
00063 String valueEvaluated = getProject().getProperty(internalValue);
00064 if (valueEvaluated == null) {
00065 throw new BuildException("The property '" + internalValue
00066 + "' cannot be evaluated in the current project.");
00067 }
00068
00069
00070 super.setValue(valueEvaluated);
00071
00072
00073 super.execute();
00074 }
00075
00076 }