When I run the command : mvn vaadin:compile I get this error :
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.039s
[INFO] Finished at: Thu Mar 20 11:35:00 CET 2014
[INFO] Final Memory: 7M/152M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'vaadin' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (D:\Users\etantaou\.m2\repository), central (http://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
I made a search and I found that I have to add this to my pom.xml under :
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.vaadin</groupId>
<artifactId>
vaadin-maven-plugin
</artifactId>
<versionRange>
[1.0.2,)
</versionRange>
<goals>
<goal>clean</goal>
<goal>resources</goal>
<goal>update-theme</goal>
<goal>update-widgetset</goal>
<goal>compile-theme</goal>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>
gwt-maven-plugin
</artifactId>
<versionRange>
[${gwt.plugin.version},)
</versionRange>
<goals>
<goal>resources</goal>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
I added that but I still get the error. Is there any jar or something that I have to add to make this work ?
For information I'm trying to create custom widgets on my Vaadin project. They say here I have to run vaadin:compile to compile WidgetSet.
Take a look at the
pom.xml
from Vaadin's demo.Maybe the
goals
aren't correct, try the following:I am not an expert in maven but this is my
pom.xml
and it works. Just make sure you change the<version>
to whatever version of Vaadin you are using (mine is 7.1.12).You have put the plugin configuration into pluginManagement section, which simply defines some default configuration but doesn't actually use the plugin.
You need to now define the plugin inside the
<build><plugins>
element. Something like this: