Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven central #988

Merged
merged 5 commits into from
Feb 7, 2021
Merged

Maven central #988

merged 5 commits into from
Feb 7, 2021

Conversation

robertpanzer
Copy link
Member

@robertpanzer robertpanzer commented Feb 6, 2021

Thank you for opening a pull request and contributing to AsciidoctorJ!

Please take a bit of time giving some details about your pull request:

Kind of change

  • Bug fix
  • New non-breaking feature
  • New breaking feature
  • Documentation update
  • Build improvement

Description

What is the goal of this pull request?

As Bintray has announced that it is shutting down this PR tries to change the build so that it publishes to Maven Central instead of Bintray.

All modules can be published to a local repository at build/repos by executing

./gradlew publishAllPublicationsToLocalRepository -i

If everything works as expected, it should be possible to publish a release build by executing

./gradlew publishAllPublicationsToSonatype -i

For the current snapshot I managed to upload the artifacts to the sonatype snapshots repository.

For the implementation I followed the awesome description from @rwinch at https://github.com/rwinch/gradle-publish-ossrh-sample

There is still one dependency on jcenter, as the OSGi plugin at that specific version does not seem to be available in Maven Central, but only jcenter.
A newer major release is on Maven Central, but I want to keep that out of this PR.

I also updated the version of Gradle to 6.8, so finally we should also be able to build with current versions of Java.

How does it achieve that?

Are there any alternative ways to implement this?

Are there any implications of this pull request? Anything a user must know?

Issue

If this PR fixes an open issue, please add a line of the form:

Fixes #Issue

Release notes

Please add a corresponding entry to the file CHANGELOG.adoc

@mojavelinux
Copy link
Member

Thanks for the tutorial, @rwinch!

@robertpanzer
Copy link
Member Author

Build on Java 15 failed due to a ConcurrentModificationException in the bnd plugin:

Caused by: java.util.ConcurrentModificationException
	at java.base/java.util.TreeMap.callMappingFunctionWithCheck(TreeMap.java:742)
	at java.base/java.util.TreeMap.computeIfAbsent(TreeMap.java:596)
	at aQute.bnd.osgi.Jar.putResource(Jar.java:335)
	at aQute.bnd.osgi.Jar.buildFromZip(Jar.java:263)
	at aQute.bnd.osgi.Jar.<init>(Jar.java:128)
	at aQute.bnd.osgi.Jar.<init>(Jar.java:219)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
...

It passed locally with Java 15, so I am going to let that in and hope that it's intermittent.

@robertpanzer robertpanzer merged commit 30671a9 into asciidoctor:master Feb 7, 2021
@robertpanzer robertpanzer deleted the mavencentral branch February 7, 2021 13:59
@robertpanzer
Copy link
Member Author

I'll try to do a release next. Wish me luck! 🤞

@robertpanzer
Copy link
Member Author

For some reason the publication of the main artifact, asciidoctorj itself, to sonatype is missing now in the tasks list and I have no clue why it is not created :( Hooray...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants