Hi,

Maven.dependency.classpath only uses what is in the project's descriptor,
however if you are just building an ant classpath you can create the path
with your plugin's dependencies using dependency.getPath. Here is an example
from cactus:
    <ant:path id="cactus.classpath">
      <pathelement
location="${plugin.getDependencyPath('cactus:cactus-ant')}"/>
      <pathelement location="${plugin.getDependencyPath('cactus:cactus')}"/>
      <pathelement
location="${plugin.getDependencyPath('commons-logging:commons-logging')}"/>
      <pathelement location="${plugin.getDependencyPath('junit:junit')}"/>
      <pathelement
location="${plugin.getDependencyPath('commons-httpclient:commons-httpclient'
)}"/>
      <pathelement
location="${plugin.getDependencyPath('aspectj:aspectjrt')}"/>
      <pathelement
location="${plugin.getDependencyPath('httpunit:httpunit')}"/>
      <pathelement
location="${plugin.getDependencyPath('nekohtml:nekohtml')}"/>
      <pathelement location="${plugin.getDependencyPath('xerces:xerces')}"/>
      <pathelement
location="${plugin.getDependencyPath('xml-apis:xml-apis')}"/>
      <pathelement location="${plugin.getDependencyPath('rhino:js')}"/>
    </ant:path>

    <ant:taskdef resource="cactus.tasks" classpathref="cactus.classpath"/>

Cheers,
Brett

> -----Original Message-----
> From: J. Matthew Pryor [mailto:[EMAIL PROTECTED] 
> Sent: Monday, 17 November 2003 11:14 AM
> To: [EMAIL PROTECTED]
> Subject: plugin dependencies for plugin user
> 
> 
> Hello,
> 
> I am writing an AndroMDA (http://www.adnromda.org)
> plugin for Maven and
> basically have it working but I am having trouble
> understanding
> dependencies.
> 
> The AndroMDA pluging requires a bunch of jars to
> compile (but mostly at
> runtime). I have listed these in the dependencies
> section of the project.xml
> for the plugin. I can compile & install the plugin no
> problem.
> 
> However the only way I can get it to work is by
> duplicating the dependcy
> list from the plugin into the project.xml file of the
> project that uses the
> plugin.
> 
> I don't think this is the right thing to do, it seems
> like a workaround. I
> have read all I can and searched archives but cannot
> find the answer to have
> these dependencies "flow through" to the project that
> uses the plugin. This
> may be complicated by the fact that the plugin.jelly
> has to do an Ant
> taskdef, I perform it like this:
> 
>               <taskdef name="andromda"
>               
> classname="org.andromda.core.anttasks.AndroMDAGenTask">
>                       <classpath>
>                               <path 
> refid="maven.dependency.classpath"/>
>                       </classpath>
>               </taskdef>
> 
> But the taskdef fails unless I have all of the
> required JARs for AndroMDA in
> the dependencies section of the project that simply
> wants to use the
> AndroMDA plugin. Does that piece of Jelly code refer
> to the
> maven.dependency.classpath of the plugin or of the
> project using the plugin?
> 
> Is this normal? Is there some other way to manage the 
> depencies? I tried declaring the AndroMDA plugin in the 
> depencies section as a <type>plugin</type>, but that didn't 
> solve the problem
> 
> I hope I have provided enough information. Links to
> previsous posts I missed
> or documenation I missed would be appreciated
> 
> Thanks,
> Matthew
> 
> 
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard 
> http://antispam.yahoo.com/whatsnewfree
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Reply via email to