maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Spiewak <jspie...@gmail.com>
Subject antrun plugin dependencies & parent pluginManagement
Date Tue, 06 Sep 2011 16:02:24 GMT
Hi all,

I have a parent pom that declares the antrun plugin in pluginManagement
section. It supplies a version, and a set of dependencies to fix the version
of Ant used.
I then have a child project that uses the antrun plugin and adds a reactor
library to the list of dependencies.

When the parent uses antrun 1.4, and the child overrides it to use 1.6,
everything works.
When the parent is upgraded to use 1.6, and the child either removes the
version, or continues to override with 1.6, the reactor library is not
included and the build fails.

a) Has anyone else run into this?
b) Is this scenario expected to work?

Parent pom section:

        <pluginManagement>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <!-- NB: setting this to version 1.6 means that child
projects will have problems extending the
                         plugin's dependencies. Child projects should
override the version as needed instead -->
                    <version>1.4</version>
                    <dependencies>
                        <dependency>
                            <groupId>ant-contrib</groupId>
                            <artifactId>ant-contrib</artifactId>
                            <version>1.0b3</version>
                            <exclusions>
                                <exclusion>
                                    <groupId>ant</groupId>
                                    <artifactId>ant</artifactId>
                                </exclusion>
                            </exclusions>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.ant</groupId>
                            <artifactId>ant</artifactId>
                            <version>${ant.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.ant</groupId>
                            <artifactId>ant-apache-regexp</artifactId>
                            <version>${ant.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.ant</groupId>
                            <artifactId>ant-nodeps</artifactId>
                            <version>${ant.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
        </pluginManagement>

Child pom section:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.6</version>
                <dependencies>
                    <dependency>
                        <groupId>com.mycompany.library</groupId>
                        <artifactId>library</artifactId>
                        <version>1.25-SNAPSHOT</version>
                    </dependency>
                </dependencies>
            </plugin>

Thanks!

    -- Josh

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message