You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nathan Coast <na...@codeczar.com> on 2003/09/22 13:21:40 UTC

JUnit taskdef

Hi,

I have a plugin that contains a taskdef for the ant JUnit task.  I 
copied the code from the test plugin but I get this error.

taskdef class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask 
cannot be found.

Any ideas how I'd make the ant optional tasks availabble to my plugin?

cheers
Nathan



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: JUnit taskdef

Posted by Nathan Coast <na...@codeczar.com>.
I've tried this too, which also doesn't work

     <dependency>
        <artifactId>ant-optional</artifactId>
        <groupId>ant</groupId>
        <version>1.5.3-1</version>
     </dependency>


Nathan Coast wrote:

> cheers,
> 
> I've tried adding this to the plugin's project.xml
> 
>     <dependency>
>        <id>ant-optional</id>
>        <groupId>ant</groupId>
>        <version>1.5.3-1</version>
>     </dependency>
> 
> and this to the plugin.jelly
> 
> <taskdef name="junit"
> classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
> classpath="${plugin.getDependencyPath('ant-optional')}" />
> 
> but it still doesn't work :(
> 
> Andy Jefferson wrote:
> 
>> On Monday 22 Sep 2003 12:21, Nathan Coast wrote:
>>
>>> Hi,
>>>
>>> I have a plugin that contains a taskdef for the ant JUnit task.  I
>>> copied the code from the test plugin but I get this error.
>>>
>>> taskdef class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
>>> cannot be found.
>>>
>>> Any ideas how I'd make the ant optional tasks availabble to my plugin?
>>
>>
>>
>> Put "ant-optional" in the project.xml of your plugin, and then add 
>> <pathelement path="${plugin.getDependencyPath('ant-optional')}"/>
>> to your CLASSPATH in the plugin.jelly
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: JUnit taskdef

Posted by di...@multitask.com.au.
> cheers,
> 
> I've tried adding this to the plugin's project.xml
> 
>      <dependency>
>         <id>ant-optional</id>
>         <groupId>ant</groupId>
>         <version>1.5.3-1</version>
>      </dependency>
> 
> and this to the plugin.jelly
> 
> <taskdef name="junit"
> classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
> classpath="${plugin.getDependencyPath('ant-optional')}" />
> 
> but it still doesn't work :(
I'd say you need Ant-optional as well as Junit to run that task as well as 
some other jars.
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/


Nathan Coast <na...@codeczar.com> wrote on 22/09/2003 09:43:33 PM:



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: JUnit taskdef

Posted by Nathan Coast <na...@codeczar.com>.
cheers,

I've tried adding this to the plugin's project.xml

     <dependency>
        <id>ant-optional</id>
        <groupId>ant</groupId>
        <version>1.5.3-1</version>
     </dependency>

and this to the plugin.jelly

<taskdef name="junit"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
classpath="${plugin.getDependencyPath('ant-optional')}" />

but it still doesn't work :(

Andy Jefferson wrote:
> On Monday 22 Sep 2003 12:21, Nathan Coast wrote:
> 
>>Hi,
>>
>>I have a plugin that contains a taskdef for the ant JUnit task.  I
>>copied the code from the test plugin but I get this error.
>>
>>taskdef class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
>>cannot be found.
>>
>>Any ideas how I'd make the ant optional tasks availabble to my plugin?
> 
> 
> Put "ant-optional" in the project.xml of your plugin, and then add 
> <pathelement path="${plugin.getDependencyPath('ant-optional')}"/>
> to your CLASSPATH in the plugin.jelly
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: JUnit taskdef

Posted by Andy Jefferson <an...@ajsoft.net>.
On Monday 22 Sep 2003 12:21, Nathan Coast wrote:
> Hi,
>
> I have a plugin that contains a taskdef for the ant JUnit task.  I
> copied the code from the test plugin but I get this error.
>
> taskdef class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
> cannot be found.
>
> Any ideas how I'd make the ant optional tasks availabble to my plugin?

Put "ant-optional" in the project.xml of your plugin, and then add 
<pathelement path="${plugin.getDependencyPath('ant-optional')}"/>
to your CLASSPATH in the plugin.jelly

-- 
Andy


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: JUnit taskdef

Posted by di...@multitask.com.au.
Show us your POM.
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/


Nathan Coast <na...@codeczar.com> wrote on 22/09/2003 09:21:40 PM:

> Hi,
> 
> I have a plugin that contains a taskdef for the ant JUnit task.  I 
> copied the code from the test plugin but I get this error.
> 
> taskdef class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask 
> cannot be found.
> 
> Any ideas how I'd make the ant optional tasks availabble to my plugin?
> 
> cheers
> Nathan
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org