Skip to content

Commit 5f704c1

Browse files
committed
DXA 1.5 Release
2 parents d5c489a + a2f01c7 commit 5f704c1

File tree

64 files changed

+1506
-828
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1506
-828
lines changed

build.gradle

Lines changed: 85 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
import java.util.concurrent.Callable
2+
import java.util.concurrent.Executors
3+
import java.util.concurrent.Future
4+
15
group 'com.sdl.dxa'
26

37
defaultTasks 'build'
48

5-
def getDefaultCommand() { "clean install" }
9+
def getDefaultCommand() { "install" }
610

711
task wrapper(type: Wrapper) {
812
gradleVersion = '2.9'
@@ -39,23 +43,51 @@ task help << {
3943
task build << {
4044
greet()
4145

46+
def beforeAll = ["dxa-bom", "dxa-bom-2013sp1"]
47+
def parallel = [
48+
"dxa-framework",
49+
"dxa-webapp-archetype"
50+
]
51+
4252
def commandToExecute = getCommandToExecute()
4353

44-
[
45-
"dxa-bom",
46-
"dxa-bom-2013sp1",
47-
"dxa-webapp-archetype",
48-
"dxa-framework"
49-
].each {
50-
try {
51-
runMaven(commandToExecute, findPath([it, "pom.xml"]))
52-
} catch (ignored) {
53-
println """
54-
Well, there is an error. Press <Enter> to finish."""
55-
System.in.read()
56-
throw new RuntimeException(ignored)
54+
def pool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors())
55+
56+
def failed = []
57+
def tasks = []
58+
59+
//noinspection GroovyAssignabilityCheck
60+
def processOutput = { Output output ->
61+
if (output.code != 0) {
62+
failed << output
63+
} else {
64+
println "SUCCESS: ${output.command}"
65+
}
66+
}
67+
68+
beforeAll.each {
69+
processOutput(pool.submit(new BuildTask(name: it, commandToExecute: commandToExecute)).get())
70+
}
71+
parallel.each {
72+
tasks << new BuildTask(name: it, commandToExecute: commandToExecute)
73+
}
74+
List<Future<Output>> futures = pool.invokeAll(tasks)
75+
for (Future<Output> buildResult : futures) {
76+
processOutput(buildResult.get())
77+
}
78+
79+
if (failed.size() > 0) {
80+
println """
81+
=== FAILED JOBS: ===
82+
"""
83+
failed.each {
84+
it.lines.each { println it }
5785
}
86+
println """
87+
Well, there is an error. Press <Enter> to finish."""
88+
System.in.read()
5889
}
90+
5991
}
6092

6193
def greet() {
@@ -65,43 +97,51 @@ def greet() {
6597
"""
6698
}
6799

68-
@SuppressWarnings(["GrUnresolvedAccess", "GroovyAssignabilityCheck"])
69-
String findPath(List<String> parts) {
70-
71-
println " findPath(): Invoked findPath() with parts = ${parts}"
72-
String joined = new File('.').absolutePath + File.separator + parts.join(File.separator)
73-
74-
println " findPath(): Check if ${joined} exists or the last path part left"
75-
if (parts.size() == 1 || new File(joined).exists()) {
76-
println " findPath(): Returning ${joined}"
77-
return joined
78-
}
79-
int len = parts.size() - 1
80-
println " findPath(): Size of path parts array ${len}"
81-
findPath(parts.getAt(1..len))
100+
String getCommandToExecute() {
101+
project.hasProperty("command") ? "${command}" : defaultCommand
82102
}
83103

84-
def runMaven(String command, String pomPath) {
85-
String toRun = "${determineShell()} mvn ${command} -f \"${pomPath}\""
104+
class Output {
105+
List<String> lines
106+
int code
107+
String command
108+
}
86109

87-
println """
88-
Running ${toRun}
89-
"""
110+
class BuildTask implements Callable<Output> {
111+
String name, commandToExecute
90112

91-
def execute = toRun.execute()
92-
execute.in.eachLine {
93-
println it
113+
@Override
114+
Output call() throws Exception {
115+
runMaven(commandToExecute, findPath([name, "pom.xml"]))
94116
}
95-
if (execute.exitValue()) {
96-
throw new RuntimeException("Execution of Maven run failed.")
117+
118+
@SuppressWarnings(["GrUnresolvedAccess", "GroovyAssignabilityCheck"])
119+
String findPath(List<String> parts) {
120+
String joined = new File('.').absolutePath + File.separator + parts.join(File.separator)
121+
122+
if (parts.size() == 1 || new File(joined).exists()) {
123+
return joined
124+
}
125+
int len = parts.size() - 1
126+
findPath(parts.getAt(1..len))
97127
}
98-
}
99128

100-
String getCommandToExecute() {
101-
project.hasProperty("command") ? "${command}" : defaultCommand
102-
}
129+
Output runMaven(String command, String pomPath) {
130+
String toRun = "${determineShell()} mvn ${command} -f \"${pomPath}\""
103131

104-
String determineShell() {
105-
org.gradle.internal.os.OperatingSystem.current().windows ? "cmd /c " : "";
106-
}
132+
def output = new Output(command: toRun, lines: [], code: 0)
107133

134+
println "Running in background ${toRun}"
135+
136+
def execute = toRun.execute()
137+
execute.in.eachLine {
138+
output.lines << it
139+
}
140+
output.code = execute.exitValue()
141+
output
142+
}
143+
144+
static String determineShell() {
145+
org.gradle.internal.os.OperatingSystem.current().windows ? "cmd /c " : "";
146+
}
147+
}

dxa-bom-2013sp1/pom.xml

Lines changed: 83 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<groupId>com.sdl.dxa</groupId>
1313
<artifactId>dxa-bom-2013sp1</artifactId>
14-
<version>1.5.0-SNAPSHOT</version>
14+
<version>1.5.0</version>
1515
<packaging>pom</packaging>
1616

1717
<name>DXA - BOM for 2013SP1</name>
@@ -44,7 +44,7 @@
4444
</developers>
4545

4646
<properties>
47-
<dxa-bom.version>1.5.0-SNAPSHOT</dxa-bom.version>
47+
<dxa-bom.version>1.5.0</dxa-bom.version>
4848
<cd.version>7.1.0</cd.version>
4949
<cwd.version>7.1.2</cwd.version>
5050
<smarttarget.version>2014sp1</smarttarget.version>
@@ -61,6 +61,20 @@
6161
<sqljdbc4-version>4.0</sqljdbc4-version>
6262

6363
<htmlcleaner.version>2.10</htmlcleaner.version>
64+
65+
<patricia-trie-version>0.7</patricia-trie-version>
66+
67+
<ehcache.version>2.8.2</ehcache.version>
68+
69+
<hibernate-core.version>4.0.1.Final</hibernate-core.version>
70+
<antlr.version>2.7.7</antlr.version>
71+
<jboss-transaction-api_1.1_spec.version>1.0.0.Final</jboss-transaction-api_1.1_spec.version>
72+
<dom4j.version>1.6.1</dom4j.version>
73+
<jboss-logging.version>3.1.0.CR2</jboss-logging.version>
74+
<javassist.version>3.15.0-GA</javassist.version>
75+
<hibernate-commons-annotations.version>4.0.1.Final</hibernate-commons-annotations.version>
76+
<aopalliance.version>1.0</aopalliance.version>
77+
<hsqldb.version>2.2.8</hsqldb.version>
6478
</properties>
6579
<dependencyManagement>
6680
<dependencies>
@@ -145,7 +159,6 @@
145159
<dependency>
146160
<groupId>com.tridion</groupId>
147161
<artifactId>cwd_engine</artifactId>
148-
<scope>runtime</scope>
149162
<version>${cwd.version}</version>
150163
</dependency>
151164
<dependency>
@@ -299,6 +312,73 @@
299312
<scope>runtime</scope>
300313
</dependency>
301314

315+
<dependency>
316+
<groupId>antlr</groupId>
317+
<artifactId>antlr</artifactId>
318+
<version>${antlr.version}</version>
319+
<scope>runtime</scope>
320+
</dependency>
321+
<dependency>
322+
<groupId>org.jboss.spec.javax.transaction</groupId>
323+
<artifactId>jboss-transaction-api_1.1_spec</artifactId>
324+
<version>${jboss-transaction-api_1.1_spec.version}</version>
325+
<scope>runtime</scope>
326+
</dependency>
327+
<dependency>
328+
<groupId>dom4j</groupId>
329+
<artifactId>dom4j</artifactId>
330+
<version>${dom4j.version}</version>
331+
<scope>runtime</scope>
332+
</dependency>
333+
<dependency>
334+
<groupId>org.jboss.logging</groupId>
335+
<artifactId>jboss-logging</artifactId>
336+
<version>${jboss-logging.version}</version>
337+
<scope>runtime</scope>
338+
</dependency>
339+
<dependency>
340+
<groupId>org.javassist</groupId>
341+
<artifactId>javassist</artifactId>
342+
<version>${javassist.version}</version>
343+
<scope>runtime</scope>
344+
</dependency>
345+
<dependency>
346+
<groupId>org.hibernate.common</groupId>
347+
<artifactId>hibernate-commons-annotations</artifactId>
348+
<version>${hibernate-commons-annotations.version}</version>
349+
<scope>runtime</scope>
350+
</dependency>
351+
<dependency>
352+
<groupId>org.hibernate</groupId>
353+
<artifactId>hibernate-core</artifactId>
354+
<version>${hibernate-core.version}</version>
355+
<scope>runtime</scope>
356+
<exclusions>
357+
<exclusion>
358+
<groupId>xml-apis</groupId>
359+
<artifactId>xml-apis</artifactId>
360+
</exclusion>
361+
</exclusions>
362+
</dependency>
363+
<dependency>
364+
<groupId>aopalliance</groupId>
365+
<artifactId>aopalliance</artifactId>
366+
<version>${aopalliance.version}</version>
367+
<scope>runtime</scope>
368+
</dependency>
369+
<dependency>
370+
<groupId>org.hsqldb</groupId>
371+
<artifactId>hsqldb</artifactId>
372+
<version>${hsqldb.version}</version>
373+
<scope>runtime</scope>
374+
</dependency>
375+
376+
<dependency>
377+
<groupId>net.sf.ehcache</groupId>
378+
<artifactId>ehcache</artifactId>
379+
<version>${ehcache.version}</version>
380+
</dependency>
381+
302382
</dependencies>
303383
</dependencyManagement>
304384

0 commit comments

Comments
 (0)