You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jacob Beard <jb...@cs.mcgill.ca> on 2010/09/08 02:47:08 UTC

ant-contrib 1.0b3 broken?

Hi,

I'm trying to use ant-contrib 1.0b2 or 1.0b3, because that's what's
available in the standard maven repos. In the past, I've used
ant-contrib 0.6, which has worked fine, but I cannot seem to declare
1.0b2 or 1.0b3. For example, the following build file works as
expected with ant-contrib 0.6, echoing foo, bar and bat:


<project name="test-antcontrib" basedir="." default="use-antcontrib">
	
	<property name="list" value="foo,bar,bat"/>

	<target name="setup-antcontrib">
		<taskdef resource="net/sf/antcontrib/antcontrib.properties">
			<classpath>
				<pathelement location="ant-contrib-0.6.jar" />
			</classpath>
		</taskdef>
	</target>
	
	<target name="use-antcontrib" depends="setup-antcontrib">
		<for list="${list}" param="var">
			<sequential>
				<echo>@{var}</echo>
			</sequential>
		</for>
	</target>
</project>


But this build file, using ant-contrib 1.0b3, fails:


<project name="test-antcontrib" basedir="." default="use-antcontrib">
	
	<property name="list" value="foo,bar,bat"/>

	<target name="setup-antcontrib">
		<taskdef resource="net/sf/antcontrib/antcontrib.properties">
			<classpath>
				<pathelement location="ant-contrib-1.0b3.jar"/>
			</classpath>
		</taskdef>
	</target>
	
	<target name="use-antcontrib" depends="setup-antcontrib">
		<for list="${list}" param="var">
			<sequential>
				<echo>@{var}</echo>
			</sequential>
		</for>
	</target>
</project>


With the following error:


BUILD FAILED
/home/jacob/workspace/gsoc2010/git-scxml-js/scxml-js/test-antcontrib.xml:36:
Problem: failed to create task or type for
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.


As I said, I've tried 1.0b2 and 20020829 versions which are also in
the maven repo. I've also tried using the 1.0b3 version from
sourceforge, but the results are the same.

I was wondering if anyone else had experienced this problem. Let me
know what you think. Thanks,

Jake

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: ant-contrib 1.0b3 broken?

Posted by Gilbert Rebhan <gi...@maksimo.de>.
-------- Original Message  --------
Subject: Re: ant-contrib 1.0b3 broken?
From: Jacob Beard <jb...@cs.mcgill.ca>
To: Ant Users List <us...@ant.apache.org>
Date: 08.09.2010 04:03

> Thanks for the replies. XML namespace mapping does work fine, as is
> written in the docs included with later ant-contrib. For the record,
> here's what I have that works:
> 
> <project name="test-antcontrib" basedir="." default="use-antcontrib">
> 	
> 	<property name="list" value="foo,bar,bat"/>
> 

[...]

i had some probs when trying antcontrib 1.0b3, the <assert> task didn't
work for me and seems to be broken !?
see =
http://marc.info/?l=ant-user&m=119451257231990&w=2

Does the example from antcontrib manual work for you ??

Alternatives for antcontrib are =

antelope = http://antelope.tigris.org/
anxtras  = http://jwaresoftware.org/wiki/



Regards, Gilbert



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: ant-contrib 1.0b3 broken?

Posted by Jacob Beard <jb...@cs.mcgill.ca>.
Thanks for the replies. XML namespace mapping does work fine, as is
written in the docs included with later ant-contrib. For the record,
here's what I have that works:

<project name="test-antcontrib" basedir="." default="use-antcontrib">
	
	<property name="list" value="foo,bar,bat"/>

	<target name="setup-antcontrib">
		<taskdef resource="net/sf/antcontrib/antlib.xml">
			<classpath>
				<pathelement location="ant-contrib-1.0b3.jar"/>
			</classpath>
		</taskdef>
	</target>
	
	<target name="use-antcontrib" depends="setup-antcontrib">
		<for list="${list}" param="var">
			<sequential>
				<echo>@{var}</echo>
			</sequential>
		</for>
	</target>
</project>


Thanks,

Jake

