Last active
August 23, 2019 13:34
-
-
Save sboardwell/7dabdea3f84366b2a71693362a60e96d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def updateGroup(def name, def members) { | |
if (!repository.getRepositoryManager().exists(name)) { | |
repository.createMavenGroup(name, members) | |
} | |
def mgConfig = repository.getRepositoryManager().get(name).configuration.copy() | |
mgConfig.attributes['group']['memberNames'] = members | |
repository.repositoryManager.update(mgConfig) | |
} | |
updateGroup('maven-group',['maven-public', 'maven-central', 'maven-releases', 'spring-milestone', 'spring-release', 'jitpack', 'jenkins-release', 'maven-jenkinsci', 'jenkins-public', 'plugins-gradle', 'my-protected-repo']) | |
updateGroup('maven-group-snapshots',['maven-snapshots', 'apache-org-snapshots', 'spring-io-libs-snapshot', 'oss-sonatype-snapshots']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment