Bug 521280 - global toolchains not found - property maven.conf not set prior to invoking MavenCli
Summary: global toolchains not found - property maven.conf not set prior to invoking M...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-22 18:58 EDT by Brad Flood CLA
Modified: 2021-04-19 13:25 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Flood CLA 2017-08-22 18:58:40 EDT
maven 3.5.0 CLI no longer looks for global toolchains configuration in ${maven.home}/conf, instead looking in ${maven.conf}
https://git-wip-us.apache.org/repos/asf?p=maven.git;a=commitdiff;h=be5caccaff3d00ffca4b3cefe9665b6106bc44bf

It appears m2e must set property maven.conf prior to invoking MavenCli


This appears to apply to the following three classes:
m2e-core/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/launch/MavenExternalRuntime.java
m2e-core/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/launch/MavenEmbeddedRuntime.java
m2e-core/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/launch/MavenWorkspaceRuntime.java

Further, the comments in MavenWorkspaceRuntime that appear to show contents of m2.conf no longer match the contents of the latest m2.conf, specifically as it relates to the newly introduced maven.conf property

https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob_plain;f=apache-maven/src/bin/m2.conf
===
main is org.apache.maven.cli.MavenCli from plexus.core
 
set maven.conf default ${maven.home}/conf
 
 [plexus.core]
 load       ${maven.conf}/logging
 optionally ${maven.home}/lib/ext/*.jar
 load       ${maven.home}/lib/*.jar
===
Comment 1 Brad Flood CLA 2018-08-02 16:18:07 EDT
I've upgraded to Eclipse Photon, external Maven 3.5.4 and verified the global toolchains.xml file is not located.

A fix is to add
-Dmaven.conf=<path to maven>/conf when invoking the m2e external maven runtime.

This fix is not scalable, as we have over 250 developers that would be affected. 

If there is a way to set maven.conf in a way that could be bundled with Eclipse, I would welcome that as an interim solution. 

I've looked at <maven>/conf/m2.conf which appears to set maven.conf, but the property is apparently used only for creating the classpaths; the property is not currently added to System properties
Comment 2 Eclipse Genie CLA 2020-07-23 09:44:14 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Eclipse Genie CLA 2020-07-23 16:08:19 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Mickael Istria CLA 2021-03-30 05:33:33 EDT
Eclipse m2e is moving away from this bugs.eclipse.org issue tracker to https://github.com/eclipse-m2e/m2e-core/issues/ instead. If this issue is relevant to you, your action is required.
0. Verify this issue is still happening with latest Eclipse Platform and m2e release
  if issue has disappeared, please change status of this issue to "CLOSED WORKFORME" with some details about your testing environment and how you did verify the issue; and you're done
  if issue is still present when latest release:
* Create a new issue at https://github.com/eclipse-m2e/m2e-core/issues/
  ** Use as title in GitHub the title of this Bugzilla ticket (may include the bug number or not, at your own convenience)
  ** In the GitHub description, start with a link to this bugzilla ticket
  ** Optionally add new content to the description if it can helps towards resolution
  ** Submit GitHub issue
* Update bugzilla ticket
  ** Add to "See also" property (up right column) the link to the newly created GitHub issue
  ** Add a comment "Migrated to <link-to-newly-created-GitHub-issue>"
  ** Set status as CLOSED MOVED
  ** Submit

All issues that remain open will be automatically closed next week or so. Then the m2e component for m2e will be made read-only.
Comment 5 Mickael Istria CLA 2021-03-30 05:34:16 EDT
Eclipse m2e is moving away from this bugs.eclipse.org issue tracker to https://github.com/eclipse-m2e/m2e-core/issues/ instead. If this issue is relevant to you, your action is required.
0. Verify this issue is still happening with latest Eclipse Platform and m2e release
  if issue has disappeared, please change status of this issue to "CLOSED WORKFORME" with some details about your testing environment and how you did verify the issue; and you're done
  if issue is still present when latest release:
* Create a new issue at https://github.com/eclipse-m2e/m2e-core/issues/
  ** Use as title in GitHub the title of this Bugzilla ticket (may include the bug number or not, at your own convenience)
  ** In the GitHub description, start with a link to this bugzilla ticket
  ** Optionally add new content to the description if it can helps towards resolution
  ** Submit GitHub issue
* Update bugzilla ticket
  ** Add to "See also" property (up right column) the link to the newly created GitHub issue
  ** Add a comment "Migrated to <link-to-newly-created-GitHub-issue>"
  ** Set status as CLOSED MOVED
  ** Submit

All issues that remain open will be automatically closed next week or so. Then the m2e component for m2e will be made read-only.
Comment 6 Denis Roy CLA 2021-04-19 13:25:13 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/