nb-configuration.xml settings are ignored for gradle projects #8356
Labels
Gradle
[ci] enable "build tools" tests
kind:bug
Bug report or fix
needs:triage
Requires attention from one of the committers
Apache NetBeans version
Apache NetBeans 25
What happened
While in a gradle-based project, I try to set project specific settings. However, this persists the settings into gradle.properties, which is not desirable because I'm the only Netbeans IDE user in the codebase, and the project is IDE-agnostic and so I do not want to save these settings in gradle.properties.
I thought I could work around this by bringing in an nb-configuration.xml file (which can then be gitignored) with the settings specified there. However, it appears the file is ignored completely.
Language / Project Type / NetBeans Component
NetBeans project specific settings (specifically gradle projects)
How to reproduce
Expected behavior:
The settings are put into nb-configuration.xml, as witnessed in other projects. Or, there is somehow an option for not storing the IDE-specific settings in gradle.properties.
Actual behavior:
The settings are stored in gradle.properties, which is undesired for a project that is IDE-agnostic and where I'm the only one using Netbeans IDE
Alternatively, try bringing your own nb-configuration.xml:
Expected behavior:
The format action will format the document according to the project-specific setting as specified in nb-configuration.xml.
Actual behavior:
The format action behaves as if nb-configuration.xml doesn't exist, and uses the global formatting options.
Did this work correctly in an earlier version?
No / Don't know
Operating System
Fedora 41
JDK
21
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
Workarounds:
Backstory: I'm the only Netbeans IDE user on a coding project, and the project is IDE agnostic so no IDE settings are stored in the code repo, and the project uses gradle. I don't want to accidentally commit changes for gradle.properties that don't actually relate to the build, so I can't use
git add -a
to add all the files like I like.(This may conflict with #1116, unsure)
I've used Netbeans with maven for many years, and recently got into a project that uses gradle, so I've not observed this problem before. Otherwise I've been happy with Netbeans, thank you for the project!
Are you willing to submit a pull request?
No
The text was updated successfully, but these errors were encountered: