You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ty Cuz <ty...@gmail.com> on 2006/07/10 06:57:21 UTC

Execute ant task in order

Hi
I am trying to run ant task with maven2.  The ant task is to generate native
header by executing javah, thus it requires the class file.

The problem is the ant task was executing first before the java sources
compiled into class file, so I got the error of class could not be found
when executing ant task.

Is there a way to control the ant task to be executed at last?

Ty

Re: Execute ant task in order

Posted by Ty Cuz <ty...@gmail.com>.
Yes, it works now by changing the lifecycle phase, it was at
process-resources before.

Thanks for the help!

Ty


On 7/10/06, Tim Kettler <ti...@udo.edu> wrote:
>
> Hi,
>
> I assume you use the antrun-plugin to execute the ant task? If yes, just
> bind it to a
> lifecycle phase after the 'compile' phase. 'process-classes' for example.
>
> As a sidenode. The native-maven-plugin [1] can create the header files and
> build a library
> from them (See [2] for an example for creating a msvc dll from javah
> generated headers).
> But I don't know if that is what you want.
>
> Hope this helps
> -Tim
>
> [1] http://mojo.codehaus.org/maven-native/native-maven-plugin/
> [2]
> http://mojo.codehaus.org/maven-native/native-maven-plugin/examples.html
>
> Ty Cuz schrieb:
> > Hi
> > I am trying to run ant task with maven2.  The ant task is to generate
> > native
> > header by executing javah, thus it requires the class file.
> >
> > The problem is the ant task was executing first before the java sources
> > compiled into class file, so I got the error of class could not be found
> > when executing ant task.
> >
> > Is there a way to control the ant task to be executed at last?
> >
> > Ty
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Execute ant task in order

Posted by Tim Kettler <ti...@udo.edu>.
Hi,

I assume you use the antrun-plugin to execute the ant task? If yes, just bind it to a 
lifecycle phase after the 'compile' phase. 'process-classes' for example.

As a sidenode. The native-maven-plugin [1] can create the header files and build a library 
from them (See [2] for an example for creating a msvc dll from javah generated headers). 
But I don't know if that is what you want.

Hope this helps
-Tim

[1] http://mojo.codehaus.org/maven-native/native-maven-plugin/
[2] http://mojo.codehaus.org/maven-native/native-maven-plugin/examples.html

Ty Cuz schrieb:
> Hi
> I am trying to run ant task with maven2.  The ant task is to generate 
> native
> header by executing javah, thus it requires the class file.
> 
> The problem is the ant task was executing first before the java sources
> compiled into class file, so I got the error of class could not be found
> when executing ant task.
> 
> Is there a way to control the ant task to be executed at last?
> 
> Ty
> 


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