Skip to content

Commit 155a851

Browse files
committed
#1 - Artifact file structure on par with original builds; web service now builds
1 parent 3416e7a commit 155a851

File tree

81 files changed

+834
-442
lines changed

Some content is hidden

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

81 files changed

+834
-442
lines changed

README.md

+15-6
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,36 @@
11
# EQUELLA Blackboard Integration
22

3-
Information about the Equella open source community and supporting documentation can be found at https://equella.github.io/
3+
Information about the openEQUELLA community and supporting documentation can be found at https://equella.github.io/
44

5-
Versions are repo-wide (ie all building blocks will have the same version for a given build). Versioning will be loosely tied to SemVer.
5+
Versions are repo-wide (ie all building blocks / web services will have the same version for a given build). Versioning will be loosely tied to SemVer.
66

77
Version 1.X.Y will support Blackboard v3200 - v3300
88
Version 2.W.V will support Blackboard v3400+
99

1010
## Building the primary building block
1111
```
12-
~$ ./gradlew :oeqPrimary:cleanAndRebuild
12+
~$ ./gradlew :oeqPrimaryB2:clean
13+
~$ ./gradlew :oeqPrimaryB2:buildB2
1314
```
14-
The war is placed in (cloned repo)/oeqPrimary/build/libs/
15+
The war is placed in (cloned repo)/oeqPrimaryB2/build/libs/
16+
17+
## Building the primary web service
18+
```
19+
~$ ./gradlew :oeqPrimaryWS:clean
20+
~$ ./gradlew :oeqPrimaryWS:buildWs
21+
```
22+
The jar is placed in (cloned repo)/oeqPrimaryWS/build/libs/
1523

1624
## Building the audit building block
1725
For now, this is just a skeleton building block for testing.
1826

1927
Eventually it may be a helper building block to audit the Blackboard / openEQUELLA integration.
2028

2129
```
22-
~$ ./gradlew :oeqAudit:cleanAndRebuild
30+
~$ ./gradlew :oeqAuditB2:clean
31+
~$ ./gradlew :oeqAuditB2:buildB2
2332
```
24-
The war is placed in (cloned repo)/oeqAudit/build/libs/
33+
The war is placed in (cloned repo)/oeqAuditB2/build/libs/
2534

2635
## Building the linkFixer building block
2736
TODO

build-oldBb9.1.xml

+1-151
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
<project name="Blackboard 9 Building Block SP11+" default="make" basedir=".">
33

44
<property name="build" location="public_html/WEB-INF/classes" />
5-
<import file="../../../common-build.xml" />
6-
5+
76
<property name="warname" value="equella-bb91.war" />
87
<property name="websrc" location="public_html" />
98
<property name="lib" location="public_html/WEB-INF/lib" />
@@ -29,110 +28,9 @@
2928

3029
<property name="version.properties.destination" location="${build}" />
3130

32-
<target name="clean" depends="common.clean">
33-
<delete dir="${wsbuild}"/>
34-
</target>
35-
36-
<target name="init" depends="common.init">
37-
<mkdir dir="${wsbuild}"/>
38-
<mkdir dir="${wsstaging}" />
39-
<mkdir dir="${bbstaging}" />
40-
</target>
41-
42-
<target name="compile" depends="generate-source,define-build.classpath, wscompile,bbcompile" if="src.enabled">
43-
</target>
44-
45-
<target name="bbcompile">
46-
<javac srcdir="${src}" destdir="${build}" classpathref="build.classpath"
47-
nowarn="${javac.nowarn}"
48-
debug="${javac.debug}"
49-
debuglevel="${javac.debuglevel}"
50-
optimize="${javac.optimize}"
51-
target="1.7"
52-
source="1.7"
53-
deprecation="off"
54-
verbose="${javac.verbose}"
55-
depend="${javac.depend}"
56-
includeantruntime="false">
57-
58-
<include name="com/tle/blackboard/common/**" />
59-
<include name="com/tle/blackboard/buildingblock/**" />
60-
<include name="com/tle/web/remoting/soap/**" />
61-
</javac>
62-
<copy file="${src}/icons.xml" todir="${build}"/>
63-
</target>
64-
65-
<target name="wscompile" depends="init">
66-
<javac srcdir="${src}" destdir="${wsbuild}" classpathref="wsclasspath"
67-
nowarn="${javac.nowarn}"
68-
debug="${javac.debug}"
69-
debuglevel="${javac.debuglevel}"
70-
optimize="${javac.optimize}"
71-
target="1.7"
72-
source="1.7"
73-
deprecation="off"
74-
verbose="${javac.verbose}"
75-
depend="${javac.depend}"
76-
includeantruntime="false">
77-
78-
<include name="com/tle/blackboard/webservice/**" />
79-
<include name="com/tle/blackboard/common/**" />
80-
</javac>
81-
<copy file="${src}/icons.xml" todir="${wsbuild}"/>
82-
</target>
83-
84-
<target name="wsjavadoc" depends="compile">
85-
<delete dir="${staging}/doctemp" />
86-
<echo>Making temp copy of source...</echo>
87-
<copy todir="${staging}/doctemp">
88-
<fileset dir="src"
89-
includes="**/*.java"/>
90-
<fileset dir="src">
91-
<include name="**/*.html"/>
92-
</fileset>
93-
</copy>
94-
95-
<javadoc sourcepath="${staging}/doctemp"
96-
failonerror="true"
97-
author="false"
98-
version="true"
99-
use="true"
100-
destdir="${wsdocstaging}"
101-
additionalparam="-breakiterator"
102-
packagenames="com.tle.blackboard.webservice.*"
103-
classpathref="wsclasspath" />
104-
105-
<jar jarfile="${wsdocstaging}/${wsdoczipname}">
106-
<manifest>
107-
<attribute name="Version" value="1.0"/>
108-
</manifest>
109-
<fileset dir="${wsdocstaging}" includes="**"/>
110-
</jar>
111-
112-
<delete dir="${staging}/doctemp" />
113-
</target>
114-
11531
<target name="make" depends="common.make, wsjavadoc">
11632
<property file="${build}/version.properties" />
11733

