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

Add the possiblilty to search warRunDepencies and extraDependcies throug the dependencyManagement

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.2
    • Component/s: tomcat7
    • Labels:

      Description

      It wiil be nice to do not specify the version of the warRunDepency and extraDependency, it will be easier to handle war version during the release process.

        Activity

        Guillaume Soing created issue -
        Hide
        Glen Mazza added a comment -

        You can still define properties in parent POMs of course: <properties> <my.lib.version>3.2</my.lib.version> </properties>, then use <version>$

        {my.lib.version}

        </version>.

        I believe Guillaume is referring to the exec-war and exec-war-only goals, as those seem to be the only two with those options. I don't know what the difference is between warRunDependency and extraDependency (the docs don't define the former: http://tomcat.apache.org/maven-plugin-2.1-SNAPSHOT/tomcat7-maven-plugin/exec-war-mojo.html.) Also, I'm not sure what types of dependencies would need to be placed in the Tomcat root classloader and not just with the web application itself (i.e., can't Guillaume just declare these as normal <dependencies/> within the WAR so the version numbers can be taken care of that way?) Although this suggestion does have merit, arguably it may not be worth the effort if it is so rarely used and <properties/> can be used instead, further, as a drawback it might cause more people to incorrectly over-use this functionality instead of properly defining the <dependencies/> with the WAR itself.

        Show
        Glen Mazza added a comment - You can still define properties in parent POMs of course: <properties> <my.lib.version>3.2</my.lib.version> </properties>, then use <version>$ {my.lib.version} </version>. I believe Guillaume is referring to the exec-war and exec-war-only goals, as those seem to be the only two with those options. I don't know what the difference is between warRunDependency and extraDependency (the docs don't define the former: http://tomcat.apache.org/maven-plugin-2.1-SNAPSHOT/tomcat7-maven-plugin/exec-war-mojo.html .) Also, I'm not sure what types of dependencies would need to be placed in the Tomcat root classloader and not just with the web application itself (i.e., can't Guillaume just declare these as normal <dependencies/> within the WAR so the version numbers can be taken care of that way?) Although this suggestion does have merit, arguably it may not be worth the effort if it is so rarely used and <properties/> can be used instead, further, as a drawback it might cause more people to incorrectly over-use this functionality instead of properly defining the <dependencies/> with the WAR itself.
        Hide
        Guillaume Soing added a comment -

        Hi,

        you are right this case is only for the the exec-war and exec-war-only goals.

        Here my situation, I want to package several wars in one exec-war, so I have created a pom project which depends on these 2 wars and use the tomcat7-maven-plugin. The version of my war are declared in the dependencyManagement of my parent pom. That give me the following structure :
        parent project
        -> project war 1
        -> project war 2
        -> packaging project and tomcat plugin

        This way when I release the parent all the versions are correctly set (which is not the case if I use a property). The warRunDependcy needs a version number, so when i release my project the versiond of my wars are not change in the plugin configuration.

        And it's the same when i use the extraDependency (which include some library to the tomcat like the database driver or some specific stuffs).

        Show
        Guillaume Soing added a comment - Hi, you are right this case is only for the the exec-war and exec-war-only goals. Here my situation, I want to package several wars in one exec-war, so I have created a pom project which depends on these 2 wars and use the tomcat7-maven-plugin. The version of my war are declared in the dependencyManagement of my parent pom. That give me the following structure : parent project -> project war 1 -> project war 2 -> packaging project and tomcat plugin This way when I release the parent all the versions are correctly set (which is not the case if I use a property). The warRunDependcy needs a version number, so when i release my project the versiond of my wars are not change in the plugin configuration. And it's the same when i use the extraDependency (which include some library to the tomcat like the database driver or some specific stuffs).
        Olivier Lamy (*$^¨%`£) made changes -
        Field Original Value New Value
        Fix Version/s 2.2 [ 12323925 ]
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -

        any sample project?

        Show
        Olivier Lamy (*$^¨%`£) added a comment - any sample project?
        Olivier Lamy (*$^¨%`£) made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        FAILURE: Integrated in TomcatMavenPlugin-mvn3.x #268 (See https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/268/)
        MTOMCAT-196 for warRunDependencies too (olamy: http://svn.apache.org/viewvc/?view=rev&rev=1539227)

        • /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java
        • /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java
          MTOMCAT-196 Add the possiblilty to search warRunDepencies and extraDependcies throug the dependencyManagement (olamy: http://svn.apache.org/viewvc/?view=rev&rev=1539226)
        • /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java
        Show
        Hudson added a comment - FAILURE: Integrated in TomcatMavenPlugin-mvn3.x #268 (See https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/268/ ) MTOMCAT-196 for warRunDependencies too (olamy: http://svn.apache.org/viewvc/?view=rev&rev=1539227 ) /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java MTOMCAT-196  Add the possiblilty to search warRunDepencies and extraDependcies throug the dependencyManagement (olamy: http://svn.apache.org/viewvc/?view=rev&rev=1539226 ) /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        300d 12h 58m 1 Olivier Lamy (*$^¨%`£) 06/Nov/13 03:22

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development