On Tue, Sep 7, 2010 at 9:00 PM, Matt Benson <gu...@gmail.com> wrote:
> This is because late-ish versions of antcontrib are defined as an antlib, so newer tasks aren't in the old-style properties file.  Using xml namespace mapping, for example, works fine.
>
> HTH,
> Matt
>
> On Sep 7, 2010, at 7:55 PM, Jonathan Rosenberg wrote:
>
>> I had to declare the <for> task via its own <taskdef> to get it to work,
>>
>> --
>> Jonathan Rosenberg
>> Founder & Executive Director
>> Tabby's Place
>> http://www.tabbysplace.org
>>
>>
>> -----Original Message-----
>> From: Jacob Beard [mailto:jbeard4@cs.mcgill.ca]
>> Sent: Tuesday, September 07, 2010 8:47 PM
>> To: user@ant.apache.org
>> Subject: ant-contrib 1.0b3 broken?
>>
>>
>> Hi,
>>
>> I'm trying to use ant-contrib 1.0b2 or 1.0b3, because that's what's
>> available in the standard maven repos. In the past, I've used
>> ant-contrib 0.6, which has worked fine, but I cannot seem to declare
>> 1.0b2 or 1.0b3. For example, the following build file works as
>> expected with ant-contrib 0.6, echoing foo, bar and bat:
>>
>>
>> <project name="test-antcontrib" basedir="." default="use-antcontrib">
>>
>>       <property name="list" value="foo,bar,bat"/>
>>
>>       <target name="setup-antcontrib">
>>               <taskdef resource="net/sf/antcontrib/antcontrib.properties">
>>                       <classpath>
>>                               <pathelement location="ant-contrib-0.6.jar"
>> />
>>                       </classpath>
>>               </taskdef>
>>       </target>
>>
>>       <target name="use-antcontrib" depends="setup-antcontrib">
>>               <for list="${list}" param="var">
>>                       <sequential>
>>                               <echo>@{var}</echo>
>>                       </sequential>
>>               </for>
>>       </target>
>> </project>
>>
>>
>> But this build file, using ant-contrib 1.0b3, fails:
>>
>>
>> <project name="test-antcontrib" basedir="." default="use-antcontrib">
>>
>>       <property name="list" value="foo,bar,bat"/>
>>
>>       <target name="setup-antcontrib">
>>               <taskdef resource="net/sf/antcontrib/antcontrib.properties">
>>                       <classpath>
>>                               <pathelement
>> location="ant-contrib-1.0b3.jar"/>
>>                       </classpath>
>>               </taskdef>
>>       </target>
>>
>>       <target name="use-antcontrib" depends="setup-antcontrib">
>>               <for list="${list}" param="var">
>>                       <sequential>
>>                               <echo>@{var}</echo>
>>                       </sequential>
>>               </for>
>>       </target>
>> </project>
>>
>>
>> With the following error:
>>
>>
>> BUILD FAILED
>> /home/jacob/workspace/gsoc2010/git-scxml-js/scxml-js/test-antcontrib.xml:36:
>> Problem: failed to create task or type for
>> Cause: The name is undefined.
>> Action: Check the spelling.
>> Action: Check that any custom tasks/types have been declared.
>> Action: Check that any <presetdef>/<macrodef> declarations have taken place.
>>
>>
>> As I said, I've tried 1.0b2 and 20020829 versions which are also in
>> the maven repo. I've also tried using the 1.0b3 version from
>> sourceforge, but the results are the same.
>>
>> I was wondering if anyone else had experienced this problem. Let me
>> know what you think. Thanks,
>>
>> Jake
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: ant-contrib 1.0b3 broken?

Posted by Matt Benson <gu...@gmail.com>.
This is because late-ish versions of antcontrib are defined as an antlib, so newer tasks aren't in the old-style properties file.  Using xml namespace mapping, for example, works fine.

HTH,
Matt

On Sep 7, 2010, at 7:55 PM, Jonathan Rosenberg wrote:

> I had to declare the <for> task via its own <taskdef> to get it to work,
> 
> --
> Jonathan Rosenberg
> Founder & Executive Director
> Tabby's Place
> http://www.tabbysplace.org
> 
> 
> -----Original Message-----
> From: Jacob Beard [mailto:jbeard4@cs.mcgill.ca] 
> Sent: Tuesday, September 07, 2010 8:47 PM
> To: user@ant.apache.org
> Subject: ant-contrib 1.0b3 broken?
> 
> 
> Hi,
> 
> I'm trying to use ant-contrib 1.0b2 or 1.0b3, because that's what's
> available in the standard maven repos. In the past, I've used
> ant-contrib 0.6, which has worked fine, but I cannot seem to declare
> 1.0b2 or 1.0b3. For example, the following build file works as
> expected with ant-contrib 0.6, echoing foo, bar and bat:
> 
> 
> <project name="test-antcontrib" basedir="." default="use-antcontrib">
> 	
> 	<property name="list" value="foo,bar,bat"/>
> 
> 	<target name="setup-antcontrib">
> 		<taskdef resource="net/sf/antcontrib/antcontrib.properties">
> 			<classpath>
> 				<pathelement location="ant-contrib-0.6.jar"
> />
> 			</classpath>
> 		</taskdef>
> 	</target>
> 	
> 	<target name="use-antcontrib" depends="setup-antcontrib">
> 		<for list="${list}" param="var">
> 			<sequential>
> 				<echo>@{var}</echo>
> 			</sequential>
> 		</for>
> 	</target>
> </project>
> 
> 
> But this build file, using ant-contrib 1.0b3, fails:
> 
> 
> <project name="test-antcontrib" basedir="." default="use-antcontrib">
> 	
> 	<property name="list" value="foo,bar,bat"/>
> 
> 	<target name="setup-antcontrib">
> 		<taskdef resource="net/sf/antcontrib/antcontrib.properties">
> 			<classpath>
> 				<pathelement
> location="ant-contrib-1.0b3.jar"/>
> 			</classpath>
> 		</taskdef>
> 	</target>
> 	
> 	<target name="use-antcontrib" depends="setup-antcontrib">
> 		<for list="${list}" param="var">
> 			<sequential>
> 				<echo>@{var}</echo>
> 			</sequential>
> 		</for>
> 	</target>
> </project>
> 
> 
> With the following error:
> 
> 
> BUILD FAILED
> /home/jacob/workspace/gsoc2010/git-scxml-js/scxml-js/test-antcontrib.xml:36:
> Problem: failed to create task or type for
> Cause: The name is undefined.
> Action: Check the spelling.
> Action: Check that any custom tasks/types have been declared.
> Action: Check that any <presetdef>/<macrodef> declarations have taken place.
> 
> 
> As I said, I've tried 1.0b2 and 20020829 versions which are also in
> the maven repo. I've also tried using the 1.0b3 version from
> sourceforge, but the results are the same.
> 
> I was wondering if anyone else had experienced this problem. Let me
> know what you think. Thanks,
> 
> Jake
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: ant-contrib 1.0b3 broken?

Posted by Jonathan Rosenberg <jr...@tabbysplace.org>.
I had to declare the <for> task via its own <taskdef> to get it to work,

--
Jonathan Rosenberg
Founder & Executive Director
Tabby's Place
http://www.tabbysplace.org


-----Original Message-----
From: Jacob Beard [mailto:jbeard4@cs.mcgill.ca] 
Sent: Tuesday, September 07, 2010 8:47 PM
To: user@ant.apache.org
Subject: ant-contrib 1.0b3 broken?


Hi,

I'm trying to use ant-contrib 1.0b2 or 1.0b3, because that's what's
available in the standard maven repos. In the past, I've used
ant-contrib 0.6, which has worked fine, but I cannot seem to declare
1.0b2 or 1.0b3. For example, the following build file works as
expected with ant-contrib 0.6, echoing foo, bar and bat:


<project name="test-antcontrib" basedir="." default="use-antcontrib">
	
	<property name="list" value="foo,bar,bat"/>

	<target name="setup-antcontrib">
		<taskdef resource="net/sf/antcontrib/antcontrib.properties">
			<classpath>
				<pathelement location="ant-contrib-0.6.jar"
/>
			</classpath>
		</taskdef>
	</target>
	
	<target name="use-antcontrib" depends="setup-antcontrib">
		<for list="${list}" param="var">
			<sequential>
				<echo>@{var}</echo>
			</sequential>
		</for>
	</target>
</project>


But this build file, using ant-contrib 1.0b3, fails:


<project name="test-antcontrib" basedir="." default="use-antcontrib">
	
	<property name="list" value="foo,bar,bat"/>

	<target name="setup-antcontrib">
		<taskdef resource="net/sf/antcontrib/antcontrib.properties">
			<classpath>
				<pathelement
location="ant-contrib-1.0b3.jar"/>
			</classpath>
		</taskdef>
	</target>
	
	<target name="use-antcontrib" depends="setup-antcontrib">
		<for list="${list}" param="var">
			<sequential>
				<echo>@{var}</echo>
			</sequential>
		</for>
	</target>
</project>


With the following error:


BUILD FAILED
/home/jacob/workspace/gsoc2010/git-scxml-js/scxml-js/test-antcontrib.xml:36:
Problem: failed to create task or type for
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.


As I said, I've tried 1.0b2 and 20020829 versions which are also in
the maven repo. I've also tried using the 1.0b3 version from
sourceforge, but the results are the same.

I was wondering if anyone else had experienced this problem. Let me
know what you think. Thanks,

Jake

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org