118-
<!-- copy public_html to a staging folder -->
119-
<copy todir="${bbstaging}">
120-
<fileset dir="${websrc}" />
121-
</copy>
122-
<copy file="bb-manifest-unresolved.xml" tofile="${bbstaging}/WEB-INF/bb-manifest.xml" overwrite="true">
123-
<filterchain>
124-
<tokenfilter>
125-
<replacestring from="@VERSION@" to="${version.mm}" />
126-
</tokenfilter>
127-
</filterchain>
128-
</copy>
129-
130-
<copy file="bb-manifest-webservice.xml" toFile="${wsstaging}/META-INF/bb-manifest.xml" overwrite="true" />
131-
132-
<copy todir="${wsstaging}">
133-
<fileset dir="${wsbuild}" includes="**" />
134-
</copy>
135-
13634
<taskdef resource="proguard/ant/task.properties" classpathref="customtasks.classpath" />
13735

13836
<path id="proguard.libraryjars">
@@ -216,53 +114,5 @@
216114
</fileset>
217115
</jar>
218116

219-
<!-- TODO: REINSTATE this when BB fix their "web service in a building block" issue
220-
https://behind.blackboard.com/s/sysadminas/support/casedetails.aspx?caseid=872696
221-
Also update the bb-manifest-unresolved.xml to add back the webservice -->
222-
<!-- copy jar to Building Block staging root ... -->
223-
224-
<copy todir="${bbstaging}">
225-
<fileset dir="${wsstaging}">
226-
<include name="${wsjarname}" />
227-
</fileset>
228-
</copy>
229-
230-
</target>
231-
232-
<target name="product" depends="common.product">
233-
<war destfile="${product}/${warname}" webxml="${bbstaging}/WEB-INF/web.xml" basedir="${bbstaging}">
234-
<lib dir="${External Dependencies.base}">
235-
<include name="log4j*.jar" />
236-
<include name="guava*.jar" />
237-
<include name="commons-beanutils*.jar" />
238-
<include name="commons-codec*.jar" />
239-
<include name="commons-discovery*.jar" />
240-
<include name="commons-httpclient*.jar" />
241-
<include name="jackson-core-*.jar" />
242-
<include name="jackson-databind-*.jar" />
243-
<include name="slf4j-api-*.jar" />
244-
<include name="struts-core*.jar" />
245-
<include name="struts-taglib*.jar" />
246-
247-
<include name="cxf-bundle-*.jar" />
248-
<include name="neethi-*.jar" />
249-
<include name="xmlschema-core-*.jar" />
250-
<include name="woodstox-core-asl-*.jar" />
251-
<include name="stax2-api-*.jar" />
252-
<include name="stax-api-1.0-2.jar" />
253-
<include name="xalan-*.jar" />
254-
<!--
255-
<include name="xfire-aegis-*.jar" />-->
256-
</lib>
257-
</war>
258-
259-
<!-- TODO: REMOVE this when BB fix their "web service in a building block" issue
260-
https://behind.blackboard.com/s/sysadminas/support/casedetails.aspx?caseid=872696
261-
Also update the bb-manifest-unresolved.xml to add back the webservice -->
262-
<copy todir="${product}">
263-
<fileset dir="${wsstaging}">
264-
<include name="${wsjarname}" />
265-
</fileset>
266-
</copy>
267117
</target>
268118
</project>

