Vaadin has been supporting Maven for years already, and we recently had a major update of Vaadin archetypes. Now, that we are getting closer to Vaadin 7.4, we have been updating them again but we also wanted to update the documentation add some helpers to make you more productive.
Bootstrap your projects quickly
The getting started instructions are now more clear. Install Maven, copy and paste the mvn archetype command snippet to create a project, or for your existing Maven projects, copy the dependency information to your project. And build it: mvn clean install.
Simple as that. All the needed libraries are automatically downloaded, the project is built and tested.
For those who have never really used Maven before, here is the basic vocabulary you will encounter:
-
Artifact - a file, usually a JAR, that gets deployed to a Maven repository that contains an API or a library. Each artifact has an id that is unique within a group id. Each artifact has a group id (typically reverse domain name, like ‘com.vaadin’), an artifact id (like ‘vaadin-server’), and a version string (like ‘7.4.0.rc1’). These together uniquely identify an artifact.
-
Archetype - Archetype is a Maven project template. It creates a pre-configured Maven project setup. Typically they can be configured using parameters.
-
POM - "Project Object Model" is an XML configuration of the Maven project held in a file named pom.xml in your project’s root folder.
-
Phase - Project builds are defined by a list of build phases, wherein a build phase represents a stage in the lifecycle. Typical phases are compile, test package or finally install.
-
Goal - A build goal represents a specific task (finer than a build phase) which contributes to the building and managing of a project. For example ‘mvn jetty:run’ runs the goal that starts the web application locally for quick testing.
This is basically all you need to know to benefit from the Maven project management. If you are interested in learning more about Maven, please check out the introduction, but to just start using it with Vaadin, you only need to follow the stuff here: vaadin.com/maven.
The main benefit from Maven is that it is compatible with CI (continuous integration) tools, so once you start using it in your local project, the build can easily be automated on a daily basis or even on every SCM commit.
Search and find libraries for your application
We wanted to make using Maven artifacts in your Vaadin apps more fluent. That’s why we introduced the Maven artifact search.
Whether you need logging, mocking or an ORM library, you can now easily search for extra tools and libraries and install them in your project. Just copy the dependency information to your pom.xml and run your build. In addition to this, you can quickly see the latest updates and check the associated Javadoc documentation to see if this was the one you were looking for. The search tool is helpful outside of Vaadin as well, so feel free to share it with your friends.
And btw, the search results are displayed using Vaadin Grid – an all new component in Vaadin 7.4 to easily present large amounts of tabular data.