Dan,

I added to maven.dependency.classpath. My plugin was using an Ant task
that had external dependencies. What I did was:

  1. Put the dependent jars in the plugin's project.xml, along with
     the line:

       <properties><plugin.bundle>true</plugin.bundle></properties>

  2. Added a plugin:plugin postGoal that copied any dependency that
     has the plugin.bundle property to maven.build.dest. When I
     deployed the plugin, the dependent jars were deployed along with
     them.

  3. In plugin.jelly, I setup the classpath like this:

       <ant:taskdef name="mytask"
                    classname="com.mycompany.taskdefs.MyTask">
         <ant:classpath>
           <ant:pathelement path="${plugin.getDependencyPath('groupId:artifactId')}"/>
           <ant:pathelement path="${plugin.getDependencyPath('groupId:artifactId')}"/>
           <ant:path refid="maven.dependency.classpath"/>
         </ant:classpath>
       </ant:taskdef>
  
Possibly the same classpath construction will work for your java task?

  Jeff
       
On Thu, 02 Sep 2004, at 08:12:47 [GMT -0700] dan tran wrote:

> Jeff, so I will need to setup the classpath my self rather then depending on
> maven.dependcy.classpath right?

> Thanks,

> -D


> On Thu, 2 Sep 2004 10:03:08 -0500, Jefferson K. French
> <[EMAIL PROTECTED]> wrote:
>> Dan,
>> 
>> I had the same issue for a custom plugin. What I did was to include my
>> plugin's dependencies in the plugin's project.xml, then make sure the
>> dependent jars were bundled along with the plugin when it was
>> deployed.
>> 
>>  Jeff
>> 
>> 
>> 
>> On Thu, 02 Sep 2004, at 07:39:56 [GMT -0700] dan tran wrote:
>> 
>> > Hello,
>> 
>> > I have a custom plugin P which is called by a project A.
>> > In plugin P, I have a tag which uses <ant:java> to invoke
>> > a java class.
>> 
>> > Calling plugin P's tag from project A results in a ClassNotFoundException,
>> > unless I include plugin P's denpendencies in project A
>> 
>> > In previous post, I have the similar problem when dealing with
>> > plugin's properties not seeing by plugin's tag
>> 
>> > http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&msgNo=15788
>> 
>> > Is there similar solution for this situtation.  I just hate to include
>> > my custom plugin's dependencies that every project that needs to
>> > call the tag.
>> 
>> > Big thanks
>> 

-- 
mailto:[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to