3737 ngas = org.artifactory.addon.nuget.repomd.NuGetArtifactoryService . class
3838} catch (MissingPropertyException ex) {}
3939
40+ def cpath = " plugins/uniqueNugetDeploy.properties"
41+ def cfile = new File (ctx. artifactoryHome. haAwareEtcDir, cpath)
42+ def config = new ConfigSlurper (). parse(cfile. toURL())
43+
44+
4045class FakeUriInfo implements UriInfo {
4146 MultivaluedMap<String ,String > ps;
4247 public FakeUriInfo (MultivaluedMap<String ,String > ps ) {this . ps = ps}
@@ -63,9 +68,6 @@ class FakeUriInfo implements UriInfo {
6368
6469storage {
6570 beforeCreate { item ->
66- def cpath = " plugins/uniqueNugetDeploy.properties"
67- def cfile = new File (ctx. artifactoryHome. haAwareEtcDir, cpath)
68- def config = new ConfigSlurper (). parse(cfile. toURL())
6971 def repoKeys = config. checkedRepos as String []
7072 def filtKeys = config. filteredRepos as String []
7173 if (! item || ! (item. repoKey in filtKeys)) return
@@ -98,7 +100,12 @@ storage {
98100 } catch (MissingPropertyException ex) {}
99101 if (ngsps4 != null ) {
100102 def params = [ps4] as Object []
101- context. nuGetSearchParameters = ngsps4. newInstance(params)
103+ try {
104+ context. nuGetSearchParameters = ngsps4. newInstance(params)
105+ } catch (GroovyRuntimeException e) {
106+ params = [ps4, true ] as Object []
107+ context. nuGetSearchParameters = ngsps4. newInstance(params)
108+ }
102109 } else {
103110 def params = [ps3, ' ' ] as Object []
104111 context. nuGetSearchParameters = ngsps3. newInstance(params)
0 commit comments