Skip to content

Instantly share code, notes, and snippets.

@grimrose
Created April 9, 2012 09:22
Show Gist options
  • Save grimrose/2342478 to your computer and use it in GitHub Desktop.
Save grimrose/2342478 to your computer and use it in GitHub Desktop.
Arquillian Getting Started
apply plugin: 'eclipse'
def langs = ['java', 'groovy']
langs.each {
apply plugin : it
}
group = 'org.arquillian.example'
sourceCompatibility = 1.6
targetCompatibility = 1.6
def encoding = { it.encoding = 'UTF-8' }
repositories {
mavenCentral()
mavenLocal()
maven {
url 'http://repository.jboss.org/nexus/content/groups/public'
}
}
dependencies {
// compile 'javax.enterprise:cdi-api:1.0'
// compile 'javax.persistence:persistence-api:1.0'
groovy 'org.codehaus.groovy:groovy:1.8.6'
testCompile('junit:junit-dep:4.10') {
exclude module : 'org.hamcrest:hamcrest'
}
testCompile 'org.hamcrest:hamcrest-library:1.2.1'
testCompile 'org.jboss.spec:jboss-javaee-6.0:1.0.0.Final'
testCompile 'org.jboss.arquillian:arquillian-bom:1.0.0.CR8'
testCompile 'org.jboss.arquillian.junit:arquillian-junit-container:1.0.0.CR8'
testCompile 'org.jboss.arquillian.container:arquillian-weld-ee-embedded-1.1:1.0.0.CR2'
testCompile 'org.jboss.weld:weld-core:1.1.5.Final'
testCompile 'org.slf4j:slf4j-api:1.6.4'
testCompile 'org.slf4j:slf4j-simple:1.6.4'
// testCompile 'org.apache.tomcat:dbcp:6.0.29'
// testCompile 'org.jboss.weld.servlet:weld-servlet:1.1.6.Final'
// testCompile 'org.jboss.arquillian.container:arquillian-glassfish-embedded-3.1:1.0.0.CR3'
// testCompile 'org.jboss.arquillian.container:arquillian-tomcat-embedded-6:1.0.0.CR3'
// testCompile 'org.jboss.arquillian.protocol:arquillian-protocol-servlet-3:1.0.0.Alpha4.SP9'
// testCompile 'org.jboss.shrinkwrap:shrinkwrap-extension-tomcat-6:1.0.0-alpha-13'
}
def makeStructure = {
def dir = []
sourceSets.each { src ->
langs.each { lang ->
dir << "src/${src.name}/${lang}"
dir << "src/${src.name}/${lang}/${project.properties.group.replace('.','/')}"
}
dir << "src/${src.name}/resources"
}
dir.each {
println it
ant.mkdir(dir : it)
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.0-milestone-9'
}
tasks.eclipseClasspath {
doFirst makeStructure
}
tasks.withType (AbstractCompile).each {
encoding it.options
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment