mabrarov commented on pull request #24:
URL: https://github.com/apache/maven-ear-plugin/pull/24#issuecomment-727590153


   Just a case / proposal for the further work on design of inclusion / 
exclusion:
   
   ```text
   eartest-war-xxx.war
   └───WEB-INF/lib/
       ├─── lib1-lib11-xxx.jar
       ├─── lib1-lib12-xxx.jar
       ├─── lib2-lib21-xxx.jar
       ├─── lib2-lib22-xxx.jar
       └─── lib2-lib23-xxx.jar
   
   eartest-rar-xxx.rar
   ├─── lib1-lib11-xxx.jar
   ├─── lib1-lib12-xxx.jar
   ├─── lib2-lib21-xxx.jar
   ├─── lib2-lib22-xxx.jar
   └─── lib2-lib23-xxx.jar
   ```
   
   ```xml
   <?xml version="1.0" encoding="UTF-8"?>
   <project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
            xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
       <modelVersion>4.0.0</modelVersion>
       <groupId>eartest</groupId>
       <artifactId>ear</artifactId>
       <version>xxx</version>
       <packaging>ear</packaging>
       <dependencies>
           <dependency>
               <groupId>eartest</groupId>
               <artifactId>war</artifactId>
               <version>xxx</version>
               <type>war</type>
           </dependency>
           <dependency>
               <groupId>eartest</groupId>
               <artifactId>war</artifactId>
               <version>xxx</version>
               <type>pom</type>
               <exclusions>
                   <!-- Global exclusion for skinnyModules -->
                   <exclusion>
                       <groupId>lib2</groupId>
                       <artifactId>lib23</artifactId>
                   </exclusion>
               </exclusions>
           </dependency>
           <dependency>
               <groupId>eartest</groupId>
               <artifactId>rar</artifactId>
               <version>xxx</version>
               <type>rar</type>
           </dependency>
           <dependency>
               <groupId>eartest</groupId>
               <artifactId>rar</artifactId>
               <version>xxx</version>
               <type>pom</type>
               <exclusions>
                   <!-- Global exclusion for skinnyModules -->
                   <exclusion>
                       <groupId>lib2</groupId>
                       <artifactId>lib23</artifactId>
                   </exclusion>
               </exclusions>
           </dependency>
       </dependencies>
       <build>
           <plugins>
               <plugin>
                   <groupId>org.apache.maven.plugins</groupId>
                   <artifactId>maven-ear-plugin</artifactId>
                   <configuration>
                       <skinnyModules>true</skinnyModules>
                       <modules>
                           <webModule>
                               <groupId>eartest</groupId>
                               <artifactId>war</artifactId>
                               <sharedLibs>
                                  <inlcusions>
                                     <inclusion>
                                         <groupId>lib1</groupId>
                                         <artifactId>lib11</artifactId>
                                     </inclusion>
                                  </inlcusions>
                               </sharedLibs>
                           </webModule>
                           <rarModule>
                               <groupId>eartest</groupId>
                               <artifactId>rar</artifactId>
                               <sharedLibs>
                                  <exclusions>
                                     <exclusion>
                                         <groupId>lib2</groupId>
                                         <artifactId>*</artifactId>
                                     </exclusion>
                                  </exclusions>
                               </sharedLibs>
                           </rarModule>
                       </modules>
                   </configuration>
               </plugin>
           </plugins>
       </build>
   </project>
   ```
   
   ```text
   eartest-ear-xxx.ear
   ├─── lib
   │    ├─── lib1-lib11-xxx.jar
   │    ├─── lib1-lib12-xxx.jar
   │    ├─── lib2-lib21-xxx.jar (Why? Because it's among dependencies of 
eartest:ear)
   │    └─── lib2-lib22-xxx.jar (Why? Because it's among dependencies of 
eartest:ear)
   │
   ├─── eartest-war-xxx.war
   │    └─── WEB-INF/lib/
   │         ├─── lib1-lib12-xxx.jar
   │         ├─── lib2-lib21-xxx.jar
   │         ├─── lib2-lib22-xxx.jar
   │         └─── lib2-lib23-xxx.jar
   │
   └─── eartest-rar-xxx.rar
        ├─── lib2-lib21-xxx.jar
        ├─── lib2-lib22-xxx.jar
        └─── lib2-lib23-xxx.jar
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to