Request for Enhancement: Dependency Overrides
Hello, I've been using Maven for 10+ years now. It's great and I still prefer it over similar tools. Recently I encountered a scenario where it would have been nice to be able to simply "override" a dependency. For example by specifying _somehow_ that (in my case) commons-logging should be jcl-over-slf4j in the entire dependency graph of my project. Now you might think: "That is what exclusions are for". And I agree to some extent. But if I exclude a dependency (maybe just once, maybe many times) and add a dependency to my project to replace what I have excluded, this newly added dependency violates the convention of only having (direct) dependencies you want to program against. But in this case, it is not my intent to use commons-logging and since it is not used in my code, some other developer or plug-in might consider it redundant or obsolete. I encountered other dependencies I'd like to override too. Generally speaking: Whenever some artifact needs to be replaced by a different one, which has a different groupId or artifactId, overrides might come in handy. Consider the artifactId jboss-jaxrs-api_2.0_spec and its newer version jboss-jaxrs-api_2.1_spec. It has version information encoded into it. This is an issue the Maven resolver is not able to handle nor is it designed to handle it. Long story short, I've found a ticket for something like this: https://issues.apache.org/jira/browse/MNG-4530 I also started to implement this feature (albeit differently from the suggested approach in the ticket): https://github.com/strohmattenverleger/maven-resolver/tree/MNG-4530 https://github.com/strohmattenverleger/maven/tree/MNG-4530 (requires the changes I made to maven-resolver) https://github.com/strohmattenverleger/maven-MNG-4530-example If you find the time, please look at what I've implemented so far. In the example project you will find the maven-dependency-plugin configured to copy the project dependencies. I've spoken to some of my colleagues and they wanted me to also look the results of "mvn dependency:tree" which turned out to be as expected (commons-logging has been replaced entirely). Please keep in mind, that the feature is not finalized - it's more of a PoC. I would like your opinion on whether this feature would be nice to have and, if so, if the approach is the right one. I'm open to suggestions and I'd be happy to answer your questions. If you think this feature has what it takes to be merged into Maven once it's finished, I'd be willing to invest more time into it. Kind regards, Enno
Re: [VOTE] Release Apache Maven version 3.8.2
Hi all, it wouldn't surprise me if it was that ThreadLocal quickfix from my PR. I think everyone agrees that it is a bandaid solution but well, correctness and stability over (some) speed, IMO. It would be nice to limit this workaround to only when aggregating goals are involved but that seems like adding more code to a quickfix that should be removed by a proper solution rather sooner than later... Cheers, Falko - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: [VOTE] Release Apache Maven version 3.8.2
+1 include some interesting fixes Thanks to take care of this! On Thu, 5 Aug 2021 at 06:02, Michael Osipov wrote: > Hi, > > We solved 68 issues: > > https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12316922=12349965 > > There are still a couple of issues left in JIRA: > > https://issues.apache.org/jira/issues/?jql=project%20%3D%20MNG%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC > > Staging repo: > https://repository.apache.org/content/repositories/maven-1657/ > > Dev dist directory: > https://dist.apache.org/repos/dist/dev/maven/maven-3/3.8.2/ > > Source release checksums: > apache-maven-3.8.2-src.zip sha512: > > 228ae07dfd89f73cc7d0b10b60708db2730465dbe6022968bde6c5d7f0df9bcd7f460fe1d8012726a29f136486bdb63d1e1ba932e307380fe4c1f4db440407dd > apache-maven-3.8.2-src.tar.gz sha512: > > 617377ad85ced7961f972610ed88535fd3f1ab18e104556d8a3adee7769515ee67ee3cbaff50afcffd74a443b471b806acb1ae92f91a259bc8ccaab56795baf6 > > Binary release checksums: > apache-maven-3.8.2-bin.zip sha512: > > 59ad2cbd6b7abde34ebedda94ce5631256373718e71b55202035bd1190d0144f071433f78b99e16f1204413b3eb888659e5039009e1ad0106f16332e3c62bced > apache-maven-3.8.2-bin.tar.gz sha512: > > b0bf39460348b2d8eae1c861ced6c3e8a077b6e761fb3d4669be5de09490521a74db294cf031b0775b2dfcd57bd82246e42ce10904063ef8e3806222e686f222 > > Draft for release notes: > https://github.com/apache/maven-site/pull/251 > > > Guide to testing staged releases: > http://maven.apache.org/guides/development/guide-testing-releases.html > > Vote open for at least 72 hours. > > [ ] +1 > [ ] +0 > [ ] -1 > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > > -- Olivier Lamy http://twitter.com/olamy | http://linkedin.com/in/olamy
Re: [VOTE] Release Apache Maven version 3.8.2
Am 2021-08-04 um 22:02 schrieb Michael Osipov: Hi, We solved 68 issues: https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12316922=12349965 There are still a couple of issues left in JIRA: https://issues.apache.org/jira/issues/?jql=project%20%3D%20MNG%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC Staging repo: https://repository.apache.org/content/repositories/maven-1657/ Dev dist directory: https://dist.apache.org/repos/dist/dev/maven/maven-3/3.8.2/ Source release checksums: apache-maven-3.8.2-src.zip sha512: 228ae07dfd89f73cc7d0b10b60708db2730465dbe6022968bde6c5d7f0df9bcd7f460fe1d8012726a29f136486bdb63d1e1ba932e307380fe4c1f4db440407dd apache-maven-3.8.2-src.tar.gz sha512: 617377ad85ced7961f972610ed88535fd3f1ab18e104556d8a3adee7769515ee67ee3cbaff50afcffd74a443b471b806acb1ae92f91a259bc8ccaab56795baf6 Binary release checksums: apache-maven-3.8.2-bin.zip sha512: 59ad2cbd6b7abde34ebedda94ce5631256373718e71b55202035bd1190d0144f071433f78b99e16f1204413b3eb888659e5039009e1ad0106f16332e3c62bced apache-maven-3.8.2-bin.tar.gz sha512: b0bf39460348b2d8eae1c861ced6c3e8a077b6e761fb3d4669be5de09490521a74db294cf031b0775b2dfcd57bd82246e42ce10904063ef8e3806222e686f222 Draft for release notes: https://github.com/apache/maven-site/pull/251 Guide to testing staged releases: http://maven.apache.org/guides/development/guide-testing-releases.html Vote open for at least 72 hours. +1 - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: [VOTE] Release Apache Maven version 3.8.2
Dan, thank you very much for testing. Do you think you could bisect to the commit which introduced the 10% overhead? Maybe it is really the classpath concurrency issue which has been addressed by Falko Modler. Also can you try Maven from master and see whether you can reproduce the 10%? Michael Am 2021-08-06 um 01:38 schrieb Dan Tran: tested with my company internal build with 300+ modules. the build time increase by 10%. Not sure if anyone sees the same. but I am happy to take it due to the fix at the classpath concurrency issue. Thanks for pushing this out -D On Thu, Aug 5, 2021 at 1:23 PM Tamás Cservenák wrote: +1 T On Wed, Aug 4, 2021 at 10:02 PM Michael Osipov wrote: Hi, We solved 68 issues: https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12316922=12349965 There are still a couple of issues left in JIRA: https://issues.apache.org/jira/issues/?jql=project%20%3D%20MNG%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC Staging repo: https://repository.apache.org/content/repositories/maven-1657/ Dev dist directory: https://dist.apache.org/repos/dist/dev/maven/maven-3/3.8.2/ Source release checksums: apache-maven-3.8.2-src.zip sha512: 228ae07dfd89f73cc7d0b10b60708db2730465dbe6022968bde6c5d7f0df9bcd7f460fe1d8012726a29f136486bdb63d1e1ba932e307380fe4c1f4db440407dd apache-maven-3.8.2-src.tar.gz sha512: 617377ad85ced7961f972610ed88535fd3f1ab18e104556d8a3adee7769515ee67ee3cbaff50afcffd74a443b471b806acb1ae92f91a259bc8ccaab56795baf6 Binary release checksums: apache-maven-3.8.2-bin.zip sha512: 59ad2cbd6b7abde34ebedda94ce5631256373718e71b55202035bd1190d0144f071433f78b99e16f1204413b3eb888659e5039009e1ad0106f16332e3c62bced apache-maven-3.8.2-bin.tar.gz sha512: b0bf39460348b2d8eae1c861ced6c3e8a077b6e761fb3d4669be5de09490521a74db294cf031b0775b2dfcd57bd82246e42ce10904063ef8e3806222e686f222 Draft for release notes: https://github.com/apache/maven-site/pull/251 Guide to testing staged releases: http://maven.apache.org/guides/development/guide-testing-releases.html Vote open for at least 72 hours. [ ] +1 [ ] +0 [ ] -1 - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org