New to DL4J, I pulled down the entire deeplearning4j-examples for review. Following the basic steps from the tutorials quick-start (Quick Start - Deeplearning4j).
Running on Windows 11, JDK 1.8, Maven 4.0 (latest) environment which seems to meet the requirements listed in the quick start guide.
However during the “mvn clean install”, the build fails with a missing POM error during the downloads (apparently from “sonatype.org”) and subsequent missing jar file as shown per below.
D:\dl4j\deeplearning4j-examples>cd D:\dl4j\deeplearning4j-examples\dl4j-examples
D:\dl4j\deeplearning4j-examples\dl4j-examples>mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------------------< org.deeplearning4j:dl4j-examples >--------------------------------------
[INFO] Building Introduction to DL4J 1.0.0-SNAPSHOT
[INFO] from pom.xml
[INFO] ----------------------------------------------------[ jar ]-----------------------------------------------------
.
.
.
Downloaded from central: https://repo.maven.apache.org/maven2/net/java/jvnet-parent/3/jvnet-parent-3.pom (4.8 kB at 114 kB/s)
Downloading from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/deeplearning4j/resources/1.0.0-SNAPSHOT/maven-metadata.xml
Downloading from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/deeplearning4j/resources/1.0.0-SNAPSHOT/resources-1.0.0-SNAPSHOT.pom
[WARNING] The POM for org.deeplearning4j:resources:jar:1.0.0-SNAPSHOT is missing, no dependency information available
Downloading from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/deeplearning4j/deeplearning4j-ui/1.0.0-SNAPSHOT/maven-metadata.xml
Downloaded from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/deeplearning4j/deeplearning4j-ui/1.0.0-SNAPSHOT/maven-metadata.xml (1.0 kB at 9.2 kB/s)
.
.
.
[INFO] ----------------------------------------------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ----------------------------------------------------------------------------------------------------------------
[INFO] Total time: 01:39 min
[INFO] Finished at: 2023-01-24T09:06:15-08:00
[INFO] ----------------------------------------------------------------------------------------------------------------
[ERROR] Failed to execute goal on project dl4j-examples: Could not resolve dependencies for project org.deeplearning4j:dl4j-examples:jar:1.0.0-SNAPSHOT: Could not find artifact org.deeplearning4j:resources:jar:1.0.0-SNAPSHOT in sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots) -> [Help 1]
Unfortunately the build seems to need a lower version of Maven, or something else to meet the requirements?
mvn clean install
D:\dl4j\deeplearning4j-examples\dl4j-examples>mvn clean install
[INFO] Scanning for projects…
[INFO]
[INFO] -------------------------------------------< org.deeplearning4j:dl4j-examples >-------------------------------------------
[INFO] Building Introduction to DL4J 1.0.0-SNAPSHOT
[INFO] from pom.xml
[INFO] ---------------------------------------------------------[ jar ]----------------------------------------------------------
Perhaps the Quick Start guide should be reworded then. Understandably, it was written some time ago, however as it is, it states " Install or update Maven to the latest release following their instructions for your system.".
Currently, Maven 4.x is the latest, but apparently beyond what the build can handle. Latest 3.x would be more clear.
Also changed my Java to JDK 11 to match the current classes. Another error in the Quick Start guide which says JDK 1.7 or later
@BrRoBo let me do an update. I planned on redoing some things after the next release. Let me know if you find anything else and we’ll get that taken care of. Actually maven 4.0 literally just launched so the status quo hasn’t changed in quite some time. So not a lot has really needed to be done on that front. Sorry for the confusion!
@BrRoBo I made sure to clarify both the maven and java versions as you saw. For reference, jdk 11 and 17 are the main ones. I also added a note for maven 3.x.
@BrRoBo thanks let me take a look at that. Most stuff should not be impacted by that. Were you able to run the examples with jdk 8 or did you need to fully update to 11? Some aspects of the dl4j source code when we added java 9 modules did break compiling it with jdk 8 but we should be still outputting source that runs on jdk 8.
Please do let me know if it actually stops you from running things and if so I’ll update it.
I plan on taking a larger look at the examples after the release. We at least need to add some better examples for transformers and pretrained models among other things. I wanted to update everything then.
Trying to use JDK 8 was a show stopper because the java class byte code is version 55 (java 11) instead of 52 (java 8), and so would not complete the maven clean install (build). Thought that was a bit goofy since the pom currently specifies java 1.8 as the min (and the doc was even lower at 1.7). The examples built fine with java 11.
@BrRoBo ahh ok! Yeah some of it was just out of date. I’ll have to see if lowering the output class version has any impact on performance or anything. Could you point at which pages still mention jdk 7? If so I’ll update that as well. Likely going forward though jdk 8 will be a very special case. Most big companies have moved on from jdk 8.
It’s market share is shrinking every day. Meanwhile I see a ton of jdk 11.
I have no problem using JDK 11, there was just some basic confusion over the prereqs plus double checking in the pom for build reqs all indicated sub 11 was ok. So for now, it looks like you’ve got the Quick Start guide updated to 11. The pom should also be updated to reflect the java version to match the compiled class version… avoiding the more cryptic class version error from javac by having Maven enforce the java version min.