You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Graham Leggett <mi...@sharp.fm> on 2008/08/23 14:08:24 UTC

How do I override a plugin dependency?

Hi all,

I have a need to override a specific dependency used by the 
maven-torque-plugin, and I am struggling to convince maven v2.0.9 to do 
this.

The symptoms are that the original jar is being used, instead of the 
overridden jar, which is effectively ignored.

To test this, I have deleted the original jar completely from my local 
maven repository, and what I expect to happen is that maven should not 
try to download this dependency again, because it has been overridden.

In practise, maven downloads the original jar, and ignores the 
overridden jar.

Is there anything obvious that I have missed in this process?

My plugin definition looks like this:

      <plugin>
       <groupId>org.apache.torque</groupId>
       <artifactId>torque-maven-plugin</artifactId>
       <version>3.3</version>
       <dependencies>
         <dependency>
           <groupId>org.apache.derby</groupId>
           <artifactId>derby</artifactId>
           <version>10.4.1.3</version>
         </dependency>
         <dependency>
           <groupId>org.apache.torque</groupId>
           <artifactId>torque-templates</artifactId>
           <version>3.3.1</version>
         </dependency>
       </dependencies>
     </plugin>

Regards,
Graham
--

Re: How do I override a plugin dependency?

Posted by Graham Leggett <mi...@sharp.fm>.
Brian Fox wrote:

> Hi, I blogged about this with examples. I can't copy and paste on the 
> iPhone but you can find it at http://blogs.Sonatype.com/brian

I discovered a number of blogs explaining how to do it, but none of them 
worked.

After some testing it turned out that if you tried to override a direct 
plugin dependency it worked, but if you tried to override a transitive 
dependency (as is the case here) it didn't work.

http://jira.codehaus.org/browse/MNG-3725

Regards,
Graham
--

Re: How do I override a plugin dependency?

Posted by Brian Fox <br...@reply.infinity.nu>.
Hi, I blogged about this with examples. I can't copy and paste on the  
iPhone but you can find it at http://blogs.Sonatype.com/brian

Sent from my iPhone

On Aug 23, 2008, at 8:08 AM, "Graham Leggett" <mi...@sharp.fm> wrote:

> Hi all,
>
> I have a need to override a specific dependency used by the maven- 
> torque-plugin, and I am struggling to convince maven v2.0.9 to do  
> this.
>
> The symptoms are that the original jar is being used, instead of the  
> overridden jar, which is effectively ignored.
>
> To test this, I have deleted the original jar completely from my  
> local maven repository, and what I expect to happen is that maven  
> should not try to download this dependency again, because it has  
> been overridden.
>
> In practise, maven downloads the original jar, and ignores the  
> overridden jar.
>
> Is there anything obvious that I have missed in this process?
>
> My plugin definition looks like this:
>
>     <plugin>
>      <groupId>org.apache.torque</groupId>
>      <artifactId>torque-maven-plugin</artifactId>
>      <version>3.3</version>
>      <dependencies>
>        <dependency>
>          <groupId>org.apache.derby</groupId>
>          <artifactId>derby</artifactId>
>          <version>10.4.1.3</version>
>        </dependency>
>        <dependency>
>          <groupId>org.apache.torque</groupId>
>          <artifactId>torque-templates</artifactId>
>          <version>3.3.1</version>
>        </dependency>
>      </dependencies>
>    </plugin>
>
> Regards,
> Graham
> --

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


Re: How do I override a plugin dependency?

Posted by Brett Porter <br...@gmail.com>.
sounds right if the group/artifact IDs match up. Maybe this is a bug?

- Brett

2008/8/23 Graham Leggett <mi...@sharp.fm>:
> Hi all,
>
> I have a need to override a specific dependency used by the
> maven-torque-plugin, and I am struggling to convince maven v2.0.9 to do
> this.
>
> The symptoms are that the original jar is being used, instead of the
> overridden jar, which is effectively ignored.
>
> To test this, I have deleted the original jar completely from my local maven
> repository, and what I expect to happen is that maven should not try to
> download this dependency again, because it has been overridden.
>
> In practise, maven downloads the original jar, and ignores the overridden
> jar.
>
> Is there anything obvious that I have missed in this process?
>
> My plugin definition looks like this:
>
>     <plugin>
>      <groupId>org.apache.torque</groupId>
>      <artifactId>torque-maven-plugin</artifactId>
>      <version>3.3</version>
>      <dependencies>
>        <dependency>
>          <groupId>org.apache.derby</groupId>
>          <artifactId>derby</artifactId>
>          <version>10.4.1.3</version>
>        </dependency>
>        <dependency>
>          <groupId>org.apache.torque</groupId>
>          <artifactId>torque-templates</artifactId>
>          <version>3.3.1</version>
>        </dependency>
>      </dependencies>
>    </plugin>
>
> Regards,
> Graham
> --
>



-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

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