netbeans-gradle-project
netbeans-gradle-project copied to clipboard
Please update Profiles to document how to 'Activate a profile'
I am looking for the action to use a Gradle plugin profile other than "Default". There is no information on the Gradle profiles page, or any of the linked pages.
An example usecase. I have defined two profiles for run-time and debug-time command parameters. One uses a service on the localhost, the other uses our test server with an IP address.
- dev-server
- localhost-server
Whenever I run with the debug or run option only the default profile is run. I know this because if I manually paste settings from one of the two profiles, then that server is used.
Whenever/however I try to select a different profile, it always runs with the default profile. I haven't found a menu or setting to change "Active profile", other than the profile drop-down on the project properties panel (so far).
Comparing behaviour with the Netbeans classic profile panel. When I selected a profile with the drop-down box, that was the profile that got used when we run the debugger, until we changed the profile setting On The Properies panel. The Gradle plug-in is working differntly to this and I suggest that is a flaw in the - Profiles documentaton.
I was trying to make sense of the instructions given for Issue #313, whcih seems needlessly cumbersome. And also it looked as if the developer needs to program his build to action profiles. I hope that's just something extra that guy wanted to do. I consider the purpose of profiles by-and-large is to AVOID needing to edit script of builds so you can repeat the same processing across different configurations/contexts, etc.
related:
... Since posting I found that the menu option works for Gradle profiles. I'm adding that here in case anyone else is wanting to do this. I still think the wiki page is the best place. And it wouldn't be a not-good thing to allow the selected profile from the drop-down to remain as the classic netbeans does it.
Process:
- Select a project (or the parent project)
- Click the '''Run''' menu
- Press '''Project configuration'''
- Choose the desired project ''Profile'' to use from the list displayed
It was many years since I have last used the Ant based project type (just tried it again) but I'm not sure what is exactly your expectation. Can you describe exactly what you did and did not result in the selection of your profile? You can surely select a profile with the combo box on the toolbar (as that combo does the exact same thing as the one in the Run menu (to be honest I didn't know that it is there as well).
By the way, if you want to improve the wiki, it is publicly editable (and also available as a git repository at https://github.com/kelemen/netbeans-gradle-project.wiki.git).
Also, I have adjusted the profiles page. I hope it is more clear this way.