jide-oss icon indicating copy to clipboard operation
jide-oss copied to clipboard

3.7.x broken builds and releases

Open sfuerte opened this issue 4 years ago • 12 comments

it looks like there is a problem with 3.7.x release builds in general.

If I use 3.7.6.jar downloaded from here, then I'd get the following NCF error in an app:

java.lang.NoClassDefFoundError: com/sun/java/swing/plaf/windows/WindowsLookAndFeel
	at com.jidesoft.plaf.LookAndFeelFactory.installJideExtension(LookAndFeelFactory.java:848)
	at com.jidesoft.plaf.LookAndFeelFactory.installJideExtension(LookAndFeelFactory.java:633)
	at com.jidesoft.plaf.LookAndFeelFactory.installJideExtension(LookAndFeelFactory.java:598)
	at com.jidesoft.swing.JideSplitButton.updateUI(JideSplitButton.java:109)
	at java.desktop/javax.swing.JMenuItem.init(JMenuItem.java:208)
	at java.desktop/javax.swing.JMenuItem.<init>(JMenuItem.java:147)
	at java.desktop/javax.swing.JMenuItem.<init>(JMenuItem.java:124)
	at java.desktop/javax.swing.JMenu.<init>(JMenu.java:161)
	at java.desktop/javax.swing.JMenu.<init>(JMenu.java:151)
	at com.jidesoft.swing.JideMenu.<init>(JideMenu.java:59)
	at com.jidesoft.swing.JideSplitButton.<init>(JideSplitButton.java:44)

It's getting more interesting when one starts to compare releases and their sizes, for example:

jide-oss-3.6.14.jar - 1.57Mb
jide-oss-3.7.6.jar - 178k

