Nexus是否接受脚本中的Groovy字符串?

Nexus是否接受脚本中的Groovy字符串?,nexus,sonatype,nexus3,Nexus,Sonatype,Nexus3,在将groovy脚本作为任务运行以创建角色后: security.addRole(//id roleDeveloper, //名字 roleDeveloper, //描述 “${repoCap}组上的开发人员”, //特权 [“nx-repository-view-maven2-${repo}-依赖项浏览”, “nx-repository-view-maven2-${repo}-依赖项读取”], //角色 [“dw所有公共回购”]) 我无法访问“角色”菜单。我得到以下错误: com.orien

在将groovy脚本作为任务运行以创建角色后:

security.addRole(//id
roleDeveloper,
//名字
roleDeveloper,
//描述
“${repoCap}组上的开发人员”,
//特权
[“nx-repository-view-maven2-${repo}-依赖项浏览”,
“nx-repository-view-maven2-${repo}-依赖项读取”],
//角色
[“dw所有公共回购”])
我无法访问“角色”菜单。我得到以下错误:

com.orientechnologies.orient.core.exception.ODatabaseException: Error on deserialization of Serializable DB name="security"
[...]
Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.runtime.GStringImpl
  at java.net.URLClassLoader.findClass(URLClassLoader.java:381) [na:1.8.0_91]
  at java.lang.ClassLoader.loadClass(ClassLoader.java:424) [na:1.8.0_91]
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [na:1.8.0_91]
  at org.apache.felix.framework.BundleWiringImpl.doImplicitBootDelegation(BundleWiringImpl.java:1782) [na:na]
  at org.apache.felix.framework.BundleWiringImpl.searchDynamicImports(BundleWiringImpl.java:1717) [na:na]
  at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1552) [na:na]
  at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79) [na:na]
  at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018) [na:na]
在多个版本的Nexus(3.x)上运行了多个测试(带或不带字符串插值)后,某些参数似乎支持字符串插值,但特权参数不支持

这是一个已知的问题吗


由于上述错误,“我的角色”菜单无法访问,现在有办法修复它吗?(我试图用脚本删除它,但失败了,因为delete先执行加载)

很抱歉Alexandre出现了问题。看起来您必须直接连接到数据库才能修复有问题的记录。有关如何使用Nexus offline执行此操作的说明如下:

特别是,您要连接的数据库是“安全的”:

connect plocal:data/db/security admin admin
您需要检查/删除的表是“privilege”和“role”。 我会注意这里,以防你遇到问题或有任何后续问题