Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Cannot release Vaadin project
I cannot perform a release on an out-of-the-box Vaadin 7.6.6 project.
Here's what I do:
- Create a standard Vaadin project using the vaadin-archetype-application-multimodule Maven archetype.
- Add <scm> section to the project's parent POM. (required for Maven release) and added <distributionManagement> section (requried for Maven deploy)
- On the parent: mvn clean build (just to make Maven download appropriate stuff and see if the build actually works)
- On the parent: mvn clean
- On the parent: mvn -Pproduction release:prepare (this passes without problems)
- On the parent: mvn -Pproduction release:perform
The latter step fails with
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy)
on project myvaadintest-production:
The packaging for this project did not assign a file to the build artifact -> [Help 1]
Ok, so the -production module doesn't actually produce a build artifact .. or at least not when executed with the production profile. But that's the whole point: When doing releases you would want the production profile to be active, wouldn't you?
This is all purely out-of-the-box.
Shouldn't the ambition be that this would work out-of-the-box ? (or am I the only creature in the world to be performing proper releases with Maven and Vaadin?)
Peter
I believe I've solved it. The archetype cannot be blamed. :-)
It is a consequence of how the Maven Release Plugin works: Command line arguments (like -Pproduction) on the parent doesn't get propagated when the Release Plugin executes mvn sub-tasks on sub-modules. The fix for that is the arguments property which can (and should) be used both on release:prepare and release:perform.
In other words step 5 and 6 above becomes
5. On the parent: mvn -Pproduction -Darguments="-Pproduction" release:prepare
6. On the parent: mvn -Pproduction -Darguments="-Pproduction" release:perform
I'm guessing the -Pproduction on its own is now redundant but I've kept as I do not know if it actually has an effect or not.
Enjoy.
This is perhaps worthy of its own blog post.