Create a Vaadin project with Maven command line

Hi,

I wanted to give a try to your framework for my personal experience.
Following this:

The easiest way of getting Vaadin 7 is through Maven. Create a new Vaadin project from an archetype with:

mvn archetype:generate \ -DarchetypeGroupId=com.vaadin \ -DarchetypeArtifactId=vaadin-archetype-application \ -DarchetypeVersion=7.3.8 \ -Dpackaging=war Doing that I got :

ClassNotFoundException: com.google.common.collect.ImmutableLi

So i download and put Guava in maven lib folder and then :

Exception in thread "main" java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class com.google.inject.internal.Annotations$AnnotationChecker And i’m stuck here. If this is the easiest way, this sould be easy and worked fine.
What could i try ?

This looks strange. With Maven, you should not need to copy any such libraries by hand.

As a first guess, if you have the command line on a single line, remove the backslashes. Those were in the example to prevent newlines from ending the command, but shouldn’t be there before spaces.

If that does not help, which Maven version are you using? Can you test with a newer version (or an older one if you are using a bleeding edge build)?

It is possible that something in your local Maven cache is corrupted. If you delete ~/.m2/repository/com/google/guava/ (and perhaps also ~/.m2/repository/com/vaadin/vaadin-archetype-application if necessary), Maven will re-fetch the files it needs on the next build.

You could also try creating the project again without the “-Dpackaging=war” to use what packaging that version of the archetype has as its default, and maybe with 7.3.9 (or whatever is the latest when doing this) as the Vaadin version. Certain versions of the archetype use a multi-module structure where the top-level project is not the WAR project, and perhaps this is causing problems.