ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@gmail.com>
Subject Re: ant-contrib 1.0b3 broken?
Date Wed, 08 Sep 2010 01:00:19 GMT
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


Mime
View raw message