11plugins {
22 id ' net.saliman.properties' version ' 1.4.4'
3- id ' com.marklogic.ml-gradle' version ' 2.0'
43 id ' java'
54 id ' eclipse'
65 id ' idea'
76 id ' maven-publish'
7+ id ' com.jfrog.bintray' version ' 1.6'
88}
99
1010repositories {
@@ -13,12 +13,11 @@ repositories {
1313 maven { url ' http://developer.marklogic.com/maven2/' }
1414}
1515
16- group = ' com.marklogic'
16+ group = ' com.marklogic'
1717
1818sourceCompatibility = 1.8
1919targetCompatibility = 1.8
2020
21-
2221dependencies {
2322 compile ' org.springframework.batch:spring-batch-core:3.0.6.RELEASE'
2423 compile ' com.marklogic:marklogic-xcc:8.0.4.2'
@@ -27,7 +26,7 @@ dependencies {
2726 compile ' com.marklogic:ml-app-deployer:2.0'
2827 compile ' commons-io:commons-io:2.4'
2928 compile ' org.apache.commons:commons-csv:1.2'
30- compile(" com.marklogic:mlcp:8.0-4" ) {
29+ compile(' com.marklogic:mlcp:8.0-4' ) {
3130 exclude module : ' servlet-api'
3231 exclude group : ' com.google.guava' , module : ' guava'
3332 }
@@ -49,97 +48,76 @@ task sourcesJar(type: Jar, dependsOn: classes) {
4948}
5049
5150javadoc {
52- options. overview = " src/main/resources/overview.html"
51+ options. overview = ' src/main/resources/overview.html'
5352}
5453
5554Node pomCustomizations = new NodeBuilder (). project {
56- name ' hub-in-a-box'
57- packaging ' jar'
58- textdescription ' Library for Creating an Enterprise Data Hub on MarkLogic'
59- url ' https://github.com/marklogic/hub-in-a-box'
55+ name ' marklogic-data-hub'
56+ packaging ' jar'
57+ textdescription ' Library for Creating an Enterprise Data Hub on MarkLogic'
58+ url ' https://github.com/marklogic/marklogic-data-hub'
59+
60+ scm {
61+ url
' [email protected] :marklogic/marklogic-data-hub.git' 62+ connection
' scm:[email protected] :marklogic/marklogic-data-hub.git' 63+ developerConnection
' scm:[email protected] :marklogic/marklogic-data-hub.git' 64+ }
6065
61- scm {
62- url ' [email protected] :marklogic/hub-in-a-box.git' 63- connection ' scm:[email protected] :marklogic/hub-in-a-box.git ' 64- developerConnection ' scm:[email protected] :marklogic/hub-in-a-box.git ' 66+ licenses {
67+ license {
68+ name ' The Apache Software License, Version 2.0 '
69+ url ' http://www.apache.org/licenses/LICENSE-2.0.txt '
6570 }
71+ }
6672
67- licenses {
68- license {
69- name ' The Apache Software License, Version 2.0'
70- url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
71- }
73+ developers {
74+ developer {
75+ name ' MarkLogic'
76+ 77+ organization ' MarkLogic'
78+ organizationUrl ' https://www.marklogic.com'
7279 }
73-
74- developers {
75- developer {
76- name ' MarkLogic'
77- 78- organization ' MarkLogic'
79- organizationUrl ' https://www.marklogic.com'
80- }
81- developer {
82- name ' MarkLogic Github Contributors'
83- 84- organization ' Github Contributors'
85- organizationUrl ' https://github.com/marklogic/hub-in-a-box/graphs/contributors'
86- }
80+ developer {
81+ name ' MarkLogic Github Contributors'
82+ 83+ organization ' Github Contributors'
84+ organizationUrl ' https://github.com/marklogic/marklogic-data-hub/graphs/contributors'
8785 }
86+ }
8887}
8988
9089publishing {
91- publications {
92- mainJava(MavenPublication ) {
93- from components. java
94-
95- pom. withXml {
96- asNode(). append(pomCustomizations. developers)
97- asNode(). append(pomCustomizations. name)
98- asNode(). append(pomCustomizations. packaging)
99- asNode(). append(pomCustomizations. url)
100- asNode(). append(pomCustomizations. scm)
101- asNode(). append(pomCustomizations. licenses)
102- asNode(). appendNode(" description" , pomCustomizations. textdescription. text)
103- }
104-
105- artifact sourcesJar
106-
107- artifact javadocJar
108-
109- }
110- }
111- repositories {
112- maven {
113- url publishUrl
90+ publications {
91+ main(MavenPublication ) {
92+ from components. java
93+ artifact sourcesJar
94+ artifact javadocJar
95+
96+ pom. withXml {
97+ asNode(). appendNode(' description' , pomCustomizations. textdescription. text())
98+ asNode(). append(pomCustomizations. developers)
99+ asNode(). append(pomCustomizations. name)
100+ asNode(). append(pomCustomizations. packaging)
101+ asNode(). append(pomCustomizations. url)
102+ asNode(). append(pomCustomizations. scm)
103+ asNode(). append(pomCustomizations. licenses)
104+ }
105+ }
114106 }
115- }
116107}
117108
118- ext {
119- mlAppConfig {
120- modulePaths = [" marklogic-data-hub/src/main/resources/ml-modules" ]
109+ bintray {
110+ user = project. hasProperty(' bintrayUser' ) ? project. property(' bintrayUser' ) : System . getenv(' BINTRAY_USER' )
111+ key = project. hasProperty(' bintrayApiKey' ) ? project. property(' bintrayApiKey' ) : System . getenv(' BINTRAY_API_KEY' )
112+ publications = [' main' ]
113+ pkg {
114+ repo = ' maven'
115+ name = project. name
116+ desc = pomCustomizations. textdescription. text()
117+ // userOrg = user
118+ licenses = [' Apache-2.0' ]
119+ websiteUrl = pomCustomizations. url
120+ vcsUrl = pomCustomizations. scm. url
121+ issueTrackerUrl = ' https://github.com/marklogic/marklogic-data-hub/issues'
121122 }
122-
123- // don't deploy the content database
124- cmd = mlAppDeployer. getCommand(" DeployContentDatabasesCommand" )
125- index = mlAppDeployer. commands. indexOf(cmd)
126- mlAppDeployer. commands. remove(cmd)
127- mlDatabaseCommands. remove(cmd)
128-
129- def stagingDbCommand = new com.marklogic.appdeployer.command.databases.DeployDatabaseCommand (" staging-database.json" )
130- stagingDbCommand. setForestsPerHost(3 );
131- mlAppDeployer. commands. add(index, stagingDbCommand)
132- mlDatabaseCommands. add(stagingDbCommand)
133-
134- def finalDbCommand = new com.marklogic.appdeployer.command.databases.DeployDatabaseCommand (" final-database.json" )
135- finalDbCommand. setForestsPerHost(3 );
136- mlAppDeployer. commands. add(index + 1 , finalDbCommand)
137- mlDatabaseCommands. add(finalDbCommand)
138-
139- println (mlAppDeployer. commands. toString())
140- println (" " )
141- println (" " )
142- println (mlDatabaseCommands. toString())
143-
144-
145123}
0 commit comments