Reputation: 15716
In official documentation of Vaadin 8 I found how use Maven archetype:
https://vaadin.com/docs/v8/framework/getting-started/getting-started-archetypes.html
Ok. Something like this:
mvn -B archetype:generate \
-DarchetypeGroupId=com.vaadin \
-DarchetypeArtifactId=vaadin-archetype-application \
-DarchetypeVersion=8.3.3 \
-DgroupId=org.test \
-DartifactId=vaadin-app \
-Dversion=1.0-SNAPSHOT
Nice.
But what about Vaadin 12? Is it has Maven archetype ?
Upvotes: 1
Views: 59
Reputation: 339482
vaadin-core
& vaadin
Maven artifacts are now available for Vaadin Flow, versions 10, 11, 12, 13, & 14.
If you want to restrict yourself to using only the free-of-cost non-commercial widgets from Vaadin Ltd, use artifact vaadin-core
.
If you might want access to the commercial widgets as well as the free-of-cost widgets, use the artifact vaadin
.
You can grab the command-line text for creating an empty project via Maven by copying from the Maven tab of the Get started with Vaadin page. Currently:
mvn -B archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=LATEST -DgroupId=org.test -DartifactId=vaadin-app -Dversion=1.0-SNAPSHOT
And the Download tab on that page will create and download an entire Maven-driven project in any of 3 flavors:
If you do not know about Spring or CDI, then use the third option, Plain Java Servlet. Expand the downloaded .zip
file. Import the folder as a Maven project into your IDE such as IntelliJ, NetBeans, or Eclipse. You can immediately run your new web app via Jetty web container bundled via Maven.
Upvotes: 0
Reputation: 2358
No, there are no maven archetypes for Vaadin 10+ (yet).
You may however try these as long as there are no "official" archetypes.
https://github.com/viritin/vaadin-flow-archetypes
For example:
mvn archetype:generate \
-DarchetypeGroupId=in.virit \
-DarchetypeArtifactId=viritin-vaadin-flow-archetype \
-DarchetypeVersion=1.0
-DgroupId=org.test \
-DartifactId=vaadin-app \
-Dversion=1.0-SNAPSHOT
But as of now I think the officially prefered way to create Vaadin 10+ projects is using a starter project from
where you can download a zip file containing a maven project setup.
Upvotes: 1