Uploaded image for project: 'Maven WAR Plugin'
  1. Maven WAR Plugin
  2. MWAR-257

Restore dependentWarExcludes/Includes since there is no alternative on global level

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 3.1.0
    • Component/s: overlay
    • Labels:
      None

      Description

      Hello,

      DependentWarExcludes is marked as deprecated. Documentation says to use <overlay>/<excludes> instead.
      But it seems to me that it is not possible to get the same behaviour with <overlay>/<excludes> as in this case we have to provide groupIds and artifactIds.
      Maybe this behaviour could be reproduced when setting both groupId and artifactId to * as below :
      <overlays>
      <overlay>
      <excludes>
      <groupId>*</groupId>
      <artifactId>*</artifactId>
      <exclude>*/</exclude>
      </excludes>
      </overlay>
      </overlays>

      By the way, I found this, by looking for a way to disable overlay. The workaround I thought was configuring your plugin to exclude every files when overlaying.
      I think it would be nice to have a configuration parameter for that.

      Many thanks,

      Dool

        Issue Links

          Activity

          Hide
          joehni Joerg Schaible added a comment -

          The deprecation should be simply reverted. Even the plugin overlay documentation (http://maven.apache.org/plugins/maven-war-plugin/overlays.html) explicitly refers dependentWarExcludes and dependentWarIncludes as the only possibility to make global settings in a plugin management section that is inherited in multiple projects. There is no equivalent possible with overlays/overlay/excludes or overlays/overlay/includes and actually it is also not necessary to introduce something else for a mechanism that is working properly.

          Show
          joehni Joerg Schaible added a comment - The deprecation should be simply reverted. Even the plugin overlay documentation ( http://maven.apache.org/plugins/maven-war-plugin/overlays.html ) explicitly refers dependentWarExcludes and dependentWarIncludes as the only possibility to make global settings in a plugin management section that is inherited in multiple projects. There is no equivalent possible with overlays/overlay/excludes or overlays/overlay/includes and actually it is also not necessary to introduce something else for a mechanism that is working properly.
          Hide
          khmarbaise Karl Heinz Marbaise added a comment -

          If you have further information or an example project which will reproduce the problem please don't hesitate to reopen the issue.

          Show
          khmarbaise Karl Heinz Marbaise added a comment - If you have further information or an example project which will reproduce the problem please don't hesitate to reopen the issue.
          Hide
          michael-o Michael Osipov added a comment -

          Joerg Schaible has strong feeling about this issue. Please provide a better title for this issue which reflects the issue.

          Show
          michael-o Michael Osipov added a comment - Joerg Schaible has strong feeling about this issue. Please provide a better title for this issue which reflects the issue.
          Hide
          joehni Joerg Schaible added a comment -

          I have no rights to edit the title.
          _Remove deprecation of dependentWarExcludes, since there is no alternative on global level_

          Show
          joehni Joerg Schaible added a comment - I have no rights to edit the title. _ Remove deprecation of dependentWarExcludes, since there is no alternative on global level _
          Hide
          michael-o Michael Osipov added a comment -

          Done.

          Show
          michael-o Michael Osipov added a comment - Done.
          Hide
          michaldo Michal Domagala added a comment - - edited

          Global level dependentWarExcludes/Includes are very useful and should be restored.

          Global exclusion of WEB-INB/lib/*.jar is simple solution to problem MWAR-33 (jars with differents versions can be in WEB-INF/lib with war as dependencies)

          Unfortunately, commit https://fisheye6.atlassian.com/changelog/maven?cs=606628 for https://issues.apache.org/jira/browse/MWAR-118 marked dependentWarExcludes deprecated. I read issue description and I don't know why it is deprecated. I think it was mistake or under analyzed change.

          Finally, in maven-war-plugin version 3.0.0 dependentWarExcludes is removed. It has dramatic impact on my application, which heavy use WAR customization implemented by war-extending-war.

          My current setup for maven-war-plugin version 2.6 is global dependentWarExcludes=WEB-INF/lib/*.jar and multiple WAR projects (for particular clients) depending on parent WARs. Just dependency, nothing more.

          If I switch to 3.0.0, I have to remove global dependentWarExcludes and for each WAR project, beside dependency to parent WAR add section overlays, copy dependency data and add <excludes><exclude>WEB-INF/lib/*.jar</exclude></excludes>

          I expect answer like:
          1. It is stupid to have global configuration in root, better copy the same settings into multiple child projects. (I will know I have to stay with 2.6)
          2. It is cool to have global configuration, keep calm and wait for newer maven war plugin

          Show
          michaldo Michal Domagala added a comment - - edited Global level dependentWarExcludes/Includes are very useful and should be restored. Global exclusion of WEB-INB/lib/*.jar is simple solution to problem MWAR-33 (jars with differents versions can be in WEB-INF/lib with war as dependencies) Unfortunately, commit https://fisheye6.atlassian.com/changelog/maven?cs=606628 for https://issues.apache.org/jira/browse/MWAR-118 marked dependentWarExcludes deprecated. I read issue description and I don't know why it is deprecated. I think it was mistake or under analyzed change. Finally, in maven-war-plugin version 3.0.0 dependentWarExcludes is removed. It has dramatic impact on my application, which heavy use WAR customization implemented by war-extending-war. My current setup for maven-war-plugin version 2.6 is global dependentWarExcludes=WEB-INF/lib/*.jar and multiple WAR projects (for particular clients) depending on parent WARs. Just dependency, nothing more. If I switch to 3.0.0, I have to remove global dependentWarExcludes and for each WAR project, beside dependency to parent WAR add section overlays , copy dependency data and add <excludes><exclude>WEB-INF/lib/*.jar</exclude></excludes> I expect answer like: 1. It is stupid to have global configuration in root, better copy the same settings into multiple child projects. (I will know I have to stay with 2.6) 2. It is cool to have global configuration, keep calm and wait for newer maven war plugin
          Hide
          michael-o Michael Osipov added a comment -

          Unfortunately, there were several errors made with this configuration parameter:

          1. The deprecation should have happened with a seperate ticket, not just side comment in a commit
          2. There is no profound explanation why this should not be used and what the alternative be
          3. There is a good reason to use this w/o configuration explosion

          Show
          michael-o Michael Osipov added a comment - Unfortunately, there were several errors made with this configuration parameter: 1. The deprecation should have happened with a seperate ticket, not just side comment in a commit 2. There is no profound explanation why this should not be used and what the alternative be 3. There is a good reason to use this w/o configuration explosion
          Hide
          michael-o Michael Osipov added a comment -

          I just checked the code again, I have removed the parameter with MWAR-367 because of some issues caused. If someone can provide a PR which does not break stuff, I will test and reintroduce this parameter.

          Show
          michael-o Michael Osipov added a comment - I just checked the code again, I have removed the parameter with MWAR-367 because of some issues caused. If someone can provide a PR which does not break stuff, I will test and reintroduce this parameter.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user michaldo opened a pull request:

          https://github.com/apache/maven-plugins/pull/102

          MWAR-257 Remove deprecation of dependentWarExcludes, since there is no alternative on global level

          Revert "MWAR-367 Overlay removes /META-INF/context.xml"

          This reverts commit cb254e434a40b7ff58c936abbb3f823029a0e466.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/michaldo/maven-plugins trunk

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/maven-plugins/pull/102.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #102


          commit c75d0ef5c1dce43e680a122f03a9e7ed47985da2
          Author: michal <michal@michal-desktop>
          Date: 2016-12-26T18:32:21Z

          MWAR-257 Remove deprecation of dependentWarExcludes, since there is no
          alternative on global level

          Revert "MWAR-367 Overlay removes /META-INF/context.xml"

          This reverts commit cb254e434a40b7ff58c936abbb3f823029a0e466.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user michaldo opened a pull request: https://github.com/apache/maven-plugins/pull/102 MWAR-257 Remove deprecation of dependentWarExcludes, since there is no alternative on global level Revert " MWAR-367 Overlay removes /META-INF/context.xml" This reverts commit cb254e434a40b7ff58c936abbb3f823029a0e466. You can merge this pull request into a Git repository by running: $ git pull https://github.com/michaldo/maven-plugins trunk Alternatively you can review and apply these changes as the patch at: https://github.com/apache/maven-plugins/pull/102.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #102 commit c75d0ef5c1dce43e680a122f03a9e7ed47985da2 Author: michal <michal@michal-desktop> Date: 2016-12-26T18:32:21Z MWAR-257 Remove deprecation of dependentWarExcludes, since there is no alternative on global level Revert " MWAR-367 Overlay removes /META-INF/context.xml" This reverts commit cb254e434a40b7ff58c936abbb3f823029a0e466.
          Hide
          michael-o Michael Osipov added a comment -

          Fixed with r1781709.

          Show
          michael-o Michael Osipov added a comment - Fixed with r1781709 .
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/maven-plugins/pull/102

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/maven-plugins/pull/102
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build maven-plugins #8779 (See https://builds.apache.org/job/maven-plugins/8779/)
          MWAR-257 Restore dependentWarExcludes/Includes since there is no alternative on global level

          dependentWarExcludes/Includes was unfortunately marked as deprecated and eventually removed. This commit restore dependentWarExcludes/Includes and fix inconsistency in defaults on local/global level

          Undo "MWAR-367 Overlay removes /META-INF/context.xml"

          Submitted-by: Michal Domagala <michal.domagala@syncron.com>

          This closes #102 (michaelo: http://svn.apache.org/viewvc/?view=rev&rev=1781709)

          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/invoker.properties
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/pom.xml
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/verify.bsh
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/pom.xml
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/src
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/src/main
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/src/main/webapp
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/src/main/webapp/META-INF
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/src/main/webapp/META-INF/context.xml
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/src/main/webapp/WEB-INF
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/src/main/webapp/WEB-INF/web.xml
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war2-result
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war2-result/pom.xml
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war2-result/src
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war2-result/src/main
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war2-result/src/main/webapp
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war2-result/src/main/webapp/WEB-INF
          • (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war2-result/src/main/webapp/WEB-INF/web.xml
          • (edit) maven-war-plugin/src/main/java/org/apache/maven/plugins/war/AbstractWarMojo.java
          • (edit) maven-war-plugin/src/main/java/org/apache/maven/plugins/war/overlay/DefaultOverlay.java
          • (edit) maven-war-plugin/src/main/java/org/apache/maven/plugins/war/overlay/OverlayManager.java
          • (edit) maven-war-plugin/src/site/apt/overlays.apt.vm
          • (edit) maven-war-plugin/src/site/fml/faq.fml.vm
          • (edit) maven-war-plugin/src/test/java/org/apache/maven/plugins/war/WarExplodedMojoTest.java
          • (edit) maven-war-plugin/src/test/java/org/apache/maven/plugins/war/overlay/OverlayManagerTest.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-plugins #8779 (See https://builds.apache.org/job/maven-plugins/8779/ ) MWAR-257 Restore dependentWarExcludes/Includes since there is no alternative on global level dependentWarExcludes/Includes was unfortunately marked as deprecated and eventually removed. This commit restore dependentWarExcludes/Includes and fix inconsistency in defaults on local/global level Undo " MWAR-367 Overlay removes /META-INF/context.xml" Submitted-by: Michal Domagala <michal.domagala@syncron.com> This closes #102 (michaelo: http://svn.apache.org/viewvc/?view=rev&rev=1781709 ) (add) maven-war-plugin/src/it/overlay-keeps-contextxml (add) maven-war-plugin/src/it/overlay-keeps-contextxml/invoker.properties (add) maven-war-plugin/src/it/overlay-keeps-contextxml/pom.xml (add) maven-war-plugin/src/it/overlay-keeps-contextxml/verify.bsh (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/pom.xml (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/src (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/src/main (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/src/main/webapp (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/src/main/webapp/META-INF (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/src/main/webapp/META-INF/context.xml (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/src/main/webapp/WEB-INF (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war1-with-contextxml/src/main/webapp/WEB-INF/web.xml (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war2-result (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war2-result/pom.xml (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war2-result/src (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war2-result/src/main (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war2-result/src/main/webapp (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war2-result/src/main/webapp/WEB-INF (add) maven-war-plugin/src/it/overlay-keeps-contextxml/war2-result/src/main/webapp/WEB-INF/web.xml (edit) maven-war-plugin/src/main/java/org/apache/maven/plugins/war/AbstractWarMojo.java (edit) maven-war-plugin/src/main/java/org/apache/maven/plugins/war/overlay/DefaultOverlay.java (edit) maven-war-plugin/src/main/java/org/apache/maven/plugins/war/overlay/OverlayManager.java (edit) maven-war-plugin/src/site/apt/overlays.apt.vm (edit) maven-war-plugin/src/site/fml/faq.fml.vm (edit) maven-war-plugin/src/test/java/org/apache/maven/plugins/war/WarExplodedMojoTest.java (edit) maven-war-plugin/src/test/java/org/apache/maven/plugins/war/overlay/OverlayManagerTest.java

            People

            • Assignee:
              michael-o Michael Osipov
              Reporter:
              dool dool
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development