commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/ant suite.jelly
Date Mon, 23 Sep 2002 12:35:42 GMT
jstrachan    2002/09/23 05:35:42

  Modified:    jelly/src/test/org/apache/commons/jelly/ant suite.jelly
  Log:
  Added a new <setProperty> tag which allows properties to be set on the parent Ant
task which are ignored if the expression is empty. This provides better handling of configurable
properties on Ant Tasks when using Maven plugins.
  
  e.g.
  
  <jmxdoclet>
      <setProperty name="destdir" value="${maven.xdoclet.jmxdoclet.destdir}"/>
  </jmxdoclet>
  
  The <setProperty> tag can also take an optional default you want to code in your plugin
(to override the Ant task default).
  
  e.g.
  
  <jmxdoclet>
      <setProperty name="destdir" value="${maven.xdoclet.jmxdoclet.destdir}" default="{0}Home"/>
  </jmxdoclet>
  
  If the value expression of <setProperty> is null then the property is not set, preserving
the underlying default in the Ant task.
  
  Revision  Changes    Path
  1.2       +18 -0     jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/ant/suite.jelly
  
  Index: suite.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/ant/suite.jelly,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- suite.jelly	27 Aug 2002 14:04:44 -0000	1.1
  +++ suite.jelly	23 Sep 2002 12:35:42 -0000	1.2
  @@ -96,4 +96,22 @@
   
   </test:case-->
   
  +
  +
  +<test:case name="startUpReadWrite">
  +
  +  <j:set var="foo" value="setting the message worked!"/>
  +
  +	<ant:echo>
  +		<ant:setProperty name="message" value="${foo}"/>
  +  </ant:echo>
  +  
  +	<ant:echo>
  +		<ant:setProperty name="message" value="${bar}" default="the default also worked"/>
  +  </ant:echo>
  +
  +	<!-- haven't thought of a neat way to test this yet... -->  
  +</test:case>
  +
  +
   </test:suite>
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message