You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andy Lynch <An...@solnetsolutions.co.nz> on 2004/01/22 05:45:24 UTC

using custom ant tasks?

Hi,

I'm starting to use maven to build a fairly complex application which is 
currently built using Ant; and am having trouble trying to use some 
custom ant tasks within Maven.

I've listed the jar file containing the tasks as a dependency:

...
<dependency>
    <groupId>solnet</groupId>
    <artifactId>solnetant</artifactId>
    <version>1.1</version>
</dependency>
...

and run our existing ant file using the following maven.xml:
<project default="none" xmlns:j="jelly:core" xmlns:m="maven" 
xmlns:maven="jelly:maven" xmlns:u="jelly:util">
    <goal description="Deploy app" name="deploy">
        <ant dir="${basedir}" antfile="buildscripts/build.xml"/>
    </goal>
</project>

The ant build starts, but shortly aborts saying it could not find the 
task defined in this jar. 
So I guess my question is, is there a way to specify a classpath for 
extra ant tasks within a maven project?

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


Re: using custom ant tasks?

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Do you know if this is due to the absence of the solnetant jar on 
maven's classpath? you might try adding it /maven/lib as a test.

I'm actually working out something similar where I have dependency jars 
for a plugin that need to get into the library to become available on 
the classpath.

I'm also writing a custom an task that will need to be runnable from 
inside a maven goal. But,the source code for the task is actually in the 
plugin code. and ends up on the classpath.

Hey folks? Why not have a more "granular" mechanism in plugins for 
dealing with jar dependencies such as this? Or is there some way I can 
setup a "lib" directory to get loaded onto the classpath used by my 
"plugin". Is there a means to designate at what level in the Classloader 
hierarchy a dependency get "inserted"?

-Mark



Andy Lynch wrote:

> Hi,
> 
> I'm starting to use maven to build a fairly complex application which is 
> currently built using Ant; and am having trouble trying to use some 
> custom ant tasks within Maven.
> 
> I've listed the jar file containing the tasks as a dependency:
> 
> ...
> <dependency>
>    <groupId>solnet</groupId>
>    <artifactId>solnetant</artifactId>
>    <version>1.1</version>
> </dependency>
> ...
> 
> and run our existing ant file using the following maven.xml:
> <project default="none" xmlns:j="jelly:core" xmlns:m="maven" 
> xmlns:maven="jelly:maven" xmlns:u="jelly:util">
>    <goal description="Deploy app" name="deploy">
>        <ant dir="${basedir}" antfile="buildscripts/build.xml"/>
>    </goal>
> </project>
> 
> The ant build starts, but shortly aborts saying it could not find the 
> task defined in this jar. So I guess my question is, is there a way to 
> specify a classpath for extra ant tasks within a maven project?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

-- 
Mark Diggory
Software Developer
Harvard MIT Data Center
http://www.hmdc.harvard.edu

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