build.gradle

+52-12
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// Needed for pre-compiling the JSPs
21
buildscript {
32
repositories {
43
jcenter()
54
}
65

76
dependencies {
7+
// Needed for pre-compiling the JSPs
88
classpath "com.bmuschko:gradle-tomcat-plugin:${gradleTomcatPluginVersion}"
99
}
1010
}
@@ -14,7 +14,7 @@ allprojects {
1414
apply plugin: "war"
1515
apply plugin: "com.bmuschko.tomcat"
1616
group = 'org.apereo.openequella.integration.blackboard'
17-
version = buildingBlockVersion
17+
version = artifactVersion
1818
repositories {
1919
mavenCentral()
2020
maven {
@@ -50,16 +50,17 @@ allprojects {
5050
}
5151

5252
war {
53-
from 'build/jsps/org/apache/jsp' // this and the following exclude used to move the pre-compiled JSPs
53+
from 'build/jsps/org/apache/jsp' // include the pre-compiled JSPs
5454
from ('src/main/manifests/bb-manifest-unresolved.xml'){ // set the B2 version and place in the war
5555
filter{ it.replaceAll('@VERSION@', buildingBlockVersion)}
5656
rename { String fileName ->
5757
fileName.replace("-unresolved", "")
5858
}
5959
into("WEB-INF")
6060
}
61-
exclude('org/**') // Clear out the jasper build
62-
exclude('WEB-INF/org/**') // Clear out the jasper build
61+
from ('src/main/java/icons.xml') {
62+
into("WEB-INF/classes")
63+
}
6364
}
6465

6566
tomcat {
@@ -68,24 +69,63 @@ allprojects {
6869
outputDir = file("build/jsps")
6970
}
7071
}
72+
}
7173

72-
task cleanAndRebuild() {
74+
project(':oeqAuditB2') {
75+
dependencies {
76+
compile project(':oeqCommon')
77+
}
78+
79+
task buildB2() {
7380
group 'oEQ'
74-
description 'Cleans the build, precompiles the JSPs, and packages the WAR file'
75-
dependsOn clean
81+
description 'Precompiles the JSPs, compiles the source, and packages the building block as a WAR'
7682
dependsOn tomcatJasper
7783
dependsOn war
7884
}
7985
}
80-
81-
project(':oeqAudit') {
86+
87+
project(':oeqPrimaryB2') {
8288
dependencies {
8389
compile project(':oeqCommon')
8490
}
91+
92+
task buildB2() {
93+
group 'oEQ'
94+
description 'Precompiles the JSPs, compiles the source, and packages the building block as a WAR'
95+
dependsOn tomcatJasper
96+
dependsOn war
97+
}
8598
}
86-
87-
project(':oeqPrimary') {
99+
100+
project(':oeqPrimaryWS') {
88101
dependencies {
89102
compile project(':oeqCommon')
90103
}
104+
105+
task generateJavadoc(type: Javadoc) {
106+
source = sourceSets.main.allJava
107+
}
108+
109+
task zipJavadoc(type: Zip, dependsOn: generateJavadoc) {
110+
archiveName 'documentation.zip'
111+
destinationDir buildDir
112+
from ("${buildDir}/docs/javadoc") {
113+
into 'documentation'
114+
}
115+
}
116+
117+
task buildWS(type: Jar) {
118+
dependsOn classes
119+
dependsOn zipJavadoc
120+
group 'oEQ'
121+
description 'Compiles the source and packages the web service as a JAR'
122+
baseName = 'oeq-blackboard-primary-ws'
123+
with jar
124+
from (project(':oeqCommon').sourceSets.main.output) // Include the common classes as well.
125+
from ('src/main/manifests/bb-manifest.xml'){ // set the B2 version and place in the war
126+
into("META-INF")
127+
}
128+
from ('src/main/java/icons.xml')
129+
from ("${buildDir}/documentation.zip")
130+
}
91131
}

gradle.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ jstlVersion=1.2
66
jspApiVersion=2.3.3
77
servletApiVersion=4.0.1
88
junitVersion=4.12
9-
# All building blocks are re-versioned when this changes.
10-
buildingBlockVersion=1.0.0-SNAPSHOT
9+
# All building blocks / web services are re-versioned when this changes.
10+
artifactVersion=1.0.1-SNAPSHOT
File renamed without changes.
File renamed without changes.

oeqAudit/.project oeqAuditB2/.project

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>oeqAudit</name>
3+
<name>oeqAuditB2</name>
44
<comment>Project oeqAudit created by Buildship.</comment>
55
<projects>
66
</projects>
File renamed without changes.

oeqPrimary/.classpath

-9
This file was deleted.

0 commit comments

Comments
 (0)