Hello,

I'm trying to build an ant project with maven 2 using the antrun plugin.
The ant project uses ant-contib tasks.
If I build the project with ant ("ant build"), it works without any
problems, because the ant-contrib.jar is in ${ANT_HOME}/lib.

However, if I try to build it with the maven antrun-plugin, it doesn't build
because it can't find the for-task.
So, I included a taskdef for it in the plugin's configuration, without the
desired effect..

The ant build starts, some initialization stuff occur, but as soon as a
for-task is encountered, the build fails.

I have also tried to set dependencies on the plugin, but the same result..

Any help on this would be greatly appreciated..

Thanks
Jo




Here's part of the maven project's pom.xml:

<plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-antrun-plugin</artifactId>
               <executions>
                   <execution>
                       <phase>process-classes</phase>
                       <configuration>
                           <tasks>
                               <taskdef
resource="net/sf/antcontrib/antcontrib.properties" classpath="${env.ANT_HOME
}/lib/ant-contrib.jar"/>
                               <echo>Building Trax client with BOB..</echo>
                               <echo>* bob properties: ${env.BOB_ENV
}</echo>
                               <ant antfile="build.xml" dir="${basedir}">
                                   <target name="build"/>
                               </ant>
                           </tasks>
                       </configuration>
                       <goals>
                           <goal>run</goal>
                       </goals>
                   </execution>
               </executions>
</plugin>





Here's the output of "mvn package":


[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------------
[INFO] Building Trax EAR module
[INFO]    task-segment: [package]
[INFO]
----------------------------------------------------------------------------
[INFO] [ear:generate-application-xml]
[INFO] Generating application.xml
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[WARNING]
   Artifact ant:ant:jar:1.6.5:runtime retains local scope 'runtime'
overriding broader scope 'compile'
   given by a dependency. If this is not intended, modify or remove the
local scope.

[INFO] [antrun:run {execution: default}]
    [echo] Building Trax client with BOB..
    [echo] * bob properties: /home/jo/projects/bob.properties
Overriding previous definition of reference to bob-rt-lib
Trying to override old definition of datatype ejbc

bob:
    [echo] Remote repository = 'file:////mnt/lambda-trax/repository'
    [echo] Local repository = '/home/jo/.repository'
    [echo] Bob dir = '/home/jo/.repository/trax/bob/bob-3.2.33'
    [echo] Temp dir = '/tmp'
    [echo] Remote repository is uptodate :
'/mnt/lambda-trax/repository/remote-repository.xml'
    [echo] Check dependencies :
'bob;client-platform;server-platform;trax-webstart;framework;ogf-hibernate;generics;system;ystr;trax-pack-core;trax-pack-util;trax-swing-gui;ogoodies;ojdbc14;jtds;proxyclient;proxyservlet;bob-rt;'
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] The following error occurred while executing this line:
/home/jo/.repository/trax/bob/bob-3.2.33/bob-build.xml:69: The following
error occurred while executing this line:
/home/jo/.repository/trax/bob/bob-3.2.33/bob-build.xml:276: Could not create
task or type of type: for.

Reply via email to