无法运行mvn vaadin:编译Vaadin Maven项目

del*_*nce 5 java eclipse vaadin pom.xml maven

当我运行命令时:mvn vaadin:compile我收到此错误:

[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
Run Code Online (Sandbox Code Playgroud)

我进行了搜索,发现我必须将其添加到我的pom.xml中:

<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>
Run Code Online (Sandbox Code Playgroud)

我补充说,但我仍然得到错误.是否有任何罐子或东西需要添加才能使其工作?

有关信息,我正在尝试在我的Vaadin项目上创建自定义小部件.他们在这里说我必须运行vaadin:compile来编译WidgetSet.

cow*_*wls 1

您已将插件配置放入pluginManagement 部分,该部分仅定义了一些默认配置,但并不实际使用该插件。

您现在需要在元素内定义插件<build><plugins>。像这样的东西:

<build>
    <plugins>
        <plugin>
            <groupId>org.eclipse.m2e</groupId>
            <artifactId>lifecycle-mapping</artifactId>
        </plugin>
    </plugins>
</build>
Run Code Online (Sandbox Code Playgroud)