Closed kodecharlie closed 5 years ago
Circle-CI fails here:
#!/bin/bash -eo pipefail
cd ~/bax; ant clean junit check pkg pkgAPI
Picked up _JAVA_OPTIONS: -Xms512m -Xmx3072m
Buildfile: /home/circleci/bax/build.xml
clean:
[delete] Deleting directory /home/circleci/bax/bin
[delete] Deleting directory /home/circleci/bax/pkg
check:
[bax_checkstyle] Running Checkstyle 8.4 on 45 files
init:
[mkdir] Created dir: /home/circleci/bax/bin
[mkdir] Created dir: /home/circleci/bax/pkg
build:
build-jdk11:
build-jdk1.8:
[copy] Copying 1 file to /home/circleci/bax/bin
test-compile:
[mkdir] Created dir: /home/circleci/bax/build/test
test-compile-jdk11:
test-compile-jdk1.8:
[copy] Copying 13 files to /home/circleci/bax/build/test
junit:
[junit] Running com.cdd.bao.axioms.ScanAxiomsTest
[junit] Testsuite: com.cdd.bao.axioms.ScanAxiomsTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
[junit]
[junit] Null Test: Caused an ERROR
[junit] com.cdd.bao.axioms.ScanAxiomsTest
[junit] java.lang.ClassNotFoundException: com.cdd.bao.axioms.ScanAxiomsTest
[junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[junit] at java.lang.Class.forName0(Native Method)
[junit] at java.lang.Class.forName(Class.java:348)
[junit]
[junit]
BUILD FAILED
/home/circleci/bax/build.xml:205: Test com.cdd.bao.axioms.ScanAxiomsTest failed
I guess the failure is linked to the missing properties file.
Can you add two property files to the PR so that we can either compile for JDK8 or JDK11? Ideally, you could also extend the circleci config file (https://github.com/cdd/bioassay-template/blob/master/.circleci/config.yml) to prepare jar files for both targets.
CircleCI allows to rerun with the possibility to ssh into the build machine. That helps to work on the config file.
If we have a single build.properties
in the repo, can you programmatically change one of the properties declared therein from CircleCI ?
What about having the following files:
the build.xml has a property with the value build.properties. The property value is used to load the actual property file. If a build is required for a different environment, the value can be overwritten using a -D argument.
Would it work to add the javafx library to the lib path?
Maybe it's time to consider using a package manager like maven to handle our dependencies.
(1) I tried that separately and everything worked, except launching from Eclipse (2) I'll paraphrase Larry Wall on this one: I'm totally OK with switching to Maven, as long as it's after I'm dead.
Regarding the launch from Eclipse: after I installed JDK 11, I had to change eclipse.ini
to coerce Eclipse JVM explicitly to launch with JVM 1.8. In my case (OSX), the file was in /Applications/Eclipse.app/Contents/Eclipse/eclipse.ini
, and the change is shown below in the line following -vm
:
-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.551.v20171108-1834
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
This is a 1st draft of how we will resolve compilation for either Java 1.8 or Java 11. Changes to
build.xml
assume the existence ofbuild.properties
. Latter file has these contents on my setup:If we approve these changes, then we will need to install the JFX module for Java 11 on the server responsible for building / testing WIP-PRs; I am using the JFX module from
openjfx.io
, which is available here (yes, it's downloaded from a different domain). As well, we will need to create saidbuild.properties
for that environment; it must reside in the same place asbuild.xml
.I am now testing this approach for Java 11 builds within a more recent snapshot for Eclipse that supports Java 11.