Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Java 10 Support #1007

Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2b7c956
build(gradle): set source compatibility to Java 9
ChristianMurphy Sep 17, 2017
3692260
ci(travis): add Oracle Java 9 to Linux build matrix
ChristianMurphy Sep 17, 2017
373e673
fixed some java 9 issues with dependencies
JoshBrudnak Nov 13, 2017
7b8604e
Merge pull request #4 from JoshBrudnak/feature/support-java-9
ChristianMurphy Nov 13, 2017
2590ba1
ci: update AppVeyor to test with Java 9
ChristianMurphy Nov 13, 2017
19aa8e8
Builds with java 9
JoshBrudnak Nov 15, 2017
1ce0494
fixed java 9 module include issues
JoshBrudnak Nov 27, 2017
70dbee1
Merge branch 'master' into feature/support-java-9
ChristianMurphy Dec 12, 2017
619afd1
build(uPortal-webapp): correct JAXB usage to work on Java 9
ChristianMurphy Dec 12, 2017
7594d05
Merge branch 'master' into feature/support-java-9
ChristianMurphy Dec 19, 2017
aa75e06
Revert "build(uPortal-webapp): correct JAXB usage to work on Java 9"
ChristianMurphy Dec 19, 2017
5917af7
build(uPortal-webapp): correct JAXB for java 9
JoshBrudnak Dec 19, 2017
eed5eec
Merge pull request #5 from JoshBrudnak/feature/support-java-9
ChristianMurphy Dec 19, 2017
009e950
Merge branch 'master' of https://github.com/Jasig/uPortal into featur…
ChristianMurphy Jan 15, 2018
04c63b0
Merge branch 'master' into feature/support-java-9
ChristianMurphy Jan 20, 2018
e6ccb11
Merge branch 'master' into feature/support-java-9
ChristianMurphy Jan 29, 2018
f71230c
Merge branch 'master' into feature/support-java-9
ChristianMurphy Feb 1, 2018
2f947f8
ci(appveyor): switch to jdk 9 version included by default
ChristianMurphy Feb 1, 2018
b581402
Merge branch 'master' into feature/support-java-9
ChristianMurphy Feb 27, 2018
b33ea4c
fixed issues with jaxb and spring-ldap version
JoshBrudnak Mar 1, 2018
4fa4ad3
Merge pull request #6 from JoshBrudnak/feature/support-java-9
ChristianMurphy Mar 1, 2018
c21db96
Merge branch 'master' into feature/support-java-9
ChristianMurphy Mar 17, 2018
9d53959
build(gradle): set source level to Java 10
ChristianMurphy Mar 21, 2018
4868f54
Merge branch 'master' of into feature/support-java-9
ChristianMurphy Apr 24, 2018
29d56c5
Merge branch 'master' into feature/support-java-9
ChristianMurphy May 24, 2018
cbac644
Merge branch 'master' into feature/support-java-9
ChristianMurphy Jun 22, 2018
4dc2635
Merge branch 'master' into feature/support-java-9
ChristianMurphy Jun 29, 2018
f7ce203
build: use error prone javac plugin
ChristianMurphy Jun 29, 2018
588d571
Merge branch 'master' into feature/support-java-9
ChristianMurphy Jul 21, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ matrix:
dist: trusty
jdk: openjdk8
sudo: required
- os: linux
dist: trusty
group: edge
jdk: oraclejdk9
sudo: required
- os: osx
osx_image: xcode9.1 # OSX 10.12, Oracle Java 8

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ allprojects {
}

// Version has to be set directly here, using a variable does not set Java compatability version
sourceCompatibility = 1.8
sourceCompatibility = 1.9
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Open Question ❓
How do we want to handle Java versions with Semantic Versioning?
Upgrading from Java 8 to Java 9 could be considered breaking change (major), however Java 9 is something that would be valuable to get into the 5.x release line.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thought is would be to set a lower target compatibility allowing this to be added in a feature (minor) release.

sourceCompatibility = 1.9
targetCompatibility = 1.8

Then removing the backwards target in uPortal 6.


