Advertisement
Guest User

Untitled

a guest
Dec 28th, 2016
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. apply plugin: "base"
  2. apply plugin: "maven"
  3. apply plugin: "maven-publish"
  4.  
  5. repositories {
  6. maven { url defaultRepository }
  7. }
  8.  
  9. task assembleArtifact(type: Zip, group: 'DB') {
  10. archiveName 'db.zip'
  11. destinationDir file("$buildDir/libs/")
  12. from "src/main/sql"
  13. description "Assemble archive $archiveName into ${relativePath(destinationDir)}"
  14. }
  15.  
  16. task explode(type: Sync, group: 'DB') {
  17. destinationDir file("$buildDir/exploded")
  18. with assembleArtifact
  19. description "Create an exploded package in the ${relativePath(destinationDir)}"
  20. }
  21.  
  22. publishing {
  23. publications {
  24. mavenJava(MavenPublication) {
  25. artifact source: assembleArtifact, extension: 'zip'
  26. }
  27. }
  28. repositories {
  29. maven {
  30. credentials {
  31. username nexusUsername
  32. password nexusPassword
  33. }
  34. url nexusRepo
  35. }
  36. }
  37. }
  38.  
  39. assemble.dependsOn assembleArtifact
  40. build.dependsOn assemble
  41. publish.dependsOn build
  42.  
  43. # Maven repository for publishing artifacts
  44. nexusRepo=http://privatenexus/content/repositories/releases
  45. nexusUsername=admin_user
  46. nexusPassword=admin_password
  47.  
  48. # Maven repository for resolving artifacts
  49. defaultRepository=http://privatenexus/content/groups/public
  50.  
  51. # Maven coordinated
  52. group=demo.group.db
  53. version=SNAPSHOT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement