blob: 6a6d4c34924f895335d7ebf5f022f85e1fc2d3ae [file] [log] [blame]
dockerizor {
repository = 'virgo-recipe/accessing-data-mongodb-runtime'
description = 'Virgo Recipe MongoDB (runtime-only) created with Gradle Plugin: com.eclipsesource.dockerizor'
createLocalCopy = true
virgoVersion = 'latest'
hudsonJobName = 'virgo-blueprint3'
virgoHome = '/home/virgo/virgo-recipe-accessing-data-mongodb-runtime'
}
repositories {
mavenCentral()
}
//tag::dependencies[]
dependencies {
repositoryUsr 'org.reactivestreams:reactive-streams:1.0.2'
repositoryUsr "org.mongodb:mongo-java-driver:${mongoJavaDriverVersion}"
repositoryUsr "org.mongodb:mongodb-driver-async:${mongoJavaDriverVersion}"
repositoryUsr 'org.mongodb:mongodb-driver-reactivestreams:${mongodbDriverReactivestreamsVersion}'
// repositoryUsr "org.springframework.data:spring-data-commons:${springDataCommonsVersion}"
// repositoryUsr "org.springframework.data:spring-data-mongodb:${springDataMongodbVersion}"
// Spring Data 2.0.8+ doesn't provide OSGi metadata
repositoryUsr files("org.springframework.data.commons-${springDataCommonsVersion}/build/org.springframework.data.commons-${springDataCommonsVersion}.jar")
repositoryUsr files("org.springframework.data.mongodb-${springDataMongodbVersion}/build/org.springframework.data.mongodb-${springDataMongodbVersion}.jar")
}
//end::dependencies[]
// OSGi-ify 3rd party dependencies
subprojects {
apply plugin: 'base'
repositories {
mavenCentral()
maven {
url "http://build.eclipse.org/rt/virgo/gradle/bundles"
}
}
configurations {
bundlorRuntime
sourceBundle
}
dependencies {
bundlorRuntime('org.eclipse.virgo.bundlor:org.eclipse.virgo.bundlor.commandline:1.1.3.M01')
bundlorRuntime('org.eclipse.virgo.bundlor:org.eclipse.virgo.bundlor:1.1.3.M01')
bundlorRuntime('org.eclipse.virgo.bundlor:org.eclipse.virgo.bundlor.blint:1.1.3.M01')
}
def artifactName = project.name.split('-')[0]
def artifactVersion = project.name.split('-')[1]
task createBuildDir() {
doLast() {
file(project.buildDir).mkdir()
}
}
def outputFile = new File(file(project.buildDir), "${project.name}.jar")
task bundlor(type: JavaExec, dependsOn: createBuildDir) {
classpath = configurations.bundlorRuntime
// template.mf based on
// * https://github.com/spring-projects/spring-data-commons/blob/1.13.x/template.mf
// * https://github.com/spring-projects/spring-data-mongodb/blob/1.10.x/spring-data-mongodb/template.mf
// versions taken from
// * https://github.com/spring-projects/spring-data-build/blob/2.0.8.RELEASE/parent/pom.xml
// * https://github.com/spring-projects/spring-data-commons/blob/2.0.8.RELEASE/pom.xml
// * https://github.com/spring-projects/spring-data-mongodb/blob/2.0.8.RELEASE/pom.xml
main = 'org.eclipse.virgo.bundlor.commandline.Bundlor'
args '-D', "version=${artifactVersion}"
args '-D', "guava=19"
args '-D', "jackson=2.9.6"
args '-D', "javaslang=2.0.6"
args '-D', "jodatime=2.9.9"
args '-D', "jsonpath=2.4.0"
args '-D', "mongo=3.5.0"
args '-D', "mongodbDriverReactivestreamsVersion=${mongodbDriverReactivestreamsVersion}"
args '-D', "objenesis=2.6"
args '-D', "querydsl=4.1.1"
args '-D', "scala=2.11.7"
args '-D', "slf4j=1.7.25"
args '-D', "spring=5.0.7.RELEASE"
args '-D', "springHateoas=0.24.0"
args '-D', "springDataCommonsVersion=${springDataCommonsVersion}"
args '-D', "threetenbp=1.3.6"
args '-D', "validation=1.1.0.Final"
args '-D', "vavr=0.9.2"
args '-D', "xmlbeam=1.4.15"
args '-i', "${-> configurations.sourceBundle[0]}" // lazy GString to resolve the configuration at runtime
args '-m', "${artifactName}.mf"
args '-o', outputFile
doFirst() {
println "Processing ${-> configurations.sourceBundle[0]} with ${artifactName}.mf"
}
doLast() {
}
}
dockerize.dependsOn bundlor
}