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

Make deploy/redeploy (upload) less verbose for --batch-mode / --quiet

    Details

    • Type: Wish Wish
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.2
    • Component/s: commons-lib
    • Labels:
      None

      Description

      Hi,

      Using maven-tomcat-plugin:2.0 for integration testing deployments results in some Jenkins job logs where 99% of the lines comes from the upload "progress meter" (implemented in "TomcatManager.RequestEntityImplementation.transferProgressed").

      In some other plugins with similar HTTP activity, this kind of output can be turned off by launching Maven with "B/batch-mode" (and probably "-quiet" too, although I never do that). This seems to be standard behavior for plugins which uses Wagon or Aether. Would it be possible to implement a similar behavior in the maven-tomcat-plugin?

      Actually, I gave it a try today, but I couldn't find how to get the Maven batch/quiet options through the plugin API. My other attempt was to reuse the Wagon "TransferListener" instance (the implementation, which can be a verbose or quiet progress meter, seems to be chosen depending on the Maven CLI option), but I couldn't find a path to there neither. But it's my first time in some Maven code, I probably have missed something.

      Sure, if it's actually not possible to implement a quiet mode based on the Maven CLI options, then an alternative would be to add a plugin-specific parameter. But I think it would be a bit less convenient.

        Activity

        Hide
        Hudson added a comment -

        SUCCESS: Integrated in TomcatMavenPlugin-mvn3.x #257 (See https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/257/)
        MTOMCAT-176 Make deploy/redeploy (upload) less verbose for --batch-mode / --quiet (olamy: http://svn.apache.org/viewvc/?view=rev&rev=1534451)

        • /tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java
        • /tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractCatalinaMojo.java
        • /tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractI18NTomcat6Mojo.java
        • /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.java
        • /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.java
        Show
        Hudson added a comment - SUCCESS: Integrated in TomcatMavenPlugin-mvn3.x #257 (See https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/257/ ) MTOMCAT-176 Make deploy/redeploy (upload) less verbose for --batch-mode / --quiet (olamy: http://svn.apache.org/viewvc/?view=rev&rev=1534451 ) /tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java /tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractCatalinaMojo.java /tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractI18NTomcat6Mojo.java /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.java /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.java
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -

        patch applied.
        Thanks!

        Show
        Olivier Lamy (*$^¨%`£) added a comment - patch applied. Thanks!
        Hide
        Denis Yudin added a comment -

        Fixed by dependency injection of Settings into Mojo and then parametrizing the RequestEntityImplementation.
        Result: adding -B removes upload progress from the log

        Show
        Denis Yudin added a comment - Fixed by dependency injection of Settings into Mojo and then parametrizing the RequestEntityImplementation. Result: adding -B removes upload progress from the log
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -

        You must have a look at TomcatManager class there is an inner class called RequestEntityImplementation.
        See the method: transferProgressed.
        An idea could be to passed the batchMode flag from mojos to the class to write or not the status.

        Show
        Olivier Lamy (*$^¨%`£) added a comment - You must have a look at TomcatManager class there is an inner class called RequestEntityImplementation. See the method: transferProgressed. An idea could be to passed the batchMode flag from mojos to the class to write or not the status.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development