Re: feedback on Maven 4.0.0 RC5
Benjamin Marwell <[email protected]> Tue, 07 Apr 2026 22:46:43 +0200
| Newsgroups | gmane.comp.jakarta.turbine.maven.user |
|---|---|
| Message-ID | <A27D2CF5-31B2-49F9-9B7B-2D3E0F69048F__167.241953180053$1775594863$gmane$org@apache.org> |
Thanks, great feedback! CC to dev@ - Ben On 2 April 2026 15:08:37 CEST, Olivier Bourgain <olivierbourgain02@gmail= =2Ecom> wrote: >Hello, > >After meeting Herv=C3=A9 at an event, I tried using Maven 4 on $COMPANY's >projects=2E >I have a script to build about 140 projects, including libraries and >applications and two Maven plugins=2E >I encountered one bug, and I think I can make a few suggestions to improv= e >the UX=2E >The mail is quite long and about several topics, I can break it to >different topics if you prefer=2E > >1- the Bug >Summary: can't combine ! and ? for profiles=2E > >Related to https://issues=2Eapache=2Eorg/jira/browse/MNG-7051 > >Detailed description: >My build script sets a bunch of profiles and applies them blindly to all >projects=2E >The profiles have various purposes, like building a front app and embed i= t >in an artifact, run code gen plugins etc=2E >With Maven 3, for projects that don't have this profile, I just get a >warning=2E Maven 4 is more strict and fails=2E I can mark the profile as >optional with -P?xxx and that's fine=2E >The issue arises with profiles that are activeByDefault=2E I can not comb= ine >? and ! to ask Maven 4 to disable the profile if it exists, and ignore it >if it doesn't exist=2E > >2- UX improvements >a- When a profile doesn't exist, I get the following error: > >[ERROR] The requested profiles [foo] could not be activated or deactivate= d >because they do not exist=2E -> [Help 1] >[ERROR] >[ERROR] To see the full stack trace of the errors, re-run Maven with the >'-e' switch >[ERROR] Re-run Maven using the '-X' switch to enable verbose output >[ERROR] >[ERROR] For more information about the errors and possible solutions, >please read the following articles: >[ERROR] [Help 1] >http://cwiki=2Eapache=2Eorg/confluence/display/MAVEN/MissingProfilesExcep= tion > >- the link is dead >- the message could be improved to make the existence of '?' more >discoverable=2E >e=2Eg: > >[ERROR] The requested profiles [foo] could not be activated or deactivate= d >because they do not exist=2E If this is expected, mark the profile as >optional with '?' > > >b- the following message is not actionable > >[INFO] Artifact com=2Esun=2Eactivation:all:pom:1=2E2=2E2 is present in th= e local >repository, but cached from a remote repository ID that is unavailable in >current build context, verifying that is downloadable from [central ( >https://repo=2Emaven=2Eapache=2Eorg/maven2, default, releases)] > >Maybe more information about how this situation can arise, and the issue = it >causes=2E I have no precise suggestion here=2E > > >c- this should be DEBUG >I get what it is about, but as I user this is not a useful information >about my build: > >[INFO] Loaded 22245 auto-discovered prefixes for remote repository centra= l >(prefixes-central=2Etxt) > >d- Missing an explanation of the why >Could be inline if short enough or a link to doc > >[WARNING] Unable to find the root directory=2E Create a =2Emvn directory = in the >root directory or add the root=3D"true" attribute on the root project's m= odel >to identify it=2E > >e- error reporting contains a lot of duplicate information between root a= nd >modules=2E Maybe they can be grouped by category=2E >E=2Eg=2E >[WARNING] 3 problems were encountered while building the effective model >for 'com=2Eacme:the-module:jar:latest-SNAPSHOT' (use -e to see details) >[WARNING] Ignored POM import for: >commons-logging:commons-logging:jar:1=2E3=2E5@compile as already imported >commons-logging:commons-logging:jar:99-empty@compile=2E Add the conflicti= ng >managed dependency directly to the dependencyManagement section of the PO= M=2E >[WARNING] Ignored POM import for: >org=2Eassertj:assertj-core:jar:3=2E27=2E6@compile as already imported >org=2Eassertj:assertj-core:jar:3=2E27=2E7@compile=2E Add the conflicting = managed >dependency directly to the dependencyManagement section of the POM=2E >[WARNING] Ignored POM import for: >org=2Eeclipse=2Eangus:jakarta=2Email:jar:2=2E0=2E3@compile as already imp= orted >org=2Eeclipse=2Eangus:jakarta=2Email:jar:2=2E0=2E5@compile=2E Add the con= flicting >managed dependency directly to the dependencyManagement section of the PO= M=2E >[WARNING] >[WARNING] 3 problems were encountered while building the effective model >for 'com=2Eacme:the-root:pom:latest-SNAPSHOT' (use -e to see details) >[WARNING] Ignored POM import for: >commons-logging:commons-logging:jar:1=2E3=2E5@compile as already imported >commons-logging:commons-logging:jar:99-empty@compile=2E Add the conflicti= ng >managed dependency directly to the dependencyManagement section of the PO= M=2E >[WARNING] Ignored POM import for: >org=2Eassertj:assertj-core:jar:3=2E27=2E6@compile as already imported >org=2Eassertj:assertj-core:jar:3=2E27=2E7@compile=2E Add the conflicting = managed >dependency directly to the dependencyManagement section of the POM=2E >[WARNING] Ignored POM import for: >org=2Eeclipse=2Eangus:jakarta=2Email:jar:2=2E0=2E3@compile as already imp= orted >org=2Eeclipse=2Eangus:jakarta=2Email:jar:2=2E0=2E5@compile=2E Add the con= flicting >managed dependency directly to the dependencyManagement section of the PO= M=2E >[WARNING] >[WARNING] Total model problems reported: 6 > >Deduplication could help readability, in particular as in my case the >problem in 'the-module' are inherited from 'the-root' and should be fixed >there=2E >E=2Eg=2E we could have something like >[WARNING] 3 problems were encountered while building the effective model >for 'com=2Eacme:the-root:pom:latest-SNAPSHOT' (use -e to see details) >[WARNING] Also impacts: ['com=2Eacme:the-module:jar:latest-SNAPSHOT'] >[WARNING] Ignored POM import for: >commons-logging:commons-logging:jar:1=2E3=2E5@compile as already imported >commons-logging:commons-logging:jar:99-empty@compile=2E Add the conflicti= ng >managed dependency directly to the dependencyManagement section of the PO= M=2E >[WARNING] Ignored POM import for: >org=2Eassertj:assertj-core:jar:3=2E27=2E6@compile as already imported >org=2Eassertj:assertj-core:jar:3=2E27=2E7@compile=2E Add the conflicting = managed >dependency directly to the dependencyManagement section of the POM=2E >[WARNING] Ignored POM import for: >org=2Eeclipse=2Eangus:jakarta=2Email:jar:2=2E0=2E3@compile as already imp= orted >org=2Eeclipse=2Eangus:jakarta=2Email:jar:2=2E0=2E5@compile=2E Add the con= flicting >managed dependency directly to the dependencyManagement section of the PO= M=2E >[WARNING] >[WARNING] Total model problems reported: 3 > >Thanks=2E