You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Tom Snider <zt...@yahoo.de> on 2009/03/03 21:05:47 UTC

Problem with 'type' attribute of dependencies maven-ant task

Hi,

I have a problem with the 'type' attribute of the depedencies maven-ant task.

I have installed plugin components for my app of type 'abc' into my server's repository.
I specified this using <packaging>abc</packaging> in the plugins' pom.xml.

In fact 'abc' archives are jars. But i chose a different type to be able to easily select all plugins using:
               <artifact:dependencies
                       pomrefid="core.pom" 
                       filesetid="plugin.fileset"

                       type="abc">               <copy todir="${plugin.dir}">

                       <fileset refid="plugin.fileset"/>
               </copy>

The main application contains dependencies like:
               <dependency>
                       <groupId>myGroup</groupId>
                       <artifactId>plugin1</artifactId>
                       <version>0.0.1-SNAPSHOT</version>
                       <type>abc</type>
                       <scope>runtime</scope>
               </dependency>

The plugings are loaded without problems from my server into my pc's local repository.

But the ant copy task doesn't copy any 'abc' files to the plugin dir.

If I specify the plugins explicitly:
               <artifact:dependencies
                       filesetid="plugin.fileset"
               >
                       <artifact:dependency groupId="myGroup"
                                       artifactId="plugin1"
                                       version="0.0.1-SNAPSHOT"
                                       type="abc"
                                       scope="runtime" />
               </artifact:dependencies>

Everything works as expected:
testtask:
    [copy] Copying 1 file to D:\project\plugins\
BUILD SUCCESSFUL

To sum it up:
If I set dependecies type to "jar" he copies only the jars to my plugin dir.
If I don't set dependecies he copies everything to my plugin dir (jars + abcs)
If I set dependecies type to "abc" he copies nothing to my plugin dir.

Am I doing something wrong?
Is this a bug?
How can i fix this?

Greetings Tom