Blog

Vaadin Add-on Directory can now list artifacts through Maven Central

By  
Matti Tahvonen
Matti Tahvonen
·
On Feb 27, 2023 3:28:29 PM
·

Did you develop a cool library or component for Vaadin and publish it on Maven Central? That's great! This approach has several advantages over traditional vaadin.com/directory publishing. The good news is that listing those libraries in the Directory is now possible – with minimal effort. While having the add-on in Central is technically enough to share your add-on, listing it also in the Directory will give it more visibility within the Vaadin community.

Why publish through Maven Central?

Everybody who has pushed their first artifact to Maven Central knows the rather bumpy road to get the first version cut. But once you have the setup ready, it is a great aid for your users and also for yourself:

  • Users of these add-ons don’t need a custom repository. Several corporations don’t allow configuring custom repositories at all, and builds will be faster as artifacts don’t need to be polled from multiple servers.
  • Publishing a multi-module artifact is as easy as it can get.
  • The groupId of your add-on can be anything you want, as long as you “own it” in the Maven Central repository.
  • Enjoy better release automation. Instead of uploading zip files or using custom REST endpoints, configure your setup to push to Central. The Vaadin Directory polls automatically for new versions of your add-ons, so there is no need to visit the web UI unless you wish to maintain additional metadata.
  • Standard build files for the add-ons themselves: no need for custom jar manifest headers or zip packaging.

How to list add-ons published in Maven Central in Vaadin Directory

To get started, you'll need:

  • An artifact (pom.xml) published to Maven Central
  • A vaadin.com account

Publishing an artifact to the Maven Central already gives certain requirements that are mostly enough for the Directory as well, but the name of your add-on is not allowed to start with “Vaadin.” Please use XYZ for Vaadin-style naming in the <name> tag instead of Vaadin XYZ, which is reserved for official Vaadin products.

Once your add-on is available via Central, log in to vaadin.com/directory and hit the “Publish Component” button. Use the Via Maven Central tab to fill in your groupId and artifactId. Vaadin will prefill quite a lot of details using the metadata available in the pom.xml. However, to ensure your add-on gets listed for the whole Vaadin community, please do the following:

  • On the versions tab, fill in supported frameworks, licenses, and browser support for the initial version
  • Fill in a longer overview on the description tab
  • Check the 'Published' checkbox
  • Hit the 'Save' button

That’s all that is required, but additionally, we suggest filling in things like:

  • Source code and issue tracker links
  • Code examples
  • Screenshots
  • Possible demo URL
  • Icon for your add-on

If you have an existing add-on in the Directory, which you would like to switch to Maven Central publishing, first push out your add-on to Maven Central under an artifactId you govern. Be sure to use the same name in the pom.xml as in your existing version. Then you need to use the “New version from Maven” button from the versions tab once and define the new groupId you use in Maven Central. After that, new releases will be picked up automatically!

Visit Vaadin Directory -->

Matti Tahvonen
Matti Tahvonen
Matti Tahvonen has a long history in Vaadin R&D: developing the core framework from the dark ages of pure JS client side to the GWT era and creating number of official and unofficial Vaadin add-ons. His current responsibility is to keep you up to date with latest and greatest Vaadin related technologies. You can follow him on Twitter – @MattiTahvonen
Other posts by Matti Tahvonen