Newer
Older
// Apply the java-library plugin to add support for Java Library
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'checkstyle'
apply plugin: 'findbugs'
apply plugin: 'maven'
apply plugin: "com.github.psxpaul.execfork"
apply plugin: 'jacoco'
ext{
//dependencies
tocciVersion = '1.0.1'
docciVersion = '1.0.1'
cocciVersion = '1.0.0'
}
subprojects {
apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.github.psxpaul:gradle-execfork-plugin:0.1.8"
classpath "com.github.jengelman.gradle.plugins:shadow:4.0.3"
}
}
sourceSets {
startMartServer {
resources {
srcDir 'src/test/resources'
}
}
}
eclipse.classpath.file.beforeMerged{ classpath -> classpath.entries.clear() }
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
//mavenLocal()
mavenCentral()
jcenter()
maven {
url "https://nexus.informatik.uni-goettingen.de/content/repositories/thirdparty/"
}
maven {
url "https://nexus.informatik.uni-goettingen.de/content/repositories/rwm/"
}
}
//occiware
compile group: 'org.eclipse.cmf.occi', name: 'core', version: '1.0.0'
compile group: 'org.eclipse.cmf.occi', name: 'infrastructure', version: '1.0.0'
compile group: 'org.eclipse.cmf.occi', name: 'crtp', version: '1.0.0'
compile group: 'org.modmacao', name: 'core', version: '1.0.0'
compile group: 'org.modmacao', name: 'placement', version: '1.0.0'
compile group: 'org.modmacao.occi', name: 'platform', version: '1.0.0'
compile group: 'org.modmacao.openstack', name: 'runtime', version: '1.0.0'
compile group: 'org.modmacao.openstack.swe', name: 'runtime', version: '1.0.0'
compile group: 'org.modmacao', name: 'ansible', version: '1.0.0'
//own
compile group: 'de.ugoe.cs.rwm', name: 'cocci', version: cocciVersion
compile group: 'de.ugoe.cs.rwm', name: 'docci', version: docciVersion
compile group: 'de.ugoe.cs.rwm', name: 'tocci', version: tocciVersion
compile group: 'de.ugoe.cs.rwm.pog', name: 'model', version: '1.0.0'
//compile group: 'de.ugoe.cs.rwm.mocci', name: 'model', version: '1.0.0'
compile project(':de.ugoe.cs.rwm.mocci.model')
//maven
compile group: 'log4j', name: 'log4j', version: '1.2.17'
compile group: 'com.google.guava', name: 'guava', version: '25.1-jre'
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.11.0'
compile "org.eclipse.core:org.eclipse.core.runtime:3.7.0"
compile group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
//Nexus
compile "org.eclipse.uml2:org.eclipse.uml2.uml:4.1.2"
//runtime?
compile "org.eclipse.uml2:org.eclipse.uml2.types:1.1.0"
compile "org.eclipse.uml2:org.eclipse.uml2.common:1.8.2"
compile group: 'org.eclipse.ocl', name: 'pivot', version: '1.3.0'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
project(':de.ugoe.cs.rwm.mocci.model.edit') {
dependencies {
compile project(':de.ugoe.cs.rwm.mocci.model')
}
}
project(':de.ugoe.cs.rwm.mocci.connector') {
dependencies {
compile project(':de.ugoe.cs.rwm.mocci.model')
}
}
attributes 'Main-Class': 'de.ugoe.cs.rwm.mocci.MAPE'
configurations.all {
// Check for updates every build
//resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
resolutionStrategy.preferProjectModules()
javadoc {
source = sourceSets.main.allJava
classpath = configurations.compile
testLogging.showStandardStreams = true
testLogging {
exceptionFormat = 'full'
}
}
tasks.test.dependsOn("startMartServer")
test.finalizedBy jacocoTestReport
jacoco {
toolVersion = "0.8.1"
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/reports/jacoco")
}
}
findbugs {
sourceSets = [sourceSets.main]
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
}
checkstyle {
toolVersion = "8.7"
sourceSets = [sourceSets.main]
}
checkstyleMain {
ignoreFailures = true
}
tasks.withType(FindBugs) {
reports {
xml.enabled false
html.enabled true
}
}
task startMartServer(type: com.github.psxpaul.task.JavaExecFork) {
classpath = files("src/test/resources/org.occiware.mart.jetty.jar")
main = 'org.occiware.mart.jetty.MartServer'
waitForPort = 8080
stopAfter = test
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "https://nexus.informatik.uni-goettingen.de/content/repositories/rwm/") {
authentication(userName: System.getenv('NEXUSUSER'), password: System.getenv('NEXUSPASSWORD'))
}
pom.version = "1.0.0"