Uploaded image for project: 'Maven Dependency Plugin'
  1. Maven Dependency Plugin
  2. MDEP-474

Overriding the tomcat-maven-plugin dependencies to 7.0.53 does not get picked up by dependency:resolve-plugins

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.8
    • None
    • resolve-plugins
    • None

    Description

      ENVIRONMENT:

      Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T16:58:10-04:00)
      Maven home: /opt/apache-maven-3.2.3
      Java version: 1.7.0_71, vendor: Oracle Corporation
      Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre
      Default locale: en_US, platform encoding: UTF-8
      OS name: "mac os x", version: "10.9.4", arch: "x86_64", family: "mac"

      DESCRIPTION:

      I'm overriding the maven-tomcat-plugin with the 7.0.53 version of its dependencies (instead of the standard 7.0.47 dependency as noted in the poms), but dependency:resolve-plugins says it's not working. After testing tomcat, it seems the 7.0.53 version is indeed picked up, but the resolve-plugins task is erroneously reporting 7.0.47 is still what's being used.

      Here's a test pom (also attached to the ticket to preserve formatting):
      <?xml version="1.0" encoding="UTF-8"?>
      <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/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>

      <groupId>com.tomcattest</groupId>
      <artifactId>test</artifactId>
      <version>1.0-SNAPSHOT</version>

      <properties>
      <tomcat.version>7.0.53</tomcat.version>
      </properties>

      <build>
      <plugins>
      <plugin>
      <groupId>org.apache.tomcat.maven</groupId>
      <artifactId>tomcat7-maven-plugin</artifactId>
      <version>2.2</version>
      <dependencies>
      <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-core</artifactId>
      <version>${tomcat.version}</version>
      </dependency>
      <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-util</artifactId>
      <version>${tomcat.version}</version>
      </dependency>
      <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-coyote</artifactId>
      <version>${tomcat.version}</version>
      </dependency>
      <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-api</artifactId>
      <version>${tomcat.version}</version>
      </dependency>

      <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-jdbc</artifactId>
      <version>${tomcat.version}</version>
      </dependency>

      <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-dbcp</artifactId>
      <version>${tomcat.version}</version>
      </dependency>

      <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-servlet-api</artifactId>
      <version>${tomcat.version}</version>
      </dependency>

      <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-jsp-api</artifactId>
      <version>${tomcat.version}</version>
      </dependency>

      <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-jasper</artifactId>
      <version>${tomcat.version}</version>
      </dependency>

      <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-jasper-el</artifactId>
      <version>${tomcat.version}</version>
      </dependency>

      <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-el-api</artifactId>
      <version>${tomcat.version}</version>
      </dependency>

      <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-catalina</artifactId>
      <version>${tomcat.version}</version>
      </dependency>

      <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-tribes</artifactId>
      <version>${tomcat.version}</version>
      </dependency>

      <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-catalina-ha</artifactId>
      <version>${tomcat.version}</version>
      </dependency>

      <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-annotations-api</artifactId>
      <version>${tomcat.version}</version>
      </dependency>

      <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-juli</artifactId>
      <version>${tomcat.version}</version>
      </dependency>

      <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-logging-juli</artifactId>
      <version>${tomcat.version}</version>
      </dependency>
      <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-logging-log4j</artifactId>
      <version>${tomcat.version}</version>
      </dependency>
      </dependencies>
      </plugin>
      </plugins>
      </build>
      </project>

      Command:
      mvn dependency:resolve-plugins

      Output:
      [INFO] Plugin Resolved: tomcat7-maven-plugin-2.2.jar
      [INFO] Plugin Dependency Resolved: tomcat-embed-core-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-util-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-coyote-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-api-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-jdbc-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-dbcp-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-servlet-api-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-jsp-api-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-jasper-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-jasper-el-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-el-api-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-catalina-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-tribes-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-catalina-ha-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-annotations-api-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-juli-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-embed-logging-juli-7.0.47.jar
      [INFO] Plugin Dependency Resolved: tomcat-embed-logging-log4j-7.0.47.jar
      ...

      Attachments

        1. pom.xml
          5 kB
          John Harvey

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Propane13 John Harvey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: