Maven Ear Plugin
  1. Maven Ear Plugin
  2. MEAR-148

In an ear which has skinny wars, want to include the same jar in shared lib of ear as well as in the war

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.7
    • Fix Version/s: None
    • Labels:
      None

      Description

      I have the following artifacts

      MyWar1.war depends on MyJar.jar and SomeThirdParty.jar
      MyWar2.war depends on MyJar.jar
      MyJar.jar also depends on SomeThirdParty.jar

      Now I want to create an ear with MyWar1 and MyWar2, and I want to make them skinny wars so that MyJar.jar should not be included in both the wars.
      For some reason, the SomeThirdParty.jar has to be in the WEB-INF/lib directory of MyWar1.war

      Here is the structure I want:

      MyEar.ear
      - lib
          - MyJar.jar
          - SomeThirdParty.jar
      - MyWar1.war
          - WEB-INF/lib/SomeThirdParty.jar
      - MyWar1.war
      

      As you can see, I want the SomeThirdParty.jar in MyWar1 as well as in the lib directory.
      Is there any way to achieve it if I am using <skinnyWars>true</skinnyWars>?

      If not, we should have some way of doing this, maybe by supporting nested <dependencies> in the <webmodule> tag which would override the skinnyWars behavior for the listed dependencies like

      <webModule>
        <groupId>my.groupId</groupId>
        <artifactId>my.artifactId</artifactId>
        <dependencies>
          <dependency>
            <groupId>SomeThirdParty.jar.groupId</groupId>
            <artifactId>SomeThirdParty.jar</artifactId>
            <version>SomeThirdParty.jar.version</version>
          </dependency>
        </dependencies>
      </webModule>
      

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Tejas Pajai
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development