git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270237 13f79535-47bb-0310-9956-ffa450edef68master
@@ -11,11 +11,11 @@ import org.apache.myrmidon.api.AbstractTask; | |||
import org.apache.myrmidon.api.TaskException; | |||
/** | |||
* This is the echo task to display a message. | |||
* This is a task used to log messages in the build file. | |||
* | |||
* @author <a href="mailto:peter@apache.org">Peter Donald</a> | |||
*/ | |||
public class Echo | |||
public class Log | |||
extends AbstractTask | |||
{ | |||
private String m_message; |
@@ -6,7 +6,7 @@ | |||
Basic tests build file | |||
Authors: | |||
Peter Donald <donaldp@apache.org> | |||
Peter Donald <peter@apache.org> | |||
Legal: | |||
Copyright (c) 2000 The Apache Software Foundation. All Rights Reserved. | |||
@@ -26,24 +26,24 @@ Legal: | |||
<!-- | |||
<file-manip-test base-directory="."> | |||
<source> | |||
<include value="**/*.java" /> | |||
<include value="**/*.java" /> | |||
</source> | |||
</file-manip-test> | |||
--> | |||
</target> | |||
<target name="undefined-task"> | |||
<echo message="About to execute task that hasn't been defined"/> | |||
<echo2 message="This should have failed"/> | |||
<log message="About to execute task that hasn't been defined"/> | |||
<log2 message="This should have failed"/> | |||
</target> | |||
<target name="no-test-target" if="no-do-tests"> | |||
<echo message="No tests done here"/> | |||
<log message="No tests done here"/> | |||
</target> | |||
<target name="test-target" depends="no-test-target,extensions-test" unless="no-do-tests"> | |||
<echo message="Tests away"/> | |||
<log message="Tests away"/> | |||
<prim-test | |||
integer="1" | |||
@@ -67,9 +67,9 @@ Legal: | |||
</sub-elements-test> | |||
<conf-test message="..." /> | |||
<content-test>123</content-test> | |||
</target> | |||
<target name="extensions-test"> | |||
@@ -26,7 +26,7 @@ Legal: | |||
<target name="all" depends="property-test, typedef-test, converterdef-test, ant-call-test, datatype-test, namespace-test, ant1-tasklib-test, prim->main" /> | |||
<!-- | |||
<!-- | |||
<register-tasklib lib="../../dist/lib/core.atl" /> | |||
--> | |||
@@ -34,16 +34,16 @@ Legal: | |||
<property name="blah" value="fred" /> | |||
<property name="${blah}" value="barney" /> | |||
<echo message="Doing the funky Echo with ${blah} ${fred} Year=${year}!"/> | |||
<log message="Doing the funky Echo with ${blah} ${fred} Year=${year}!"/> | |||
</target> | |||
<target name="typedef-test"> | |||
<typedef name="echo2" | |||
type="task" | |||
classname="org.apache.myrmidon.libs.core.Echo" | |||
<typedef name="log2" | |||
type="task" | |||
classname="org.apache.myrmidon.libs.core.Log" | |||
lib="../../dist/lib/core.atl" /> | |||
<echo2 message="Luke to Echo base. Can you hear me?"/> | |||
<log2 message="Luke to Echo base. Can you hear me?"/> | |||
</target> | |||
<target name="converterdef-test"> | |||
@@ -51,11 +51,11 @@ Legal: | |||
source-type="java.lang.String" | |||
destination-type="java.lang.Class" | |||
lib="../../dist/lib/core.atl" /> | |||
</target> | |||
</target> | |||
<target name="ant-call-test"> | |||
<!-- test elided until we decide scope and necessity of ant-call --> | |||
<echo message="AntCall test elided until we decide scope and necessity of ant-call"/> | |||
<log message="AntCall test elided until we decide scope and necessity of ant-call"/> | |||
<!-- | |||
<ant-call target="ant-call-test-target"> | |||
<param name="blah" value="blah-value" /> | |||
@@ -64,9 +64,9 @@ Legal: | |||
</target> | |||
<target name="ant-call-test-target"> | |||
<echo message="This should fail ...."/> | |||
<echo message="${blah}"/> | |||
<echo message="Whoa - it no fail. You used ant-call to call me and set param blah!"/> | |||
<log message="This should fail ...."/> | |||
<log message="${blah}"/> | |||
<log message="Whoa - it no fail. You used ant-call to call me and set param blah!"/> | |||
</target> | |||
<target name="datatype-test"> | |||
@@ -76,26 +76,26 @@ Legal: | |||
<pattern id="foo2" value="*.java" if="..." /> | |||
<echo message="foo=${foo}" /> | |||
<echo message="foo2=${foo2}" /> | |||
<log message="foo=${foo}" /> | |||
<log message="foo2=${foo2}" /> | |||
</target> | |||
<target name="namespace-test"> | |||
<!-- ant and doc are built in namespaces --> | |||
<echo ant:fail-on-error="true" message="Some random message"> | |||
<log ant:fail-on-error="true" message="Some random message"> | |||
<doc:description> | |||
Test case for aspects | |||
</doc:description> | |||
<ant:some-element some-attribute="blah"/> | |||
</echo> | |||
</log> | |||
<!-- load facility for blee: namespace --> | |||
<facility namespace="blee"> | |||
<noop/> | |||
</facility> | |||
<echo blee:some-param="blah" message="Blee namespace test successful!"/> | |||
<log blee:some-param="blah" message="Blee namespace test successful!"/> | |||
</target> | |||
@@ -104,7 +104,7 @@ Legal: | |||
<!-- | |||
<ant1-tasklib prefix="a1-" lib="../../dist/lib/ant1-compat.jar"/> | |||
<a1-echo message="Boo!" /> | |||
<a1-log message="Boo!" /> | |||
<a1-mkdir dir="../../dist/test"/> | |||
<a1-copy file="../../tools/lib/ant.jar" tofile="../../dist/test/ant1-compat.jar" /> | |||
--> | |||
@@ -9,11 +9,11 @@ | |||
<target name="main"> | |||
<property name="year" value="2000"/> | |||
<echo message="Before template"/> | |||
<echo-template msg="Template echo 1!" /> | |||
<echo-template msg="Template echo 2!" /> | |||
<echo-template msg="Template echo 3!" /> | |||
<echo message="After template"/> | |||
<log message="Before template"/> | |||
<log-template msg="Template log 1!" /> | |||
<log-template msg="Template log 2!" /> | |||
<log-template msg="Template log 3!" /> | |||
<log message="After template"/> | |||
</target> | |||
</project> |
@@ -2,11 +2,11 @@ | |||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |||
<xsl:template match="echo-template"> | |||
<echo message="This is an example of how to use a template to expand" /> | |||
<echo message="a single element into a list of tasks to do. In this" /> | |||
<echo message="example it is largely a case of echoing an attribute" /> | |||
<echo message="ie. msg='{@msg}' and embeddding an ant variable ${{year}}" /> | |||
<xsl:template match="log-template"> | |||
<log message="This is an example of how to use a template to expand" /> | |||
<log message="a single element into a list of tasks to do. In this" /> | |||
<log message="example it is largely a case of echoing an attribute" /> | |||
<log message="ie. msg='{@msg}' and embeddding an ant variable ${{year}}" /> | |||
</xsl:template> | |||
<xsl:template match="@*|node()"> | |||
@@ -3,7 +3,7 @@ | |||
<types> | |||
<!-- basic tasks/datatypes/coverters required in most environments --> | |||
<task name="echo" classname="org.apache.myrmidon.libs.core.Echo" /> | |||
<task name="log" classname="org.apache.myrmidon.libs.core.Log" /> | |||
<task name="property" classname="org.apache.myrmidon.libs.core.Property" /> | |||
</types> | |||