Vaadin Add-ons Now Available With Maven

Today we rolled out a new version of the
Vaadin Directory
. This update is mostly about fulfilling a common feature request we have heard from the community, downloading add-ons via Maven repository. We have setup our own Maven repository for Vaadin Add-ons and already deployed existing add-ons there with the exception of some add-ons that wouldn’t make sense to use via Maven (tools etc). All future add-ons (and new versions of existing add-ons) will automatically be also available via the Maven repository.

How to use this new feature? It’s simple, in the Directory we now have a Maven POM button right under the download button for each add-on that is available via Maven. By clicking this button you will be shown all the needed information (

and

) for you to copy-paste into the pom.xml file of your Maven project. More defailed instructions
here
.

We would be happy to hear any feedback from you about this new feature. There might still be some rough edges and together we can smooth them out. Please post your comments, bug reports, ideas or any other feedback into this forum thread or use the feedback link on the Directory menu.

Great feature, speeds up the development process yet a bit more!

Unfortunately however, source code for some (all) addons seems to be missing from the maven repository. Is this being worked on?

Hi Adriaan,

and thanks for the feedback. Typically the source code is included inside the add-on jar file. Actually this is even a requirement for any add-ons with client-side code because of the required GWT widget set compilation.

  • Teemu

Just one small remark on this. well actually two.

First one, thanks a lot, making these add-on available on maven repo is a real time saver to me.

Second, there is one little problem with this… dependencies. Let’s take for instance the VisualizationsForVaadin. It has a dependency on gwt-visualizations, but this dependency is not in the pom.xml.

To me in order to get a nice complete coverage of the whole maven repository approach, this is missing.

maybe something to look at in the future ?

E.

Hi Eric,

and thanks for your feedback.

You’re right, the transitive dependencies for add-ons are not defined in the pom.xml (for all add-ons). This is unfortunate, but hopefully will be less of an issue in the future as we have updated the add-on authoring instructions to include instructions on how the author can provide these dependencies in a pom.xml file inside the jar.


http://vaadin.com/directory/help/creating-vaadin-add-ons#maven-pom

  • Teemu

Maybe just one more question about this maven repository for addons.

why is the repository not browsable? (we are having troubles with Nexus mirroring)

E.

The Maven repository is hosted on Amazon S3 and the lack of browsing is an unfortunate limitation of Amazon S3.

  • Teemu

Right but integration in maven IDEs will not expect that. They will add class files and resources but not java files. Can you explain a bit more what tool you use to generate the pom and deploy the add-on the repo?

Thanks,
S. (Maven committer :slight_smile: )

Another use case that would be handy is synch with maven central. To use the add-ons you need to add a repository section in your pom. It’s not a big deal since most of us use a repository manager that takes care of that for us.

However, when you want to build a demo or showcase or whatever, you don’t know about the repository manager config of your target audience and you want the POM to be as light as possible.

The vaadin build is already synced with central. Why not this?

Thanks,
S.

The short (and incomplete) answer would be: because we “own” Vaadin but not the add-ons.

When the add-on contains a POM, it is used by the directory. However, when there is none, only a very minimal POM is auto-generated by the directory. The authors are free to publish add-ons independently to other repositories including Maven central.

Many/most of the current add-ons have not been built with Maven, and several don’t have all the dependencies declared in the generated POMs - for some, the dependencies might not even be in public Maven repositories. For add-ons developed by others than us, it would be problematic to make sure all dependencies are correct etc.

A few add-ons (e.g.
Vaadin Bean Validation
) have been built with Maven and are available also in Maven central. Some (like the
Vaadin JPAContainer
if I remember correctly) have been built with Maven but then packaged for the directory with other mechanisms - there is a ticket open for building the final release package with Maven.

We should also make good archetypes available for building ZIP packaged add-ons with Maven - this would probably increase the number of add-ons built with Maven and published to Maven central. The assembly of such packages with Maven is a little tricky, but possible. Would need some time to do this properly, though.

Disclaimer: I am not the one who implemented this functionality in the Directory, so I might get some points wrong.

Surely, a first step would be to make sure those poms are valid before syncing them to central :slight_smile:

What I still don’t understand is how you guys validate the add-ons before being published on your site. I believe you need to compile the code and try it out, no? And if so, you need a way to build.

What I find very misleading here actually is that the fact you have a maven pom on each add-on gives a bit of confort to the user. Something like “hey, there’s a dependency there so I am going to add that and all will be good”. And it turns out it’s not. It’s even worse with your comment since some deps might not even be accessible.

My 2c

S.

Is there a solution yet? It seems like there’s no change for over a year and it’s still not possible to use Nexus or Artifactory to mirror the addons repository.

Please solve that as this could be a show stopper for vaadin.

How is this coming along?

As you may know it is really hard to deploy multiproject maven artifacts to your repository.
(I had to pull mine off because its just so much easier to deploy to central)

:-/

-Michael