You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Glen Mazza <gm...@apache.org> on 2006/02/28 14:55:26 UTC

Have an Ant script run even with missing JARs?

Hello,

I have an Ant build script for dynamic deployment of a web application 
to Tomcat.  This requires a special Tomcat JARs to be added to the Ant 
lib directory to run.  No problem here--Ant runs fine once I add the jar.

But I have small additional target unrelated to deployment I would like 
my tech writer (she knows how to use Ant) to use to do some 
testing/modification of a stylesheet.  When I gave her the buildfile, 
Ant refused to run the target because it could not find the Tomcat JARs 
mentioned above--even though these JARs are not used in this particular 
target.

Of the two immediate solutions--quickly dump the Tomcat JAR in her 
Ant/lib directory, or just comment out the deployment task in her 
version of the file, I did the latter--and everything works fine.

But question--do I have a third option--is there an option I can set to 
have Ant run even if it is missing some optional JARS, *if* those JARs 
are unneeded by the specific target being run?

Thanks,
Glen

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


Re: Have an Ant script run even with missing JARs?

Posted by Glen Mazza <gm...@apache.org>.
James Abley wrote:

> What scope are you doing the taskdefs for the Tomcat ANT tasks?
> 

I guess "global" -- the <taskdef/>s are immediate children of the 
<project/> root.  But I was unaware of the concept of scope in Ant -- 
where is it defined in the manual[1]--I can read up on this, or if 
someone can give me a quick example of what to do here, it would be 
appreciated.

Thanks,
Glen

[1] http://ant.apache.org/manual/index.html

> On Tue, 2006-02-28 at 13:55, Glen Mazza wrote:
> 
>>Hello,
>>
>>I have an Ant build script for dynamic deployment of a web application 
>>to Tomcat.  This requires a special Tomcat JARs to be added to the Ant 
>>lib directory to run.  No problem here--Ant runs fine once I add the jar.
>>
>>But I have small additional target unrelated to deployment I would like 
>>my tech writer (she knows how to use Ant) to use to do some 
>>testing/modification of a stylesheet.  When I gave her the buildfile, 
>>Ant refused to run the target because it could not find the Tomcat JARs 
>>mentioned above--even though these JARs are not used in this particular 
>>target.
>>
>>Of the two immediate solutions--quickly dump the Tomcat JAR in her 
>>Ant/lib directory, or just comment out the deployment task in her 
>>version of the file, I did the latter--and everything works fine.
>>
>>But question--do I have a third option--is there an option I can set to 
>>have Ant run even if it is missing some optional JARS, *if* those JARs 
>>are unneeded by the specific target being run?
>>
>>Thanks,
>>Glen
>>
>>---------------------------------------------------------------------
>>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: Have an Ant script run even with missing JARs?

Posted by James Abley <ja...@volantis.com>.
What scope are you doing the taskdefs for the Tomcat ANT tasks?

On Tue, 2006-02-28 at 13:55, Glen Mazza wrote:
> Hello,
> 
> I have an Ant build script for dynamic deployment of a web application 
> to Tomcat.  This requires a special Tomcat JARs to be added to the Ant 
> lib directory to run.  No problem here--Ant runs fine once I add the jar.
> 
> But I have small additional target unrelated to deployment I would like 
> my tech writer (she knows how to use Ant) to use to do some 
> testing/modification of a stylesheet.  When I gave her the buildfile, 
> Ant refused to run the target because it could not find the Tomcat JARs 
> mentioned above--even though these JARs are not used in this particular 
> target.
> 
> Of the two immediate solutions--quickly dump the Tomcat JAR in her 
> Ant/lib directory, or just comment out the deployment task in her 
> version of the file, I did the latter--and everything works fine.
> 
> But question--do I have a third option--is there an option I can set to 
> have Ant run even if it is missing some optional JARS, *if* those JARs 
> are unneeded by the specific target being run?
> 
> Thanks,
> Glen
> 
> ---------------------------------------------------------------------
> 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