Showing posts with label Maven. Show all posts
Showing posts with label Maven. Show all posts

Wednesday, November 4, 2026

Touchdown! Eclipse CDO and Net4j Have Landed on Maven Central

It took a while. Quite a while, actually. But after a long journey through the occasionally bewildering universe of release engineering, I'm happy to report: Eclipse CDO and Net4j have finally landed on Maven Central! And yes, we even planted a flag.


Starting with CDO 4.36, developers can now consume the core CDO and Net4j libraries directly from Maven Central, making it much easier to integrate them into regular Java projects using Maven, Gradle, or other modern build tools.

The initial landing brings 12 essential bundles, covering the CDO client and server, Net4j communication, and database persistence. A dedicated BOM (Bill of Materials) takes care of the independently versioned components, so you don't have to.

And the post-landing checks look good, too: We've already successfully verified the published artifacts with an independent build using Maven Central as its sole artifact repository!

Of course, this is an additional distribution channel, not a replacement for our existing Eclipse p2 repositories.

The Next Mission: December 2026

The first landing is only the beginning. The upcoming December 2026 release is planned to bring more Net4j transports, including WebSocket and in-process communication, additional database integrations such as PostgreSQL, and selected CDO security and server components.

Our mission remains the same: Making CDO and Net4j increasingly accessible to developers beyond the traditional Eclipse ecosystem.

Thanks to the Ground Crew!

Every successful landing needs a good ground crew, and I certainly couldn't have pulled this off alone.

  • Ed Merks, for his invaluable advice, helpful tips, and careful reviews.

  • Frederic Gurr, for patiently handling the Eclipse Foundation helpdesk tickets.

  • Sonatype, for providing such a fantastic service to the open-source community.

  • Multiple AI assistants, without whom I would probably still be hopelessly lost somewhere in the vast and mysterious universe of release engineering.

Thank you all!

I'm looking forward to seeing CDO and Net4j find their way into more Java applications.

That's one small step for mankind, one giant leap for CDO!

Eclipse CDO · Net4j · Maven Central

Tuesday, December 9, 2014

When You Change a Method Return Type...

... strange effects can result under certain circumstances! Recently some Oomph users reported mysterious NoSuchMethodErrors at runtime and I spent quite some time to hunt down the problem. What I found is kind of scary. Consider the following, simple program:

  public class Util
  {
    public static void run()
    {
      // Run it...
    }
  }

  public class Main
  {
    public static void main(String[] args)
    {
      Util.run();
    }
  }

The bytecode of the compiled main() method is as simple as:

  invokestatic Util/run()V
  return

Notice the uppercase "V" at the end of the run() method call. It indicates that the return type of the called run() method is "void" and is part of the bytecode of the caller! Now change the declaration of the called run() method to return a boolean value:

  public class Util
  {
    public static boolean run()
    {
      // Run it...
      return true;
    }
  }

  public class Main
  {
    public static void main(String[] args)
    {
      Util.run();
    }
  }

Recompile both classes and look at the bytecode of the main() method again:

  invokestatic Util/run()Z
  pop
  return

Notice that the bytecode has changed even though the source code of the Main class has not changed the least bit. The old run() method with no return type would not be considered a valid call target anymore!

Interesting, but when can this become a real problem?

Well, in our case the calling and the called method are in different OSGi plugins and we use Maven/Tycho to build them and our Oomph users use p2 to install or update them. The following steps turned out to be tragic:

  • I changed the return type of the called method from void to boolean.
  • Maven/Tycho has built both the calling and the called plugin.
    • The called plugin got a new version (build qualifier) because it was really changed.
    • The calling plugin did not get a different version because its source code wasn't changed.
  • A user updated his Oomph installation to the new build.
    • The called plugin was updated because a new version was found.
    • The calling plugin was not updated because there was no new version available. To be clear, there was a plugin with different content in the new build, but it had the same version as in the previous build.
As a result this user was faced with an evil exception at runtime:

  java.lang.NoSuchMethodError: Util.run()V

Now that I know why this happened I can easily fix the nasty problem by applying a fake change to the calling plugin's source code to cause Tycho to assign a new version number to it; one that is consistent with the bytecode of the called plugin.

The fact that this can happen so easily leaves me kind of scared. After all, I'll probably never ever try to change a method return type again.