We upgraded Nexus to version 3.22.0-02 and followed the Nexus guidelines ( Scripting Nexus Repository Manager 3 – Sonatype Support ) to re-enable the UI CRUD and RUN operations on Task Scripts (groovy) by adding to the config file [NEXUS]/etc/nexus.properties the property “nexus.scripts.allowCreation=true” and then restarted the Nexus server.
But there is a BUG in the upgrade version of Nexus, as it will only let the admin user RUN and DELETE task scripts, but will not permit the UPDATE (edit) the groovy code of an existing script or CREATE a new task script.
Our admin user does have the correct role privileges to CRUD tasks and their scripts. So thats fine.
Has anyone out there had this upgrade problem and what workaround did you use to again EDIT script code or CREATE a new task scripts.
Any tips from you Nexus guru’s out there would be greatly welcomed
Did you restart the server after adding the property?
Thank you Matthew
Yes I restarted the nexus server after updating the nexus.properties file. This step was outlined in the Script re-enable guideline I referenced in my initial comment.
We did notice that on Nexus restart you could now RUN and DELETE tasks, where without “nexus.scripts.allowCreation=true” you could not. So that’s good.
But CREATE a script task and EDIT a script task groovy code textbox features are still disabled, even though the guideline document says "nexus.scripts.allowCreation=true"enabled CREATE and EDIT of task scripts code, hence the BUG
Hi David, unfortunately i’m unable to reproduce the behaviour you are describing. With ‘nexus.scripts.allowCreation=true’ in the nexus.properties file I am able to create new scripts and edit existing scripts.
I’m curious, when you are in the create Tasks screen where you select the type, do you see the dialogue warning that the script task creation has been disabled?
Good question Mick
In the create Tasks screen where you select the type, do you see the dialogue warning that the script task creation has been disabled?
We see this warning message if ‘nexus.scripts.allowCreation=true’ is NOT in the nexus.properties file.
But the warning message does not appear when ‘nexus.scripts.allowCreation=true’ IS IN the nexus.properties file. This was also mentioned in the Nexus guideline I linked to in my initial message.
Hence why we are perplexed with the issue/bug
so with ‘nexus.scripts.allowCreation=true’ set, you do not see the warning message saying script task is disable, but you also don’t see the option to create a script task below it?
Go to “support —> system information” in the UI. Do you see “nexus.scripts.allowCreation“ listed in the “nexus-properties” section there?
Rick, I did NOT see “nexus.scripts.allowCreation“ listed in the “nexus-properties” section.
Rick, Mick: Do you have that property set in your UI - System Information - “nexus-properties” section?
Does this mean then that Nexus has NOT load the property in nexus.properties.
This is odd, because when I added the nexus.scripts.allowCreation=true property to nexus-properties and restarted nexus, Nexus did change, as the Task title warning that the “script task creation has been disabled” is gone, and RUN and DELETE a task is enabled. So Nexus did do something !
Mhhh, I’m puzzled.
I am facing the same issue as @davidturley here.
I am setting the “nexus.scripts.allowCreation“ as True via script and then restarting nexus.
I however don’t see it in my UI - System Information - “nexus-properties”.
How was this resolved?