Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apply plugin: "base"
- apply plugin: "maven"
- apply plugin: "maven-publish"
- repositories {
- maven { url defaultRepository }
- }
- task assembleArtifact(type: Zip, group: 'DB') {
- archiveName 'db.zip'
- destinationDir file("$buildDir/libs/")
- from "src/main/sql"
- description "Assemble archive $archiveName into ${relativePath(destinationDir)}"
- }
- task explode(type: Sync, group: 'DB') {
- destinationDir file("$buildDir/exploded")
- with assembleArtifact
- description "Create an exploded package in the ${relativePath(destinationDir)}"
- }
- publishing {
- publications {
- mavenJava(MavenPublication) {
- artifact source: assembleArtifact, extension: 'zip'
- }
- }
- repositories {
- maven {
- credentials {
- username nexusUsername
- password nexusPassword
- }
- url nexusRepo
- }
- }
- }
- assemble.dependsOn assembleArtifact
- build.dependsOn assemble
- publish.dependsOn build
- # Maven repository for publishing artifacts
- nexusRepo=http://privatenexus/content/repositories/releases
- nexusUsername=admin_user
- nexusPassword=admin_password
- # Maven repository for resolving artifacts
- defaultRepository=http://privatenexus/content/groups/public
- # Maven coordinated
- group=demo.group.db
- version=SNAPSHOT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement