Skip to content

Commit

Permalink
#1 - Artifact file structure on par with original builds; web service…
Browse files Browse the repository at this point in the history
… now builds
  • Loading branch information
cbeach47 committed Sep 20, 2018
1 parent 3416e7a commit 155a851
Show file tree
Hide file tree
Showing 81 changed files with 834 additions and 442 deletions.
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
# EQUELLA Blackboard Integration

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

Versions are repo-wide (ie all building blocks will have the same version for a given build). Versioning will be loosely tied to SemVer.
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.

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

## Building the primary building block
```
~$ ./gradlew :oeqPrimary:cleanAndRebuild
~$ ./gradlew :oeqPrimaryB2:clean
~$ ./gradlew :oeqPrimaryB2:buildB2
```
The war is placed in (cloned repo)/oeqPrimary/build/libs/
The war is placed in (cloned repo)/oeqPrimaryB2/build/libs/

## Building the primary web service
```
~$ ./gradlew :oeqPrimaryWS:clean
~$ ./gradlew :oeqPrimaryWS:buildWs
```
The jar is placed in (cloned repo)/oeqPrimaryWS/build/libs/

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

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

```
~$ ./gradlew :oeqAudit:cleanAndRebuild
~$ ./gradlew :oeqAuditB2:clean
~$ ./gradlew :oeqAuditB2:buildB2
```
The war is placed in (cloned repo)/oeqAudit/build/libs/
The war is placed in (cloned repo)/oeqAuditB2/build/libs/

## Building the linkFixer building block
TODO
Expand Down
152 changes: 1 addition & 151 deletions build-oldBb9.1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<project name="Blackboard 9 Building Block SP11+" default="make" basedir=".">

<property name="build" location="public_html/WEB-INF/classes" />
<import file="../../../common-build.xml" />


<property name="warname" value="equella-bb91.war" />
<property name="websrc" location="public_html" />
<property name="lib" location="public_html/WEB-INF/lib" />
Expand All @@ -29,110 +28,9 @@

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

<target name="clean" depends="common.clean">
<delete dir="${wsbuild}"/>
</target>

<target name="init" depends="common.init">
<mkdir dir="${wsbuild}"/>
<mkdir dir="${wsstaging}" />
<mkdir dir="${bbstaging}" />
</target>

<target name="compile" depends="generate-source,define-build.classpath, wscompile,bbcompile" if="src.enabled">
</target>

<target name="bbcompile">
<javac srcdir="${src}" destdir="${build}" classpathref="build.classpath"
nowarn="${javac.nowarn}"
debug="${javac.debug}"
debuglevel="${javac.debuglevel}"
optimize="${javac.optimize}"
target="1.7"
source="1.7"
deprecation="off"
verbose="${javac.verbose}"
depend="${javac.depend}"
includeantruntime="false">

<include name="com/tle/blackboard/common/**" />
<include name="com/tle/blackboard/buildingblock/**" />
<include name="com/tle/web/remoting/soap/**" />
</javac>
<copy file="${src}/icons.xml" todir="${build}"/>
</target>

<target name="wscompile" depends="init">
<javac srcdir="${src}" destdir="${wsbuild}" classpathref="wsclasspath"
nowarn="${javac.nowarn}"
debug="${javac.debug}"
debuglevel="${javac.debuglevel}"
optimize="${javac.optimize}"
target="1.7"
source="1.7"
deprecation="off"
verbose="${javac.verbose}"
depend="${javac.depend}"
includeantruntime="false">

<include name="com/tle/blackboard/webservice/**" />
<include name="com/tle/blackboard/common/**" />
</javac>
<copy file="${src}/icons.xml" todir="${wsbuild}"/>
</target>

<target name="wsjavadoc" depends="compile">
<delete dir="${staging}/doctemp" />
<echo>Making temp copy of source...</echo>
<copy todir="${staging}/doctemp">
<fileset dir="src"
includes="**/*.java"/>
<fileset dir="src">
<include name="**/*.html"/>
</fileset>
</copy>

<javadoc sourcepath="${staging}/doctemp"
failonerror="true"
author="false"
version="true"
use="true"
destdir="${wsdocstaging}"
additionalparam="-breakiterator"
packagenames="com.tle.blackboard.webservice.*"
classpathref="wsclasspath" />

<jar jarfile="${wsdocstaging}/${wsdoczipname}">
<manifest>
<attribute name="Version" value="1.0"/>
</manifest>
<fileset dir="${wsdocstaging}" includes="**"/>
</jar>

<delete dir="${staging}/doctemp" />
</target>

<target name="make" depends="common.make, wsjavadoc">
<property file="${build}/version.properties" />

<!-- copy public_html to a staging folder -->
<copy todir="${bbstaging}">
<fileset dir="${websrc}" />
</copy>
<copy file="bb-manifest-unresolved.xml" tofile="${bbstaging}/WEB-INF/bb-manifest.xml" overwrite="true">
<filterchain>
<tokenfilter>
<replacestring from="@VERSION@" to="${version.mm}" />
</tokenfilter>
</filterchain>
</copy>

<copy file="bb-manifest-webservice.xml" toFile="${wsstaging}/META-INF/bb-manifest.xml" overwrite="true" />

<copy todir="${wsstaging}">
<fileset dir="${wsbuild}" includes="**" />
</copy>

