Apache Tomcat Maven Plugin
  1. Apache Tomcat Maven Plugin
  2. MTOMCAT-118

tomcat7:run wont accept additionalClasspathDir arguments

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta-1, 2.0
    • Fix Version/s: 2.0
    • Component/s: tomcat7
    • Labels:
      None
    • Environment:

      Description

      Using the below configuration, the following error is given:

      [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) on project XXX: A type incompatibility occured while executing org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run: java.lang.String cannot be cast to java.io.File

      Example taken from docs site http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/run-mojo-features.html

      <plugin>
      <groupId>org.apache.tomcat.maven</groupId>
      <artifactId>tomcat7-maven-plugin</artifactId>
      <version>2.0-SNAPSHOT</version>
      <configuration>
      <!-- http port -->
      <port>9090</port>
      <path>/</path>
      <useTestClasspath>false</useTestClasspath>
      <contextFile>src/sandbox/tomcat/sandbox-context.xml</contextFile>
      <additionalClasspathDirs>
      <additionalClasspathDir>src/test/resources</additionalClasspathDir>
      </additionalClasspathDirs>
      </configuration>
      <dependencies>
      <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>$

      {mysql.mysql-connector-java}

      </version>
      </dependency>
      <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>0.9.15</version>
      </dependency>
      </dependencies>
      </plugin>

        Activity

        Hide
        Olivier Lamy (*$^¨%`£) added a comment -

        which maven version are you using ?

        Show
        Olivier Lamy (*$^¨%`£) added a comment - which maven version are you using ?
        Hide
        Dave Lund added a comment -

        apologizes mvn --version output attached to environment field

        Show
        Dave Lund added a comment - apologizes mvn --version output attached to environment field
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -

        argh I see this can work only with 3.0.3+
        I will fix that but until you must use 3.0.3/3.0.4

        Show
        Olivier Lamy (*$^¨%`£) added a comment - argh I see this can work only with 3.0.3+ I will fix that but until you must use 3.0.3/3.0.4
        Hide
        Dave Lund added a comment -

        Thanks for the work around - I've no problem with upgrading maven anyway

        Show
        Dave Lund added a comment - Thanks for the work around - I've no problem with upgrading maven anyway
        Hide
        Hudson added a comment -

        Integrated in TomcatMavenPlugin-mvn3.x #112 (See https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/112/)
        MTOMCAT-118 tomcat7:run wont accept additionalClasspathDir arguments
        before 3.0.3 maven doesn't support mojo fields Collections other than String

        olamy : http://svn.apache.org/viewvc/?view=rev&rev=1240234
        Files :

        • /tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java
        • /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
        Show
        Hudson added a comment - Integrated in TomcatMavenPlugin-mvn3.x #112 (See https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/112/ ) MTOMCAT-118 tomcat7:run wont accept additionalClasspathDir arguments before 3.0.3 maven doesn't support mojo fields Collections other than String olamy : http://svn.apache.org/viewvc/?view=rev&rev=1240234 Files : /tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java

          People

          • Assignee:
            Olivier Lamy (*$^¨%`£)
            Reporter:
            Dave Lund
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development