You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Marc Lustig <ma...@infodesire.com> on 2005/02/23 16:57:42 UTC

how to run ant-task calling a custom task

Hi,

I'm having some trouble running an ant-task which launches a custom-ant-task 
(class).

In my maven.xml I have specified the ant-call:
<ant:ant dir="${basedir}" antfile="build.xml" target="mytarget" />

I'm getting error message stating that the custom ant-task could not be found.
This class is in a jar that is placed in both ant/lib and maven/lib!

running 'ant mytarget' works smoothly!

Anybody having an idea why the jar is not being loaded when the target is 
launched from maven?

Regards 
	Marc


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


Re: how to run ant-target calling a custom task

Posted by baleineca <ba...@gmail.com>.
I use classpath attribute in the taskdef tag that points to custom ant 
task jar.  My jar happens to be in ${maven.repo.local}...

Marc Lustig wrote:

>thanks, but my problem is not the call itself.
>The ant target of build.xml is successfully launched.
>Problem is that my custom task which is loaded inside the ant goal, cannot be 
>found. Although the corresponding class is in both ant/lib and maven/lib.
>
>Anymore idea?
>
>
>
>Am Mittwoch, 23. Februar 2005 20:37 schrieb Anne-Simone:
>  
>
>>I am successfully using a custom ant task in my build, but I don't use
>>an ant build.xml.  I have <ant:taskdef name="foo" ...> directly in my
>>maven goal.  I can then use <ant:foo ... > just as I would in an ant
>>build.xml.
>>
>>
>>On Wed, 23 Feb 2005 16:57:42 +0100, Marc Lustig
>>
>><ma...@infodesire.com> wrote:
>>    
>>
>>>Hi,
>>>
>>>I'm having some trouble running an ant-task which launches a
>>>custom-ant-task (class).
>>>
>>>In my maven.xml I have specified the ant-call:
>>><ant:ant dir="${basedir}" antfile="build.xml" target="mytarget" />
>>>
>>>I'm getting error message stating that the custom ant-task could not be
>>>found. This class is in a jar that is placed in both ant/lib and
>>>maven/lib!
>>>
>>>running 'ant mytarget' works smoothly!
>>>
>>>Anybody having an idea why the jar is not being loaded when the target is
>>>launched from maven?
>>>
>>>Regards
>>>        Marc
>>>
>>>---------------------------------------------------------------------
>>>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
>>    
>>
>
>  
>

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


how to run ant-target calling a custom task

Posted by Marc Lustig <ma...@infodesire.com>.
thanks, but my problem is not the call itself.
The ant target of build.xml is successfully launched.
Problem is that my custom task which is loaded inside the ant goal, cannot be 
found. Although the corresponding class is in both ant/lib and maven/lib.

Anymore idea?



Am Mittwoch, 23. Februar 2005 20:37 schrieb Anne-Simone:
> I am successfully using a custom ant task in my build, but I don't use
> an ant build.xml.  I have <ant:taskdef name="foo" ...> directly in my
> maven goal.  I can then use <ant:foo ... > just as I would in an ant
> build.xml.
>
>
> On Wed, 23 Feb 2005 16:57:42 +0100, Marc Lustig
>
> <ma...@infodesire.com> wrote:
> > Hi,
> >
> > I'm having some trouble running an ant-task which launches a
> > custom-ant-task (class).
> >
> > In my maven.xml I have specified the ant-call:
> > <ant:ant dir="${basedir}" antfile="build.xml" target="mytarget" />
> >
> > I'm getting error message stating that the custom ant-task could not be
> > found. This class is in a jar that is placed in both ant/lib and
> > maven/lib!
> >
> > running 'ant mytarget' works smoothly!
> >
> > Anybody having an idea why the jar is not being loaded when the target is
> > launched from maven?
> >
> > Regards
> >         Marc
> >
> > ---------------------------------------------------------------------
> > 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

-- 

Mit freundlichen Grüßen aus Mainz

Information Desire Software GmbH
Marc Lustig

----------------------------------------------------------------
Information Desire, Hersteller von "Projectile", der webbasierten
Projektmanagementlösung für Dienstleister

