forked from OpenLiberty/ci.gradle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
52 lines (46 loc) · 1.49 KB
/
Copy pathbuild.gradle
File metadata and controls
52 lines (46 loc) · 1.49 KB
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
//
// This EAR module intentionally applies ONLY 'ear' and 'liberty' plugins —
// no 'java' plugin is applied here or from the root build.gradle.
// This reproduces the exact user scenario that triggered:
// "Could not get unknown property 'main' for SourceSet container"
// when running 'libertyDev' on Gradle 9 with liberty-gradle-plugin 4.x.
//
apply plugin: 'ear'
apply plugin: 'liberty'
description = 'EAR Module'
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven {
url = 'https://central.sonatype.com/repository/maven-snapshots/'
}
}
dependencies {
classpath "io.openliberty.tools:liberty-gradle-plugin:$lgpVersion"
}
}
dependencies {
deploy project(path: ':war', configuration: 'warOnly')
deploy project(path: ':jar', configuration: 'jarOnly')
libertyRuntime group: runtimeGroup, name: kernelArtifactId, version: runtimeVersion
}
ear {
archiveFileName = rootProject.name + "-" + getArchiveBaseName().get() + "-" + rootProject.version + '.' + getArchiveExtension().get()
deploymentDescriptor {
webModule('ejb-war-1.0-SNAPSHOT.war', '/converter')
}
}
liberty {
server {
name = "ejbServer"
deploy {
apps = [ear]
copyLibsDirectory = file("${project.getLayout().getBuildDirectory().getAsFile().get()}/copy/libs")
}
verifyAppStartTimeout = 30
looseApplication = true
}
}
deploy.dependsOn 'ear'
ear.dependsOn ':jar:jar', ':war:war'