[Assorted-commits] SF.net SVN: assorted:[935] sandbox/trunk/src
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-08-08 21:01:57
|
Revision: 935 http://assorted.svn.sourceforge.net/assorted/?rev=935&view=rev Author: yangzhang Date: 2008-08-08 21:02:03 +0000 (Fri, 08 Aug 2008) Log Message: ----------- added ant sandbox Added Paths: ----------- sandbox/trunk/src/ant/ sandbox/trunk/src/ant/system-property-propagation/ sandbox/trunk/src/ant/system-property-propagation/SystemPropertyTest.java sandbox/trunk/src/ant/system-property-propagation/build.xml Added: sandbox/trunk/src/ant/system-property-propagation/SystemPropertyTest.java =================================================================== --- sandbox/trunk/src/ant/system-property-propagation/SystemPropertyTest.java (rev 0) +++ sandbox/trunk/src/ant/system-property-propagation/SystemPropertyTest.java 2008-08-08 21:02:03 UTC (rev 935) @@ -0,0 +1,6 @@ +public class SystemPropertyTest { + public static void main(String[] args) { + System.out.println(System.getProperties().containsKey("nojsampler")); + System.out.println(System.getProperties().containsKey("nojsampler") && !System.getProperty("nojsampler").equals("")); + } +} Copied: sandbox/trunk/src/ant/system-property-propagation/build.xml (from rev 923, sandbox/trunk/src/java/java-from-c/build.xml) =================================================================== --- sandbox/trunk/src/ant/system-property-propagation/build.xml (rev 0) +++ sandbox/trunk/src/ant/system-property-propagation/build.xml 2008-08-08 21:02:03 UTC (rev 935) @@ -0,0 +1,14 @@ +<?xml version="1.0" ?> +<project default="all"> + <!-- properties set from the command line get the same treatment as the ones + set in property tasks here --> + <!-- this doesn't get propagated --> + <property name="nojsampler" value="asdf"/> + <target name="all"> + <javac target="1.6" srcdir="." destdir="."/> + <java fork="yes" classname="SystemPropertyTest"> + <!-- only this works --> + <sysproperty key="nojsampler" value="${nojsampler}"/> + </java> + </target> +</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |