Basil Crow created MNG-8667:
-------------------------------
Summary: Failed to build project against clean $HOME/.m2
(regression in Maven 4)
Key: MNG-8667
URL: https://issues.apache.org/jira/browse/MNG-8667
Project: Maven
Issue Type: Bug
Components: Core
Affects Versions: 4.0.0-rc-3
Reporter: Basil Crow
h3. Steps to reproduce
{noformat}
$ rm -rf ~/.m2/repository
$ 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 against a clean
{{{}$HOME/.m2{}}}.
Build succeeds.
h3. Actual results:
As of 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}
h3. Analysis
This issue was previously reported as MNG-8665, which was closed prematurely.
That closure was erroneous because it assumed that the profiles were optional
and did not exist, but the profiles are _not_ optional and _do_ exist.
Note that I cannot reproduce the problem in my regular setup (with a very full
{{$HOME/.m2}} directory, populated by running many Maven 3 builds), but I can
easily reproduce the problem in a Docker container with an empty {{$HOME/.m2}}
directory.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)