You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@codehaus.org> on 2013/11/17 00:46:20 UTC

[jira] (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

    [ https://jira.codehaus.org/browse/MEAR-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=335781#comment-335781 ] 

Robert Scholte commented on MEAR-148:
-------------------------------------

I've seen comparable projects which were originally built with Ant. In order to get the same ear something like this was required.
It is indeed something which has to be solved per webmodule, but I would suggest a different way of configuration:
{code:xml}
<webModule>
  <groupId>my.groupId</groupId>
  <artifactId>my.artifactId</artifactId>
  <skinnedDependencies>
    <includes>
      <include>groupId:artifactId[:type[:classifier]]</include> <!-- default *:* which means everything-->
    </includes>
    <excludes>
      <exclude>groupId:artifactId[:type[:classifier]]</exclude>
    </excludes>
  </skinnedDependencies>
</webModule>
{code}

Not sure if {{skinnedDependencies}} is the right/best term.
                
> In an ear which has skinny wars, want to include the same jar in shared lib of ear as well as in the war
> --------------------------------------------------------------------------------------------------------
>
>                 Key: MEAR-148
>                 URL: https://jira.codehaus.org/browse/MEAR-148
>             Project: Maven Ear Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.7
>            Reporter: Tejas Pajai
>
> 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:
> {noformat}
> MyEar.ear
> - lib
>     - MyJar.jar
>     - SomeThirdParty.jar
> - MyWar1.war
>     - WEB-INF/lib/SomeThirdParty.jar
> - MyWar1.war
> {noformat} 
> *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
> {noformat}
> <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>
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira