Don't try to build non-existent IO library (Sorry Gump) git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271122 13f79535-47bb-0310-9956-ffa450edef68master
@@ -127,9 +127,6 @@ | |||||
</target> | </target> | ||||
<target name="antlibs" depends="common"> | <target name="antlibs" depends="common"> | ||||
<antcall target="build-lib" inheritall="false"> | |||||
<param name="libset" value="io"/> | |||||
</antcall> | |||||
<antcall target="build-lib" inheritall="false"> | <antcall target="build-lib" inheritall="false"> | ||||
<param name="libset" value="system"/> | <param name="libset" value="system"/> | ||||
</antcall> | </antcall> | ||||
@@ -171,7 +168,24 @@ | |||||
parampattern="[a-z].*" | parampattern="[a-z].*" | ||||
staticpattern="[a-z].*" | staticpattern="[a-z].*" | ||||
ignoreCastWhitespace="true"> | ignoreCastWhitespace="true"> | ||||
<fileset dir="${java.dir}" includes="**/*.java"/> | |||||
<fileset dir="${java.dir}"> | |||||
<include name="**/*.java"/> | |||||
<exclude name="**/org/apache/tools/ant/Task.java"/> | |||||
<exclude name="**/org/apache/tools/ant/ProjectComponent.java"/> | |||||
<exclude name="**/org/apache/tools/ant/types/DataType.java"/> | |||||
</fileset> | |||||
</checkstyle> | |||||
<checkstyle maxlinelen="80" | |||||
memberpattern="[a-z].*" | |||||
parampattern="[a-z].*" | |||||
staticpattern="[a-z].*" | |||||
allowProtected="true" | |||||
ignoreCastWhitespace="true"> | |||||
<fileset dir="${java.dir}"> | |||||
<include name="**/org/apache/tools/ant/Task.java"/> | |||||
<include name="**/org/apache/tools/ant/ProjectComponent.java"/> | |||||
<include name="**/org/apache/tools/ant/types/DataType.java"/> | |||||
</fileset> | |||||
</checkstyle> | </checkstyle> | ||||
</target> | </target> | ||||
@@ -208,5 +208,15 @@ public class ExecutionDataService implements DataService { | |||||
return sb.toString(); | return sb.toString(); | ||||
} | } | ||||
/** | |||||
* Get all the properties from the frame and any references frames. This | |||||
* is an expensive operation since it must clone all of the property | |||||
* stores in all frames | |||||
* | |||||
* @return a Map containing the frames properties indexed by their full name. | |||||
*/ | |||||
public Map getAllProperties() { | |||||
return frame.getAllProperties(); | |||||
} | |||||
} | } | ||||
@@ -235,7 +235,7 @@ public class ExecutionFrame { | |||||
this.initConfig = initConfig; | this.initConfig = initConfig; | ||||
configureServices(); | configureServices(); | ||||
antLibraries = new HashMap(standardLibs); | antLibraries = new HashMap(standardLibs); | ||||
try { | try { | ||||
@@ -276,6 +276,33 @@ public class ExecutionFrame { | |||||
return project; | return project; | ||||
} | } | ||||
/** | |||||
* Get all the properties from the frame and any references frames. This | |||||
* is an expensive operation since it must clone all of the property | |||||
* stores in all frames | |||||
* | |||||
* @return a Map containing the frames properties indexed by their full name. | |||||
*/ | |||||
public Map getAllProperties() { | |||||
Map allProperties = new HashMap(dataValues); | |||||
Iterator i = referencedFrames.keySet().iterator(); | |||||
while (i.hasNext()) { | |||||
String refName = (String)i.next(); | |||||
ExecutionFrame refFrame = getReferencedFrame(refName); | |||||
Map refProperties = refFrame.getAllProperties(); | |||||
Iterator j = refProperties.keySet().iterator(); | |||||
while (j.hasNext()) { | |||||
String name = (String)j.next(); | |||||
Object value = refProperties.get(name); | |||||
allProperties.put(refName + Project.REF_DELIMITER + name, | |||||
value); | |||||
} | |||||
} | |||||
return allProperties; | |||||
} | |||||
/** | /** | ||||
* Log a message as a build event | * Log a message as a build event | ||||
* | * | ||||
@@ -54,6 +54,9 @@ | |||||
package org.apache.tools.ant; | package org.apache.tools.ant; | ||||
import java.io.File; | import java.io.File; | ||||
import java.io.IOException; | import java.io.IOException; | ||||
import java.util.Hashtable; | |||||
import java.util.Map; | |||||
import java.util.Iterator; | |||||
import org.apache.ant.common.antlib.AntContext; | import org.apache.ant.common.antlib.AntContext; | ||||
import org.apache.ant.common.service.DataService; | import org.apache.ant.common.service.DataService; | ||||
import org.apache.ant.common.service.FileService; | import org.apache.ant.common.service.FileService; | ||||
@@ -618,5 +621,49 @@ public class Project { | |||||
throw new BuildException(e); | throw new BuildException(e); | ||||
} | } | ||||
} | } | ||||
/** | |||||
* get a copy of the property hashtable | |||||
* @return the hashtable containing all properties, user included | |||||
*/ | |||||
public Hashtable getProperties() { | |||||
Map properties = dataService.getAllProperties(); | |||||
Hashtable result = new Hashtable(); | |||||
for (Iterator i = properties.keySet().iterator(); i.hasNext();) { | |||||
String name = (String)i.next(); | |||||
Object value = properties.get(name); | |||||
if (value instanceof String) { | |||||
result.put(name, value); | |||||
} | |||||
} | |||||
return result; | |||||
} | |||||
/** | |||||
* get a copy of the property hashtable | |||||
* @return the hashtable containing all properties, user included | |||||
*/ | |||||
public Hashtable getUserProperties() { | |||||
return getProperties(); | |||||
} | |||||
/** | |||||
* Get all references in the project | |||||
* @return the hashtable containing all references | |||||
*/ | |||||
public Hashtable getReferences() { | |||||
Map properties = dataService.getAllProperties(); | |||||
Hashtable result = new Hashtable(); | |||||
for (Iterator i = properties.keySet().iterator(); i.hasNext();) { | |||||
String name = (String)i.next(); | |||||
Object value = properties.get(name); | |||||
if (!(value instanceof String)) { | |||||
result.put(name, value); | |||||
} | |||||
} | |||||
return result; | |||||
} | |||||
} | } | ||||
@@ -128,5 +128,14 @@ public interface DataService { | |||||
String replacePropertyRefs(String value, Map replacementValues) | String replacePropertyRefs(String value, Map replacementValues) | ||||
throws ExecutionException; | throws ExecutionException; | ||||
/** | |||||
* Get all the properties from the frame and any references frames. This | |||||
* is an expensive operation since it must clone all of the property | |||||
* stores in all frames | |||||
* | |||||
* @return a Map containing the frames properties indexed by their full name. | |||||
*/ | |||||
Map getAllProperties(); | |||||
} | } | ||||