This appears to be working with 2.0.7 and 2.1.x. I'm using the
following:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.test</groupId>
<artifactId>antlr-test</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>antlr-test</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-antlr-plugin</artifactId>
<dependencies>
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.2</version>
</dependency>
</dependencies>
<configuration>
<grammars>java15.g</grammars>
</configuration>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
On 21 Aug 07, at 10:11 AM 21 Aug 07, Jason van Zyl wrote:
On 21 Aug 07, at 4:43 AM 21 Aug 07, Mark Hobson wrote:
Just catching up on emails - here's the related issues:
http://jira.codehaus.org/browse/MNG-2972
http://jira.codehaus.org/browse/MNG-2163
Does anyone see any problem resolving these? I think we have to be
able to allow overriding of dependencies in plugin elements. This
is already working on trunk but I think is really necessary in
2.0.x. Doesn't hurt anyone not specifying a new version of an
underlying dependency but really makes it a PITA for those who need
to.
Mark
On 15/08/07, Paul Gier <[EMAIL PROTECTED]> wrote:
Brian E. Fox wrote:
But that is only for the transitive plugin dependencies right?
What
about if I
want to exclude or override one of the plugin's direct
dependencies?
I would like to be able to do something like this:
<plugin>
<artifactId>some-plugin</artifactId>
<dependencies>
<exclusions>
<exclusion>
<artifactId>some-plugin-dependency</artifactId>
<version>1.0</version>
</exclusion>
</exclusions>
<dependency>
<artifactId>some-plugin-dependency</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
</plugin>
This is almost exactly what I need to make the default enforcer
rules
package separate yet upgradeable by the user. I don't think the
exclusion is needed in this case, simply defining the version in
the
plugin should take over.
The only case I would be worried about, if there is no exclusion
option, is if
the groupId changes between versions. Then maven wouldn't know
that they are
the same artifact. I guess as long as the overriding dependency
comes first in
the classpath, then it would take priority when both deps are
included. But
there might be situations where the exclusion would be useful.
--------------------------------------------------------------------
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]