Skip to content

#385: Support for Maven Upload via Sonatype#637

Open
kfriedberger wants to merge 30 commits intomasterfrom
385-maven-via-sonatype-maven-registry-instead-of-oss-nexus
Open

#385: Support for Maven Upload via Sonatype#637
kfriedberger wants to merge 30 commits intomasterfrom
385-maven-via-sonatype-maven-registry-instead-of-oss-nexus

Conversation

@kfriedberger
Copy link
Copy Markdown
Member

@kfriedberger kfriedberger commented Mar 30, 2026

This PR provides a way to publish into Maven (Sonatype Maven Central, and will bring a solution for #385 .

During the development of this branch/PR, the several steps were performed and bugfixes applied.
This should improve the process of publishing into Maven Central,
make it easier to maintain the published artifacts in the future,
and also improve user experience for users of JavaSMT and its solvers when using Maven.
For example, we improved dependency handling for JavaSMT itself and JavaSMT's Yices2 bindings.

The artifacts are available at https://repo1.maven.org/maven2/org/sosy-lab/ .

1. Update publication script in build/build-maven-central.xml

The new publication script represents the migration from OSSRH to Maven Central (see #385),
and is a complete rewrite of the previous script, decommissioning the old one from 2014.
It contains documentation on how to publish into Maven Central, and the script to do so.

We also added a small test-script to locally check whether a new release
can be published into Maven Central, which is available at build/test-maven-central.sh.

2. Update all solver libraries in Maven (missing since 2025-06)

3. Update JavaSMT's Yices2 bindings (missing since 2025-06)

The POM file contains updated dependencies to all Java dependencies (they were completely missing until now)
as well as (new) an optional dependency on javasmt-solver-yices2
which is the corresponding version available in Maven Central,
and should be used by users of JavaSMT when they want to use Yices2 as a solver.
Currently, all dependencies are marked as scope=optional to be compatible with older releases of JavaSMT in Maven,
but the Java dependencies will be changed in the next release to be non-optional (scope=compile).

4. Update JavaSMT itself (missing since 2025-06)

The POM file contains updated dependencies to all Java dependencies
as well as (new) optional dependencies for all solver-related artifacts,
i.e., javasmt-solver-<SOLVER>, smtinterpol, and princess/ostrich (for the corresponding versions available in Maven Central).
Previously, Java-based solvers were always included (scope=compile), but now they are marked as scope=optional.
Previously, other solvers were not mentioned at all,
making it quite difficult to search the corresponding versions for a release of JavaSMT from Ivy.
In the future, we might want to add a BOM file for JavaSMT itself,
which would make it even more convenient to use JavaSMT and its solvers in Maven projects,
but for now, the POM file should be sufficient to find the correct versions of the dependencies.

@kfriedberger kfriedberger linked an issue Mar 30, 2026 that may be closed by this pull request
In Maven, Jars usually do not use "artifact" pattern for plain jars,
except for cases like "source"/"javadoc".
The POM file will contain the dependencies section,
and it will reference the latest versions of dependencies, not the actual dependencies.
…l in the repository, instead of updated local one.
The old script was limited to OSSRH only,
which was shut down in June 2025.
The updated replacement is available in build/build-maven-central.
split off retrieval of JavaSMT's own jars.
use full name for components to make the script more flexible and developer friendly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Maven via Github-Maven-Registry instead of OSS-Nexus

1 participant