Skip to content

Added a global preference for user settings.xml for Maven projects#9282

Open
Achal1607 wants to merge 1 commit intoapache:masterfrom
Achal1607:custom-user-settings-xml
Open

Added a global preference for user settings.xml for Maven projects#9282
Achal1607 wants to merge 1 commit intoapache:masterfrom
Achal1607:custom-user-settings-xml

Conversation

@Achal1607
Copy link
Collaborator

Added a new preference in the MavenSettings for custom user settings.xml file.
Also, exposed it to the LSP
Below is the screenshot for the new preference Netbeans IDE UI:

Screenshot 2026-03-17 at 11 43 09 AM

Closes #4263

@Achal1607 Achal1607 requested review from lahodaj and mbien March 17, 2026 06:20
@Achal1607 Achal1607 added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) Maven [ci] enable "build tools" tests LSP [ci] enable Language Server Protocol tests labels Mar 17, 2026
@apache apache locked and limited conversation to collaborators Mar 17, 2026
@apache apache unlocked this conversation Mar 17, 2026
@lahodaj lahodaj requested a review from sdedic March 17, 2026 10:21
@lahodaj
Copy link
Contributor

lahodaj commented Mar 17, 2026

On a cursory look, seems reasonable to me. @sdedic - any comments? Thanks!

@mbien mbien added this to the NB30 milestone Mar 18, 2026
@mbien
Copy link
Member

mbien commented Mar 18, 2026

useful feature! I found two issues while testing:

  • the settings.xml node in the Project Files folder of maven projects is always linking to the default location (even after restart)
  • the profile switcher combo box in the main tool bar is only updating after restart (edit: i tested this by having different profiles in the custom-settings.xml)

@mbien mbien added the ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) label Mar 18, 2026
Comment on lines +1057 to +1060
JsonPrimitive newMavenUserSettingsPath = null;
if (c instanceof JsonPrimitive) {
newMavenUserSettingsPath = (JsonPrimitive) c;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick:

        JsonPrimitive newMavenUserSettingsPath = c instanceof JsonPrimitive jp ? jp : null;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) LSP [ci] enable Language Server Protocol tests Maven [ci] enable "build tools" tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maven configuration settings.xml

3 participants