Created
April 7, 2016 12:47
-
-
Save bmuschko/9e5c5f3233fc71831178c76a4ba2dcea to your computer and use it in GitHub Desktop.
Gradle 2.13-rc1
This file contains hidden or 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
initscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
// needed for syncSnapshot and syncStaging | |
classpath 'org.apache.maven.wagon:wagon-webdav-jackrabbit:2.10' | |
classpath 'commons-codec:commons-codec:1.10' | |
} | |
} | |
rootProject { | |
task(group: 'Repository', description: 'Sync local staging-repository to oss.sonatype.org.', 'syncCompanyStaging') << { | |
def stagingRepos = new org.apache.maven.wagon.repository.Repository('staging', 'http://xxx/nexus/content/repositories/releases') | |
def auth = new org.apache.maven.wagon.authentication.AuthenticationInfo() | |
auth.userName = 'nexusUserName' | |
auth.password = 'nexusPassword' | |
def wagon = new org.apache.maven.wagon.providers.webdav.WebDavWagon() | |
wagon.connect(stagingRepos, auth) | |
file('release').eachFile { | |
if (it.directory) { | |
wagon.putDirectory(it, it.name) | |
} else { | |
wagon.put(it, it.name) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment