Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
93 lines (71 sloc) 4.45 KB
apply plugin: JavaPlugin
buildDir = 'target/gradle-build'
ext.libraryVersions = [
junit: '4.8.1', arquillian: '1.1.1.Final', jbossJavaeeSpec: '1.0.0.Final', weld: '1.1.1.Final',
slf4j: '1.5.10', log4j: '1.2.14', jbossAS6: '6.0.0.Final', glassfish: '4.0-b72', cdi: '1.0-SP4',
hamcrest: '1.2', jbossAS7: '7.1.1.Final', shrinkwrapDesc: '2.0.0-alpha-3'
]
repositories {
mavenCentral()
// enable if you want to use snapshots published locally
//mavenRepo urls: 'file://' + System.getProperty('user.home') + '/.m2/repository'
mavenRepo url: 'http://repository.jboss.org/nexus/content/groups/public'
mavenRepo url: 'http://repository.jboss.org/nexus/content/repositories/deprecated'
}
configurations {
compileOnly
weldEmbeddedTestRuntime { extendsFrom testRuntime }
jbossAS6RemoteTestRuntime { extendsFrom testRuntime, compileOnly }
jbossAS7ManagedTestRuntime { extendsFrom testRuntime, compileOnly }
jbossAS7RemoteTestRuntime { extendsFrom testRuntime, compileOnly }
glassfishEmbeddedTestRuntime { extendsFrom testRuntime }
}
dependencies {
// replace javax.enterprise:cdi-api with group: 'org.jboss.spec', name: 'jboss-javaee-6.0', version: libraryVersions.jbossJavaeeSpec to compile against full Java EE API
compileOnly group: 'javax.enterprise', name: 'cdi-api', version: libraryVersions.cdi
testCompile group: 'junit', name: 'junit', version: libraryVersions.junit
testCompile group: 'org.hamcrest', name: 'hamcrest-core', version: libraryVersions.hamcrest
testCompile group: 'org.jboss.arquillian.junit', name: 'arquillian-junit-container', version: libraryVersions.arquillian
testCompile group: 'org.jboss.shrinkwrap.descriptors', name: 'shrinkwrap-descriptors-api-javaee', version: libraryVersions.shrinkwrapDesc
testRuntime group: 'org.jboss.shrinkwrap.descriptors', name: 'shrinkwrap-descriptors-impl-javaee', version: libraryVersions.shrinkwrapDesc
weldEmbeddedTestRuntime group: 'org.jboss.arquillian.container', name: 'arquillian-weld-ee-embedded-1.1', version: '1.0.0.CR7'
weldEmbeddedTestRuntime group: 'org.jboss.spec', name: 'jboss-javaee-6.0', version: libraryVersions.jbossJavaeeSpec
weldEmbeddedTestRuntime group: 'org.jboss.weld', name: 'weld-core', version: libraryVersions.weld
weldEmbeddedTestRuntime group: 'org.slf4j', name: 'slf4j-log4j12', version: libraryVersions.slf4j
weldEmbeddedTestRuntime group: 'log4j', name: 'log4j', version: libraryVersions.log4j
jbossAS6RemoteTestRuntime group: 'org.jboss.arquillian.container', name: 'arquillian-jbossas-remote-6', version: libraryVersions.arquillian
jbossAS6RemoteTestRuntime group: 'org.jboss.spec', name: 'jboss-javaee-6.0', version: libraryVersions.jbossJavaeeSpec
jbossAS6RemoteTestRuntime group: 'org.jboss.jbossas', name: 'jboss-as-profileservice-client', version: libraryVersions.jbossAS6
jbossAS7ManagedTestRuntime group: 'org.jboss.as', name: 'jboss-as-arquillian-container-managed', version: libraryVersions.jbossAS7
jbossAS7ManagedTestRuntime group: 'org.jboss.spec', name: 'jboss-javaee-6.0', version: libraryVersions.jbossJavaeeSpec
jbossAS7RemoteTestRuntime group: 'org.jboss.as', name: 'jboss-as-arquillian-container-remote', version: libraryVersions.jbossAS7
jbossAS7RemoteTestRuntime group: 'org.jboss.spec', name: 'jboss-javaee-6.0', version: libraryVersions.jbossJavaeeSpec
glassfishEmbeddedTestRuntime group: 'org.jboss.arquillian.container', name: 'arquillian-glassfish-embedded-3.1', version: '1.0.0.CR4'
glassfishEmbeddedTestRuntime group: 'org.glassfish.main.extras', name: 'glassfish-embedded-all', version: libraryVersions.glassfish
}
sourceSets {
main {
compileClasspath = configurations.compile + configurations.compileOnly
}
test {
compileClasspath = compileClasspath + configurations.compileOnly
}
}
task weldEmbeddedTest(type: Test)
task jbossAS6RemoteTest(type: Test)
task jbossAS7ManagedTest(type: Test)
task jbossAS7RemoteTest(type: Test)
task glassfishEmbeddedTest(type: Test)
tasks.withType(Test).matching({ t-> t.name.endsWith('Test') } as Spec).each { t ->
t.classpath = project.configurations.getByName(t.name + 'Runtime') + project.sourceSets.main.output + project.sourceSets.test.output
if (t.name.startsWith('jbossas')) {
t.classpath += files('src/test/resources-jbossas')
}
}
test {
dependsOn { weldEmbeddedTest }
setEnabled(false) // FIXME: why is this disabled?
}
task generateWrapper(type: Wrapper) {
gradleVersion = '1.7'
}
You can’t perform that action at this time.