and for 3.7.6 it's pretty much doesn't matter where I take it from: Github (https://github.com/jidesoft/jide-oss/releases/tag/3.7.6), Jitpack.io (https://jitpack.io/#jidesoft/jide-oss) or build locally (with Maven).

On Jitpack, click "look up", it'll show you different versions, snapshots and their build logs. Most/all of them are failing.

On my local machine, when I was trying to compile it with Maven (mvn -f pom_compile.xml clean compile package), it wouldn't copy actual classes at all but rather some minor artefacts. If I try it with modified Ant build then it'll produce bunch of Windows related errors:

jide-oss/src/com/jidesoft/plaf/vsnet/VsnetWindowsProgressBarUI.java:25: error: cannot find symbol
    [javac] public class VsnetWindowsProgressBarUI extends WindowsProgressBarUI implements ActionListener
....
    [javac] 100 errors
    [javac] 30 warnings

changes to Ant build:

diff --git a/build.properties b/build.properties
index f6c53b2c..a425aaf3 100644
--- a/build.properties
+++ b/build.properties
@@ -23,5 +23,5 @@ deprecation=off
 stacksize=64m
 initheapsize=128m
 maxheapsize=512m
-source=1.5
-target=1.5
+source=9^M
+target=9^M
diff --git a/build.xml b/build.xml
index 2ca9544e..cd326ea7 100644
--- a/build.xml
+++ b/build.xml
@@ -53,6 +53,7 @@
                fork="yes" memoryInitialSize="${initheapsize}" memoryMaximumSize="${maxheapsize}" verbose="no"
                debug="${debug}" deprecation="${deprecation}">
             <classpath refid="standard_classpath"/>
+            <compilerarg line="--add-exports java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED --add-exports java.desktop/javax.swing.plaf.synth=ALL-UNNAMED --add-exports java.desktop/sun.swing=ALL-UNNAMED --add-exports java.desktop/sun.awt=ALL-UNNAMED --add-exports java.desktop/sun.awt.image=ALL-UNNAMED --add-exports java.desktop/sun.awt.shell=ALL-UNNAMED --add-exports java.desktop/sun.awt.dnd=ALL-UNNAMED --add-exports java.desktop/sun.awt.windows=ALL-UNNAMED --add-exports java.base/sun.security.action=ALL-UNNAMED" />^M
         </javac>
         <copy todir="${output_dir}">
             <fileset dir="${src_dir}" includes="**/*.gif,**/*.jpg,**/*.png,**/*.properties,**/*.ttf,**/*.vm"/>

Potentially builds on Windows OS are fine but Unix/Linux-based shall be reviewed.

My JDK & OS versions:

> java -version
openjdk version "11.0.9.1" 2020-11-04 LTS
OpenJDK Runtime Environment Zulu11.43+1007-CA (build 11.0.9.1+1-LTS)
OpenJDK 64-Bit Server VM Zulu11.43+1007-CA (build 11.0.9.1+1-LTS, mixed mode)

> sw_vers
ProductName:	macOS
ProductVersion:	11.0.1

PS: potentially relates to https://github.com/jidesoft/jide-oss/issues/30

sfuerte avatar Dec 01 '20 03:12 sfuerte

@sfuerte

Potentially builds on Windows OS are fine

So, do you mean that the win build is good ?

mokun avatar Dec 01 '20 16:12 mokun

@mokun , potentially, I haven't tested there. But even assuming the win build is good, copying a built JAR to any Linux/Unix/macOS platform will be useless. Will end up with the com/sun/java/swing/plaf/windows/WindowsLookAndFeel NCF error there.

Technically, the code isn't platform independent and can be build/run on Windows only with JDK 11+.

sfuerte avatar Dec 01 '20 17:12 sfuerte

@sfuerte

hmmm I pointed about a similar error in this issue here when using jide in my linux box.

Thought it was resolved but you never know, since the maven package never got updated.

I might be wrong but it doesn't seem to be too difficult to resolve this.

Can someone look into this ?

mokun avatar Dec 01 '20 18:12 mokun

@sfuerte please use the library source code instead of the jar. We don't release jars anymore. The latest version is 3.7.10 which already fixed the NCFE.

jidesoft avatar Dec 01 '20 21:12 jidesoft

@jidesoft when I was posting about Maven/Ant compilation errors, that was on macOS 11 under JDK 11:

jide-oss> git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   build.properties
	modified:   build.xml
	modified:   pom_compile.xml

no changes added to commit (use "git add" and/or "git commit -a")

and the diff is already at the top of the ticket.

When trying Ant build on master branch (3.7.10?), then it won't even start on JDK 11:

jide-oss> git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean


~/projects/opensource/muCommander/jide-oss> ant
Buildfile: /Users/.../jide-oss/build.xml

init:
     [echo] Ant Version: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
     [echo] Ant Home: /opt/homebrew/Cellar/ant/1.10.9/libexec
     [echo] --------------------------------
     [echo] Java Vendor: Azul Systems, Inc.
     [echo] Java Version: 11.0.9.1
     [echo] Java Home: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
     [echo] Java initial heap size: 128m
     [echo] Java max heap size: 512m
     [echo] Debug: off
     [echo] Deprecation: off.
     [echo] --------------------------------
     [echo] User Name: ...
     [echo] User Home: /Users/...
     [echo] Current Dir: /Users/.../jide-oss
     [echo] --------------------------------
     [echo] Base Dir: /Users/.../jide-oss
     [echo] Output Dir: /Users/.../jide-oss/classes
     [echo] JavaDoc Dir: /Users/.../jide-oss/javadoc
     [echo] Source list: /Users/.../jide-oss/src

compile:
   [delete] Deleting directory /Users/.../jide-oss/classes
    [mkdir] Created dir: /Users/.../jide-oss/classes
    [javac] /Users/.../jide-oss/build.xml:54: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 503 source files to /Users/.../jide-oss/classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 5
    [javac] error: Source option 5 is no longer supported. Use 6 or later.
    [javac] error: Target option 1.5 is no longer supported. Use 1.6 or later.

BUILD FAILED
/Users/.../jide-oss/build.xml:54: Compile failed; see the compiler error output for details.

Total time: 0 seconds

sfuerte avatar Dec 02 '20 02:12 sfuerte

I'm really not too sure what's happening here. Either way. Currently, the latest provided jar by jidesoft is version 3.7.6 and the current state of the code fails to build for me using maven. And clearly not just me.

The library version 3.7.6 has this issue with the NoClassDefFound and windows LAF that makes my application crash on multiple linux distros when running java version 9 and above. The issue is also mentioned in issue #37 that is linked in some other projects as well. The issue is however fixed. Just not in 3.7.6.

I have managed to build the current version 3.7.11 into a library jar by importing the project into eclipse and merging some of the files from other src directories into a single one and exporting that as a jar.

Here is a link to the functional library (built using Java 8): https://mega.nz/file/JckwwLyY#OZC5KVEN33N0c4Vl02DeLt2vCSfJ6EVeDa6YSBFrCZY

I hope I am not violating any licenses. I'm posting this just so people don't have to go through the headache of trying to figure this out again. Hopefully, jidesoft will fix their build system or address why it's not working for us.

Thanks for the library though ❤️

xDUDSSx avatar Feb 26 '21 18:02 xDUDSSx

I've built and published latest jide-oss version to Maven Central: https://search.maven.org/artifact/com.formdev/jide-oss

<dependency>
  <groupId>com.formdev</groupId>
  <artifactId>jide-oss</artifactId>
  <version>3.7.11.1</version>
</dependency>

This was built on GitHub Actions using Gradle. Project is here: https://github.com/JFormDesigner/jide-oss

DevCharly avatar Mar 21 '21 18:03 DevCharly

@DevCharly ,

Thanks for your contribution.

Jidesoft has just released 3.7.12 on June 1, 2021.

Do you updating your maven build to 3.7.12 so as to give the OSS community a helping hand again !

mokun avatar Jun 28 '21 18:06 mokun

@mokun 3.7.12 is now available on maven central 😄

DevCharly avatar Jun 29 '21 20:06 DevCharly

I just found out Jidesoft released 3.7.13 on early this year on that very special day of February 22, 2022, in that a lot of people get married 😄

@DevCharly , can you by any chance update that for the OSS community ? Thanks !

mokun avatar Jul 25 '22 21:07 mokun

@DevCharly

They released 3.7.14 since 25 Aug 2023.

Will you by any chance be able to update yours to 3.7.14 as well as another contribution to the OSS community ?

Much Appreciated !

mokun avatar Oct 20 '23 20:10 mokun

@mokun thanks for the reminder 3.7.14 is now available on maven central 😄 https://repo1.maven.org/maven2/com/formdev/jide-oss/3.7.14/

DevCharly avatar Oct 21 '23 17:10 DevCharly