Need pom.xml to generate jar with vaadin and add-on widgetsets and my own t

I would like to have a pom.xml which builds a jar file with all precompiled and add-on widgetsets. This jar would then be used as a single dependency to build my components and application. All the pom.xml examples of building widgetsets assume that they are built together with the application (into a war) which does not allow me to separate the common widgetsets into a separate pom.xml.

If you just want to create a module in your modular Vaadin project that does this (or a separate project), there is nothing special to it. Just copy the application POM, change type to jar instead of war, trim away all extra (you don’t need to keep much except the Vaadin plug-in and relevant repositories and dependencies) and make sure VAADIN/widgetsets/… gets in the correct place in the JAR. Unfortunately I don’t have a suitable POM at hand but if you are having problems with this, maybe someone else has one or you find one in some project on Github.

You could also check out the widget archetype, which creates an add-on style JAR and ZIP. Note, though, that widgetset compilation is only performed for the demo sub-module in projects created with a current version of that archetype.