Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
How to add META-INF/services to the war?
I have a Vaadin 7 maven web project that has some annotations that create service definition on META-INF/services.
I added this to the pom so the annotations are processed:
<!-- Run annotation processors on src/main/java sources --> <plugin> <groupId>org.bsc.maven</groupId> <artifactId>maven-processor-plugin</artifactId> <version>3.3.1</version> <executions> <execution> <id>process</id> <goals> <goal>process</goal> </goals> <phase>generate-sources</phase> </execution> </executions> </plugin>
The files show within target/classes/META-INF/services but don't make it to the final war.
I tried adding the folder to the maven-war-plugin like this:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>3.0.0</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> <packagingIncludes>target/classes/*</packagingIncludes> </configuration> </plugin>
But then most of the Vadin files don't make it into the war and it doesn't work. Any idea?
My guess: as soon as you specify packagingIncludes for maven-war-plugin, only the listed entries are included, and your list does not include everything needed. See http://maven.apache.org/plugins-archives/maven-war-plugin-2.3/war-mojo.html#packagingIncludes