Skip to content

Commit

Permalink
#1 - Dep mgmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeach47 committed Sep 21, 2018
1 parent 3f80c09 commit 42c5596
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 35 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ TODO

## Building the gbFixer building block
TODO

## Check (and fix) dependency issues
```
~$ ./gradlew generateGradleLintReport
~$ ./gradlew fixGradleLint
```
52 changes: 36 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,41 @@ buildscript {
}
}

plugins {
id 'nebula.lint' version '9.3.2'
}



allprojects {
apply plugin: "java"
apply plugin: "war"
apply plugin: "com.bmuschko.tomcat"
group = 'org.apereo.openequella.integration.blackboard'
version = artifactVersion
apply plugin: 'nebula.lint'

repositories {
mavenCentral()
maven {
url "https://maven.blackboard.com/content/repositories/releases/"
}
maven {
url "https://maven.blackboard.com/content/repositories/releases/"
}

}

group = 'org.apereo.openequella.integration.blackboard'
version = artifactVersion

gradleLint.rules = ['all-dependency', 'dependency-parentheses', 'duplicate-dependency-class']

dependencies {
providedCompile( "blackboard.platform:bb-platform:${bbLearnVersion}" ) { transitive = false }
providedCompile( "blackboard.platform:bb-cms-admin:${bbLearnVersion}" ) { transitive = false }
compile("javax.servlet:javax.servlet-api:${servletApiVersion}");
compile("javax.servlet.jsp:javax.servlet.jsp-api:${jspApiVersion}");
providedCompile "javax.servlet:javax.servlet-api:${servletApiVersion}";
providedCompile "javax.servlet.jsp:javax.servlet.jsp-api:${jspApiVersion}";
compile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
compile group: 'log4j', name: 'log4j', version: '1.2.17'
compile group: 'log4j', name: 'log4j', version: '1.2.17'
compile group: 'org.apache.cxf', name: 'cxf-bundle', version: '2.7.18'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.6'
compile group: 'org.apache.struts', name: 'struts-taglib', version: '1.3.10'


// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:23.0'
Expand All @@ -47,12 +58,23 @@ allprojects {
"blackboard.platform:bb-taglibs:${bbLearnVersion}",
"blackboard.platform:bb-platform:${bbLearnVersion}",
"javax.servlet:jstl:${jstlVersion}"
}
}

war {
task buildWar (type: War, dependsOn: tomcatJasper) {
// Due to the tomcat embed and other deps being hardset on the classpath,
// we need to remove the unneeded ones. This is not as clean as hoped,
// but keeps out unwanted jars from the war.
classpath = classpath.filter { file ->
(
!file.name.startsWith('jetty-') &&
!file.name.startsWith('geronimo-') &&
!file.name.startsWith('spring-')
)
}

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)}
filter{ it.replaceAll('@VERSION@', artifactVersion)}
rename { String fileName ->
fileName.replace("-unresolved", "")
}
Expand All @@ -79,8 +101,7 @@ project(':oeqAuditB2') {
task buildB2() {
group 'oEQ'
description 'Precompiles the JSPs, compiles the source, and packages the building block as a WAR'
dependsOn tomcatJasper
dependsOn war
dependsOn buildWar
}
}

Expand All @@ -92,8 +113,7 @@ project(':oeqPrimaryB2') {
task buildB2() {
group 'oEQ'
description 'Precompiles the JSPs, compiles the source, and packages the building block as a WAR'
dependsOn tomcatJasper
dependsOn war
dependsOn buildWar
}
}

Expand Down
19 changes: 0 additions & 19 deletions oeqPrimaryB2/src/main/manifests/bb-manifest-webservice.xml

This file was deleted.

0 comments on commit 42c5596

Please sign in to comment.