mabrarov edited a comment on pull request #24: URL: https://github.com/apache/maven-ear-plugin/pull/24#issuecomment-727563337
@rfscholte, Regarding [your question](/apache/maven-ear-plugin/pull/24#pullrequestreview-530790385). > there will be a request to select per module which artifacts should be moved to the (shared) lib directory. Do you mean "select skinny mode (move all or nothing) per module and not for all modules"? If yes, then here are my thoughts: I thought about the same but then decided that `skinnyWars` option doesn't provide such ability so that `skinnyModules` option can follow the same approach. > Would such a change fit in this PR without adjusting the new parameters? We can add both: 1. `skinnyModules` option of plugin configuration (implemented) 1. `skinny` property of EAR module which default value is equal to `skinnyModules` option of plugin configuration (`skinnyModules || skinnyWars` for web module). `skinny == false` will work the same way (will lead to the same) as when `libDirectory == null` (it's not possible to specify `null` value for `libDirectory` property of EAR module at the moment). That way we can use global configuration (when we need just all modules) and choose what modules to make "skinny / non-skinny" when required: * `skinnyModules == true` in configuration and `skinny == false` for the modules which need to be non-skinny, * or default / omitted `skinnyModules` and `skinny == true` for the modules which need to be skinny. If you mean choosing subset of EAR module libraries to move into EAR shared lib directory, then we can add this feature too by implementing some artifact filter (`skinnyLibFilter`) as a new property of EAR module (`skinnyLibFilter` property could even eliminate need of `skinny` property), but this looks more complicated (to understand and to implement). My main concern against making all these changes (which complicate implementation and understanding) is that I'm not sure if this feature is really wanted by the users of Maven EAR Plugin - I never had a need of anything like that: 1. to move into shared EAR lib directory just a part of EAR module libraries 1. to make some modules of EAR skinny and keep other modules non-skinny. Please, share more details about your thoughts and use cases. Maybe we can implement them as a new feature request in a separate pull request based on this pull request. Maybe - it depends on how often these use cases are needed - we can implement them right here, in this pull request. All known to me projects building EARs don't need some EAR modules to be non-skinny or "partially skinny" - all of them need all modules to be just skinny. What, one more thing - if I need to keep just specific library (`non-skinny-lib.jar`) in my skinny EAR modules (rare case, but I know at least one of them - we workaround that case by eliminating a need of `non-skinny-lib.jar`) then I just do the following: I don't add `non-skinny-lib.jar` into EAR dependencies: ```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> <parent> <groupId>ear</groupId> <artifactId>maven-ear-plugin-test-project-092-parent</artifactId> <version>99.0</version> </parent> <artifactId>maven-ear-plugin-test-project-092</artifactId> <packaging>ear</packaging> <dependencies> <dependency> <groupId>eartest</groupId> <artifactId>war-sample-three</artifactId> <type>war</type> <exclusions> <exclusion> <groupId>non-skinny-lib</groupId> <artifactId>non-skinny-lib</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>eartest</groupId> <artifactId>war-sample-three</artifactId> <type>pom</type> <exclusions> <exclusion> <groupId>non-skinny-lib</groupId> <artifactId>non-skinny-lib</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>eartest</groupId> <artifactId>sar-sample-two</artifactId> <type>sar</type> <exclusions> <exclusion> <groupId>non-skinny-lib</groupId> <artifactId>non-skinny-lib</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>eartest</groupId> <artifactId>rar-sample-one</artifactId> <type>rar</type> <exclusions> <exclusion> <groupId>non-skinny-lib</groupId> <artifactId>non-skinny-lib</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>eartest</groupId> <artifactId>rar-sample-one</artifactId> <type>pom</type> <exclusions> <exclusion> <groupId>non-skinny-lib</groupId> <artifactId>non-skinny-lib</artifactId> </exclusion> </exclusions> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ear-plugin</artifactId> <version>@project.version@</version> <configuration> <version>6</version> <defaultLibBundleDir>libs</defaultLibBundleDir> <skinnyModules>true</skinnyModules> </configuration> </plugin> </plugins> </build> </project> ``` ---------------------------------------------------------------- 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