<taskdef resource="proguard/ant/task.properties" classpathref="customtasks.classpath" />

<path id="proguard.libraryjars">
Expand Down Expand Up @@ -216,53 +114,5 @@
</fileset>
</jar>

<!-- TODO: REINSTATE this when BB fix their "web service in a building block" issue
https://behind.blackboard.com/s/sysadminas/support/casedetails.aspx?caseid=872696
Also update the bb-manifest-unresolved.xml to add back the webservice -->
<!-- copy jar to Building Block staging root ... -->

<copy todir="${bbstaging}">
<fileset dir="${wsstaging}">
<include name="${wsjarname}" />
</fileset>
</copy>

</target>

<target name="product" depends="common.product">
<war destfile="${product}/${warname}" webxml="${bbstaging}/WEB-INF/web.xml" basedir="${bbstaging}">
<lib dir="${External Dependencies.base}">
<include name="log4j*.jar" />
<include name="guava*.jar" />
<include name="commons-beanutils*.jar" />
<include name="commons-codec*.jar" />
<include name="commons-discovery*.jar" />
<include name="commons-httpclient*.jar" />
<include name="jackson-core-*.jar" />
<include name="jackson-databind-*.jar" />
<include name="slf4j-api-*.jar" />
<include name="struts-core*.jar" />
<include name="struts-taglib*.jar" />

<include name="cxf-bundle-*.jar" />
<include name="neethi-*.jar" />
<include name="xmlschema-core-*.jar" />
<include name="woodstox-core-asl-*.jar" />
<include name="stax2-api-*.jar" />
<include name="stax-api-1.0-2.jar" />
<include name="xalan-*.jar" />
<!--
<include name="xfire-aegis-*.jar" />-->
</lib>
</war>

<!-- TODO: REMOVE this when BB fix their "web service in a building block" issue
https://behind.blackboard.com/s/sysadminas/support/casedetails.aspx?caseid=872696
Also update the bb-manifest-unresolved.xml to add back the webservice -->
<copy todir="${product}">
<fileset dir="${wsstaging}">
<include name="${wsjarname}" />
</fileset>
</copy>
</target>
</project>
64 changes: 52 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Needed for pre-compiling the JSPs
buildscript {
repositories {
jcenter()
}

dependencies {
// Needed for pre-compiling the JSPs
classpath "com.bmuschko:gradle-tomcat-plugin:${gradleTomcatPluginVersion}"
}
}
Expand All @@ -14,7 +14,7 @@ allprojects {
apply plugin: "war"
apply plugin: "com.bmuschko.tomcat"
group = 'org.apereo.openequella.integration.blackboard'
version = buildingBlockVersion
version = artifactVersion
repositories {
mavenCentral()
maven {
Expand Down Expand Up @@ -50,16 +50,17 @@ allprojects {
}

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

tomcat {
Expand All @@ -68,24 +69,63 @@ allprojects {
outputDir = file("build/jsps")
}
}
}

task cleanAndRebuild() {
project(':oeqAuditB2') {
dependencies {
compile project(':oeqCommon')
}

task buildB2() {
group 'oEQ'
description 'Cleans the build, precompiles the JSPs, and packages the WAR file'
dependsOn clean
description 'Precompiles the JSPs, compiles the source, and packages the building block as a WAR'
dependsOn tomcatJasper
dependsOn war
}
}

project(':oeqAudit') {
project(':oeqPrimaryB2') {
dependencies {
compile project(':oeqCommon')
}

task buildB2() {
group 'oEQ'
description 'Precompiles the JSPs, compiles the source, and packages the building block as a WAR'
dependsOn tomcatJasper
dependsOn war
}
}
project(':oeqPrimary') {

project(':oeqPrimaryWS') {
dependencies {
compile project(':oeqCommon')
}

task generateJavadoc(type: Javadoc) {
source = sourceSets.main.allJava
}

task zipJavadoc(type: Zip, dependsOn: generateJavadoc) {
archiveName 'documentation.zip'
destinationDir buildDir
from ("${buildDir}/docs/javadoc") {
into 'documentation'
}
}

task buildWS(type: Jar) {
dependsOn classes
dependsOn zipJavadoc
group 'oEQ'
description 'Compiles the source and packages the web service as a JAR'
baseName = 'oeq-blackboard-primary-ws'
with jar
from (project(':oeqCommon').sourceSets.main.output) // Include the common classes as well.
from ('src/main/manifests/bb-manifest.xml'){ // set the B2 version and place in the war
into("META-INF")
}
from ('src/main/java/icons.xml')
from ("${buildDir}/documentation.zip")
}
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ jstlVersion=1.2
jspApiVersion=2.3.3
servletApiVersion=4.0.1
junitVersion=4.12
# All building blocks are re-versioned when this changes.
buildingBlockVersion=1.0.0-SNAPSHOT
# All building blocks / web services are re-versioned when this changes.
artifactVersion=1.0.1-SNAPSHOT
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion oeqAudit/.project → oeqAuditB2/.project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>oeqAudit</name>
<name>oeqAuditB2</name>
<comment>Project oeqAudit created by Buildship.</comment>
<projects>
</projects>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 0 additions & 9 deletions oeqPrimary/.classpath

This file was deleted.

Loading

0 comments on commit 155a851

Please sign in to comment.