gradleLint.criticalRules = [
'overridden-dependency-version',
Expand Down
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# TODO: Change to org.apereo.portal
group=org.jasig.portal
version=5.0.1
version=5.0.1-SNAPSHOT

# Project Metadata (NB: copied from CAS; may or may not be used by us; review later)
projectUrl=https://www.apereo.org/projects/uPortal
Expand All @@ -38,6 +38,7 @@ servletApiDependency=javax.servlet:javax.servlet-api:3.0.1
portletApiDependency=org.apache.portals:portlet-api_2.1.0_spec:1.0

# Dependency Versions
activationVersion:1.0.2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ is activationVersion:1.0.2 intended here or should this be activationVersion=1.0.2?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that was a mistake sorry.

antVersion=1.8.4
awsVersion=1.10.65
apereoPortletUtilsVersion=1.1.0
Expand Down Expand Up @@ -75,8 +76,9 @@ httpcomponentsVersion=4.4.4
jacksonVersion=2.5.3
jansiVersion=1.11
javaxMailVersion=1.4.5
javaxmlVersion=1.3.1
jasyptVersion=1.9.2
jaxb2basicsVersion=0.6.5.1
jaxb2basicsVersion=1.11.1
jgroupsVersion=3.6.13.Final
jjwtVersion=0.6.0
jlineVersion=2.11
Expand Down
14 changes: 13 additions & 1 deletion uPortal-api/uPortal-api-search/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ dependencies {
// All 6 of the following are for the 'com.github.jacobono.jaxb' plugin
jaxb 'com.sun.xml.bind:jaxb-xjc:2.2.7-b41'
jaxb 'com.sun.xml.bind:jaxb-impl:2.2.7-b41'
jaxb 'javax.xml.bind:jaxb-api:2.2.7'
jaxb 'javax.xml.bind:jaxb-api:2.3.0'
jaxb "jaxb:activation:${activationVersion}"
jaxb 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.6.5'
jaxb 'org.jvnet.jaxb2_commons:jaxb2-basics:0.6.4'
jaxb 'org.jvnet.jaxb2_commons:jaxb2-basics-annotate:0.6.4'
Expand Down Expand Up @@ -48,4 +49,15 @@ jaxb {
}
}

compileJava {
doFirst {
options.compilerArgs = [
'--class-path', classpath.asPath,
'--module-path', classpath.asPath,
'--add-modules', 'java.xml.bind',
]
classpath = files()
}
}

compileJava.dependsOn(xjc)
3 changes: 3 additions & 0 deletions uPortal-io/uPortal-io-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ description = "Apereo uPortal Import/Export Core"
dependencies {
compile project(':uPortal-utils:uPortal-utils-core')

compile "javax.xml.bind:jaxb-api:2.3.0"
compile "javax.annotation:javax.annotation-api:${javaxmlVersion}"
compile "commons-lang:commons-lang:${commonsLangVersion}"
compile 'jaxb:activation:1.0.2'
compile "org.apache.commons:commons-compress:${commonsCompressVersion}"
compile "org.apache.tika:tika-core:${tikaVersion}"
compile "org.slf4j:slf4j-api:${slf4jVersion}"
Expand Down
15 changes: 14 additions & 1 deletion uPortal-io/uPortal-io-jaxb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ ext {
}

dependencies {
//jaxb "javax.annotation:javax.annotation-api:${javaxmlVersion}"

// All 6 of the following are for the 'com.github.jacobono.jaxb' plugin
jaxb 'com.sun.xml.bind:jaxb-xjc:2.2.7-b41'
jaxb 'com.sun.xml.bind:jaxb-impl:2.2.7-b41'
jaxb 'javax.xml.bind:jaxb-api:2.2.7'
jaxb "javax.xml.bind:jaxb-api:2.3.0"
jaxb "jaxb:activation:${activationVersion}"
jaxb 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.6.5'
jaxb 'org.jvnet.jaxb2_commons:jaxb2-basics:0.6.4'
jaxb 'org.jvnet.jaxb2_commons:jaxb2-basics-annotate:0.6.4'
Expand Down Expand Up @@ -48,4 +51,14 @@ jaxb {
}
}

compileJava {
doFirst {
options.compilerArgs = [
'--class-path', classpath.asPath,
'--module-path', classpath.asPath,
'--add-modules', 'java.xml.bind',
]
}
}

compileJava.dependsOn(xjc)
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void resetUserLayoutAllProfiles(final IPersonAttributes personAttributes)
/**
* @param personAttributes
* @see
* org.apereo.portal.layout.IUserLayoutHelper#resetUserLayout(org.jasig.services.persondir.IPersonAttributes)
* org.apereo.portal.layout.IUserLayoutHelper#resetUserLayout(org.apereo.services.persondir.IPersonAttributes)
*/
@Override
public void resetUserLayout(final IPersonAttributes personAttributes) {
Expand Down
1 change: 1 addition & 0 deletions uPortal-soffit/uPortal-soffit-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
description = "Apereo uPortal Soffit Core"

dependencies {
compile "javax.annotation:javax.annotation-api:${javaxmlVersion}"
compile "io.jsonwebtoken:jjwt:${jjwtVersion}"
compile "org.apache.commons:commons-lang3:${commonsLang3Version}"
compile "org.jasypt:jasypt:${jasyptVersion}"
Expand Down
12 changes: 12 additions & 0 deletions uPortal-utils/uPortal-utils-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ ext {
dependencies {
compile project(':uPortal-concurrency')

compile "javax.xml.bind:jaxb-api:2.3.0"
compile "javax.annotation:javax.annotation-api:${javaxmlVersion}"
compile "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}"
compile "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
compile "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
Expand Down Expand Up @@ -78,6 +80,9 @@ dependencies {
compileOnly "${servletApiDependency}"
}

sourceCompatibility = '9'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 its interesting that this needed to be set here.
I thought allprojects would have covered this 🤷‍♂️

targetCompatibility = '9'

/*
* This section is the key to IDE integration. IDE will look for source files in both...
*
Expand All @@ -96,6 +101,13 @@ sourceSets {
// These are the only modifications to build process that are required.
compileJava {
doFirst {
options.compilerArgs += [
'--class-path', classpath.asPath,
'--module-path', classpath.asPath,
'--add-modules', 'java.sql',
]
classpath = files()

// Generated sources directory should be present & empty before compilation
generatedSourcesDir.deleteDir()
generatedSourcesDir.mkdirs()
Expand Down
11 changes: 11 additions & 0 deletions uPortal-webapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,14 @@ war {
into '/'
}
}

compileJava {
doFirst {
options.compilerArgs = [
'--class-path', classpath.asPath,
'--module-path', classpath.asPath,
'--add-modules', 'java.xml.bind',
]
//classpath = files()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">

<input name="person" type="org.jasig.services.persondir.IPersonAttributes" required="true" />
<input name="person" type="org.apereo.services.persondir.IPersonAttributes" required="true" />

<view-state id="reset-confirm">
<transition on="confirm" to="reset-result">
<!-- Choose resetUserLayoutAllProfiles if on layout reset, you need
Expand All @@ -33,10 +33,10 @@
</transition>
<transition on="cancel" to="reset-complete"/>
</view-state>

<view-state id="reset-result">
<transition on="continue" to="reset-complete" />
<transition on="continue" to="reset-complete" />
</view-state>

<end-state id="reset-complete"/>
</flow>
</flow>