[ TEL: 0 61 31 / 6 27 68 - 0 ] [ FAX: 0 61 31 / 6 27 68 - 68 ]
[ WWW:   www.infodesire.com ]
[ EMAIL: mail@infodesire.com ]
----------------------------------------------------------------


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


Re: how to run ant-task calling a custom task

Posted by baleineca <ba...@gmail.com>.
David Cao wrote:

>is my question: can I change a system property value used in maven-core
>in ant task and make the changed value available to goals out side of
>ant task?
>
>  
>
I'm not sure exactly what you need to do... how about setting a jelly 
variable with scope="parent"?

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


Re: how to run ant-task calling a custom task

Posted by David Cao <Da...@LightSurf.com>.
Anne, thanks a lot. I thought this one yesterday but never tried. Here
is my question: can I change a system property value used in maven-core
in ant task and make the changed value available to goals out side of
ant task?

-David
On Wed, 2005-02-23 at 11:37, Anne-Simone wrote:
> I am successfully using a custom ant task in my build, but I don't use 
> an ant build.xml.  I have <ant:taskdef name="foo" ...> directly in my 
> maven goal.  I can then use <ant:foo ... > just as I would in an ant 
> build.xml.
> 
> 
> On Wed, 23 Feb 2005 16:57:42 +0100, Marc Lustig
> <ma...@infodesire.com> wrote:
> > Hi,
> > 
> > I'm having some trouble running an ant-task which launches a custom-ant-task
> > (class).
> > 
> > In my maven.xml I have specified the ant-call:
> > <ant:ant dir="${basedir}" antfile="build.xml" target="mytarget" />
> > 
> > I'm getting error message stating that the custom ant-task could not be found.
> > This class is in a jar that is placed in both ant/lib and maven/lib!
> > 
> > running 'ant mytarget' works smoothly!
> > 
> > Anybody having an idea why the jar is not being loaded when the target is
> > launched from maven?
> > 
> > Regards
> >         Marc
> > 
> > ---------------------------------------------------------------------
> > 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
-- 
David  -- Powered by Thinking
Lead Java Engineer


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


Re: how to run ant-task calling a custom task

Posted by Anne-Simone <ba...@gmail.com>.
I am successfully using a custom ant task in my build, but I don't use 
an ant build.xml.  I have <ant:taskdef name="foo" ...> directly in my 
maven goal.  I can then use <ant:foo ... > just as I would in an ant 
build.xml.


On Wed, 23 Feb 2005 16:57:42 +0100, Marc Lustig
<ma...@infodesire.com> wrote:
> Hi,
> 
> I'm having some trouble running an ant-task which launches a custom-ant-task
> (class).
> 
> In my maven.xml I have specified the ant-call:
> <ant:ant dir="${basedir}" antfile="build.xml" target="mytarget" />
> 
> I'm getting error message stating that the custom ant-task could not be found.
> This class is in a jar that is placed in both ant/lib and maven/lib!
> 
> running 'ant mytarget' works smoothly!
> 
> Anybody having an idea why the jar is not being loaded when the target is
> launched from maven?
> 
> Regards
>         Marc
> 
> ---------------------------------------------------------------------
> 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: how to run ant-task calling a custom task

Posted by baleineca <ba...@gmail.com>.
I am successfully using a custom ant task in my build, but I don't use 
an ant build.xml.  I have <ant:taskdef name="foo" ...> directly in my 
maven goal.  I can then use <ant:foo ... > just as I would in an ant 
build.xml.


Marc Lustig wrote:

>Hi,
>
>I'm having some trouble running an ant-task which launches a custom-ant-task 
>(class).
>
>In my maven.xml I have specified the ant-call:
><ant:ant dir="${basedir}" antfile="build.xml" target="mytarget" />
>
>I'm getting error message stating that the custom ant-task could not be found.
>This class is in a jar that is placed in both ant/lib and maven/lib!
>
>running 'ant mytarget' works smoothly!
>
>Anybody having an idea why the jar is not being loaded when the target is 
>launched from maven?
>
>Regards 
>	Marc
>
>
>---------------------------------------------------------------------
>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