Processing 4 Core Maven Artifact

I’ve set up a Github repo that hosts Processing 4’s core library as a Maven dependency/artifact via JitPack.

Now you can easily use the newer Processing core in a Maven project (the last version on mvnrepository.com is approaching 3 years old!).

Instructions on the repo readme:

3 Likes

I had same problem so took your idea and made GitHub - maxandersen/processing4 at jitpack and now I can use latest version from https://jbang.dev using:

//REPOS jitpack,mavencentral
//DEPS com.github.maxandersen:processing4:jitpack-SNAPSHOT

The difference is I added jitpack.yml and forked from the real repo making it fairly trivial to stay uptodate.

1 Like

I don’t know whether you noted that the latest processing uses “jogl/v2.4.0-rc-20210111”? It makes quite a difference.

Thanks for sharing these! The current Processing Maven landscape that I am aware of (IANA Maven user):

For related discussion of the origins of the unofficial 3.3.7 maven distribution by poqudrof used in papart, why it fell out of date at 3.3.7 while Processing continued to 3.5.4, and the fact that there is no official Maven distribution of Processing 3.x or 4.x, see:

Edit added libp5x

Unfortunately that library is not published in maven central either nor is it to be found in Index of /deployment/maven/org/jogamp/jogl/jogl-all-main - seems like published stopped in 2016 ;/

Unfortunately can’t figure out where the true source repo are for that latest version…

so its out of date because noone is maintaining it but afaics it can be automated - the biggest challenge is that the dependencies processing has is also not in any maven repository making it much harder to make easy to maintain ;/

libp5x, which is Processing 3.5.3 modularized and adapted to use Java 11+ and LWJGL, is published via Maven Central. Also some examples at - GitHub - codelerity/libp5x-examples: Examples using libp5x

It will be updated to be compatible with Processing 4 at some point after that has a final release. Although some of the gains are already there.

1 Like

Processing4 builds OK with jogl-2.3.2, but you really need the jogl-2.4-rc jars at runtime, in my ruby processing projects I use a Rakefile to copy jars into my rubygems. Although it seems someone has posted maven artifacts.

I’ve just done a similar thing for Processing 3.5.4.

Now there was an 3.5.4 artifact out there (under quil.processing-core, available from Clojars) but it didn’t have javadocs or source code attached to it, so neither of these could come through on an IDE. With this Jitpack release, they can do, which makes it better to work with:

1 Like

Have just updated the artifact to the latest beta release: 4.0b4.

<dependency>
    <groupId>com.github.micycle1</groupId>
    <artifactId>processing-core-4</artifactId>
    <version>4.0b4</version>
</dependency>

Thank you for creating this package @micycle :slight_smile:

I tried to use your latest release (4.1.1) on an Intel Mac. It works in Java2D mode but crashes with P2D using an empty sketch that just calls size().

Do you know why this could be?

Update: maybe it’s the JDK, as mentioned in How to make 3D with Processing core library - #6 by matthewortega

Update: I made it work by doing two things:

  1. Added this to the build.gradle.kts file
java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(17))
        vendor.set(JvmVendorSpec.ADOPTIUM)
    }
}
  1. On the command line I install this Java JDK
brew install --cask temurin
1 Like

Since 4.1.1, the source code for processing core contains some Java 17, so your Java project needs to be 17+ too (as you’ve found).

1 Like

Thank you. My impression was that not only it needed Java 17, but Temurin was actually required. I might be wrong but I think it was crashing with other versions of 17 on that Mac.