-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
130 lines (103 loc) · 4.97 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
description = "Bridge to CDI for Apache Tapestry 5 Project"
apply plugin: JavaPlugin
version = '1.0.0-SNAPSHOT'
group = "org.apache.tapestry"
buildDir = 'target/gradle-build'
project.ext.libraryVersions = [
tapestry: '5.4-beta-22',
javaeeapi: '6.0-4',
tomee: '1.6.0',
ziplock: '1.5.1',
junit: '4.8.1',
commonsHttpclient: '3.1',
arquillian: '1.1.5.Final',
jbossJavaeeSpec: '1.0.0.Final',
arquillianGlassfish: '1.0.0.CR4',
glassfishDistrib: '3.1.1-b04',
jbossDistrib: '7.1.1.Final',
cdi: '1.0-SP4',
jbossAS7: '7.1.1.Final',
shrinkwrapDesc: '2.0.0-alpha-3',
websphere: '1.0.0.Beta1'
]
repositories {
mavenCentral()
mavenRepo url: 'http://repository.jboss.org/nexus/content/groups/public'
mavenRepo url: 'http://repository.jboss.org/nexus/content/repositories'
mavenRepo url: 'https://repository.apache.org/content/groups/staging' // For access to Apache Staging (Preview) packages
}
configurations {
compileOnly
jboss
glassfish
tomeeEmbeddedTestRuntime { extendsFrom testRuntime, compileOnly }
jbossAS7ManagedTestRuntime { extendsFrom testRuntime, compileOnly }
glassfishManagedTestRuntime { extendsFrom testRuntime, compileOnly }
websphereManagedTestRuntime { extendsFrom testRuntime, compileOnly }
}
dependencies {
compile group: 'org.apache.tapestry', name: 'tapestry-core', version: libraryVersions.tapestry
// 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: 'org.apache.tapestry', name: 'tapestry-test', version: libraryVersions.tapestry
testCompile (group: 'org.apache.tapestry', name: 'tapestry-test', version: libraryVersions.tapestry){
transitive = false
}
testCompile group: 'org.apache.openejb', name: 'ziplock', version: libraryVersions.ziplock
testCompile group: 'junit', name: 'junit', version: libraryVersions.junit
testCompile group: 'commons-httpclient', name: 'commons-httpclient', version: libraryVersions.commonsHttpclient
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
tomeeEmbeddedTestRuntime group: 'org.apache.openejb', name: 'arquillian-tomee-embedded', version: libraryVersions.tomee
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
jboss "org.jboss.as:jboss-as-dist:$libraryVersions.jbossDistrib@zip"
glassfishManagedTestRuntime group: 'org.jboss.arquillian.container', name: 'arquillian-glassfish-managed-3.1', version: libraryVersions.arquillianGlassfish
glassfish "org.glassfish.distributions:glassfish:$libraryVersions.glassfishDistrib@zip"
websphereManagedTestRuntime group: 'org.jboss.arquillian.container', name: 'arquillian-wlp-managed-8.5', version: libraryVersions.websphere
testRuntime files("${System.properties['java.home']}/../lib/tools.jar")
}
sourceSets {
main {
compileClasspath = configurations.compile + configurations.compileOnly
}
test {
compileClasspath = compileClasspath + configurations.compileOnly
}
}
task resolveJBoss(type: Copy) {
destinationDir = file('target')
from { zipTree(configurations.jboss.singleFile) }
}
task resolveGlassfish(type: Copy) {
destinationDir = file('target')
from { zipTree(configurations.glassfish.singleFile) }
}
task tomeeEmbeddedTest(type: Test) {
systemProperty 'arquillian.launch', "tomee_embedded"
}
task jbossAS7ManagedTest(type: Test) {
systemProperty 'arquillian.launch', "jbossas_managed"
dependsOn { resolveJBoss }
}
task glassfishManagedTest(type: Test){
systemProperty 'arquillian.launch', "glassfish_managed"
dependsOn { resolveGlassfish }
}
task websphereManagedTest(type: Test) {
systemProperty 'arquillian.launch', "websphere_managed"
}
tasks.withType(Test).matching({ t-> t.name.endsWith('Test') } as Spec).each { t ->
t.testClassesDir = sourceSets.test.output.classesDir
t.classpath = sourceSets.test.output + sourceSets.main.output + configurations[t.name + 'Runtime']
}
test {
dependsOn { tomeeEmbeddedTest }
setEnabled(false)
}
jar {
manifest {
attributes 'Tapestry-Module-Classes': 'org.apache.tapestry5.cdi.CDIInjectModule'
}
}