[ https://issues.apache.org/jira/browse/MNG-8665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17939795#comment-17939795 ]
Guillaume Nodet commented on MNG-8665: -------------------------------------- This is not a regression but a behavior change. You can make a profile optional by pre-pending a question mark before the name of the profile. {code:java} mvn -P\?might-produce-incrementals{code} or {code:java} mvn '-P?might-produce-incrementals' {code} > mvn validate fails for Jenkins plugins (regression in 4.0.0-rc-1) > ----------------------------------------------------------------- > > Key: MNG-8665 > URL: https://issues.apache.org/jira/browse/MNG-8665 > Project: Maven > Issue Type: Bug > Components: Core > Affects Versions: 4.0.0-rc-1, 4.0.0-rc-2, 4.0.0-rc-3 > Reporter: Basil Crow > Priority: Major > > h3. Steps to reproduce > {noformat} > $ git clone https://github.com/jenkinsci/text-finder-plugin.git > $ cd text-finder-plugin > $ mvn validate > {noformat} > h3. Expected results > *Note:* These are the _actual_ results with Maven 3.9.9 and Maven > 4.0.0-beta-4. > Build succeeds. > h3. Actual results: > As of 4.0.0-rc-1 (including 4.0.0-rc-2 and 4.0.0-rc-3), I see: > {noformat} > $ mvn validate > [INFO] Scanning for projects... > [WARNING] Failed to build parent project for > org.jenkins-ci.plugins:text-finder:hpi:1.32-SNAPSHOT > [ERROR] The requested profiles [might-produce-incrementals, > consume-incrementals] could not be activated or deactivated because they do > not exist. -> [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.apache.org/confluence/display/MAVEN/MissingProfilesException > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)