MetroCS / QualityToolsForBlueJ

BlueJ extension to integrate quality assessment tools
GNU Lesser General Public License v3.0
0 stars 42 forks source link

[BUG] Gradle build of jar file under JDK 12 fails to load in BlueJ #136

Closed jody closed 4 years ago

jody commented 4 years ago

Describe the bug A clear and concise description of the defect.

To Reproduce Steps to reproduce the behavior:

  1. Build the product jar file using gradlew build
  2. Copy the product jar to BlueJ extensions folder
  3. Start BlueJ
  4. Open Help > Installed Extensions
  5. Product extension is not shown

Expected behavior Following "to reproduce" steps 1-4 should show the product as an installed extension.

Environment Configuration (please complete the following information):

Additional context

holsappled commented 4 years ago

I am currently working with OS: [macOS Catalina Version 10.15.1] IDE [BlueJ 4.2.2]

I downloaded multiple JDKs to test what version will display the Help > Installed Extensions with a properly built QualityToolsForBlueJ.jar.

The only JDK that properly built the QualityToolsForBlueJ.jar was JDK:[Oracle 11.0.5]

FAILED: JDK[Oracle 13.0.1] (No error, did not display in Help > Installed Extensions) FAILED: JDK[Oracle 12.0.2] (No error, did not display in Help > Installed Extensions) PASS: JDK[Oracle 11.0.5] (Properly displayed Help > Installed Extensions) FAILED: JDK[Oracle 10.0.2] (Error Message, build failed at compile) FAILED: JDK[Oracle 9.0.1] (Error Message, build failed at compile)

jody commented 4 years ago

I am currently working with OS: [macOS Catalina Version 10.15.1] IDE [BlueJ 4.2.2]

I downloaded multiple JDKs to test what version will display the Help > Installed Extensions with a properly built QualityToolsForBlueJ.jar.

The only JDK that properly built the QualityToolsForBlueJ.jar was JDK:[Oracle 11.0.5]

FAILED: JDK[Oracle 13.0.1] (No error, did not display in Help > Installed Extensions) FAILED: JDK[Oracle 12.0.2] (No error, did not display in Help > Installed Extensions) PASS: JDK[Oracle 11.0.5] (Properly displayed Help > Installed Extensions) FAILED: JDK[Oracle 10.0.2] (Error Message, build failed at compile) FAILED: JDK[Oracle 9.0.1] (Error Message, build failed at compile)

Great data, thanks!

I'm assuming these are all as built via Gradle. Any attempts at doing command-line builds using the native javac and jar tools?

holsappled commented 4 years ago

My testing procedure was through the terminal

export JAVA_HOME=/usr/libexec/java_home -v XX.X //I would change this for each iteration of the different JDKs

./gradlew clean ./gradlew build

//Then I would take the QualityToolsForBlueJ.jar and place it in the extensions folder. and open BlueJ //application.

attempts using the native javac and jar tools

No attempts using native javac and jar tools yet.

jody commented 4 years ago

It sounds like we need to document the nature of JDK dependencies with respect to BlueJ (the application) and bluejext.jar (the BlueJ extensions library).

jody commented 4 years ago

Can this be addressed by using the "--release 11" flag for the compilation step of the build?

holsappled commented 4 years ago

It sounds like we need to document the nature of JDK dependencies with respect to BlueJ (the application) and bluejext.jar (the BlueJ extensions library).

I agree I think documentation that includes this along with how to properly build the project with the proper JDK would be useful to many people.

jody commented 4 years ago

Can this be addressed by using the "--release 11" flag for the compilation step of the build? As a convenience that allows developers to use later versions of the JDK (12+), will add a simple options.compilerArgs to pass the release flag so javac generates class files compatible with JDK 11.

jody commented 4 years ago

I believe the specific concern of this story is now addressed.

Please test and verify that product now builds usable extension jar under JDK 12 and later.

However, the more general concern of identifying (and potentially automating) the compatibility of builds of the extension with bluejext.jar and BlueJ remains. An appropriate User Story should be opened.

holsappled commented 4 years ago

"--release 11" flag was successful.

See results that JDK 12 and 13 passed

Currently working with

OS: [macOS Catalina Version 10.15.1] IDE [BlueJ 4.2.2]

Testing procedure was through the terminal

export JAVA_HOME=/usr/libexec/java_home -v XX.X //I would change this for each JDK

./gradlew clean ./gradlew build

Results


PASS: JDK[Oracle 13.0.1] (Properly displayed Help > Installed Extensions) PASS: JDK[Oracle 12.0.2] (Properly displayed Help > Installed Extensions) PASS: JDK[Oracle 11.0.5] (Properly displayed Help > Installed Extensions) FAILED: JDK[Oracle 10.0.2] (Error Message, build failed at compile) FAILED: JDK[Oracle 9.0.1] (Error Message, build failed at compile)

jody commented 4 years ago

TYVM! Closing this issue. Superseded by UserStory #147