无法运行mvn vaadin:在Vaadin Maven项目中编译 [英] Cannot run mvn vaadin:compile on Vaadin Maven project

查看:169
本文介绍了无法运行mvn vaadin:在Vaadin Maven项目中编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  [INFO] BUILD FAILURE 
[INFO] ---------------------------------------------- --------------------------
[INFO]总时间:1.039s
[INFO]完成于:Thu Mar 20 11:35:00 CET 2014
[INFO] Final Memory:7M / 152M
[INFO] ---------------------- --------------------------------------------------
[ERROR]在当前项目和插件组[org.apache.maven.plugins,org.codehaus.mojo]中找不到用于前缀'vaadin'的插件,可从存储库[local(D:\ Users\etantaou\m2\repository),central(http://repo.maven.apache.org/maven2)] - > [帮助1]
[ERROR]
[ERROR]要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。
[ERROR]使用-X开关重新运行Maven以启用完整的调试日志记录。
[ERROR]
[ERROR]有关错误和可能的解决方案的更多信息,请阅读以下文章:
[错误] [帮助1] http://cwiki.apache.org / confluence / display / MAVEN / NoPluginFoundForPrefixException

我做了一个搜索,我发现我必须添加到我的pom.xml下:

 < pluginManagement> 
< plugins>
<! - 此插件的配置仅用于存储Eclipse m2e设置。它对Maven构建本身没有影响.-->
< plugin>
< groupId> org.eclipse.m2e< / groupId>
< artifactId>生命周期映射< / 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>

我补充说,但我仍然收到错误。有没有任何罐子或我必须添加的东西来做这项工作?



有关信息,我想在我的Vaadin项目中创建自定义小部件。他们说 here 我必须运行vaadin:compile来编译WidgetSet。

解决方案

我不是maven的专家,但这是我的 pom.xml 它工作。只需确保您将< version> 更改为您使用的Vaadin版本(我的是7.1.12)。

 < build> 
< pluginManagement>
< plugins>
< plugin>
< artifactId> maven-compiler-plugin< / artifactId>
< version> 2.5.1< / version>
< configuration>
< source> 1.6< / source>
< target> 1.6< / target>
< / configuration>
< / plugin>
< plugin>
< artifactId> maven-clean-plugin< / artifactId>
< version> 2.5< / version>
< configuration>
< filesets>
< fileset>
< directory> src / main / webapp / VAADIN / widgetsets< / directory>
< / fileset>
< fileset>
< directory> src / main / webapp / VAADIN / gwt-unitCache< / directory>
< / fileset>
< / filesets>
< / configuration>
< / plugin>
< plugin>
< groupId> com.vaadin< / groupId>
< artifactId> vaadin-maven-plugin< / artifactId>
< version> 7.1.12< / version>
< configuration>
< extraJvmArgs> -Xmx512M -Xss1024k< / extraJvmArgs>
< webappDirectory> $ {basedir} / src / main / webapp / VAADIN / widgetsets< / webappDirectory>
< hostedWebapp> $ {basedir} / src / main / webapp / VAADIN / widgetsets< / hostedWebapp>
< noServer> true< / noServer>
< draftCompile> false< / draftCompile>
< style> OBF< / style>
< strict> true< / strict>
< compileReport> true< / compileReport>
< runTarget> http:// localhost:8080 /< / runTarget>
< / configuration>
<执行>
< execution>
< configuration>
< / configuration>
< goals>
< goal> resources< / goal>
< goal> update-widgetset< / goal>
< goal> compile< / goal>
< / goals>
< / execution>
< / executions>
< / plugin>
< / pluginManagement>
< / build>


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.

解决方案

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).

<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>src/main/webapp/VAADIN/widgetsets</directory>
                        </fileset>
                        <fileset>
                            <directory>src/main/webapp/VAADIN/gwt-unitCache</directory>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-maven-plugin</artifactId>
                <version>7.1.12</version>
                <configuration>
                    <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
                    <webappDirectory>${basedir}/src/main/webapp/VAADIN/widgetsets</webappDirectory>
                    <hostedWebapp>${basedir}/src/main/webapp/VAADIN/widgetsets</hostedWebapp>
                    <noServer>true</noServer>
                    <draftCompile>false</draftCompile>
                    <style>OBF</style>
                    <strict>true</strict>
                    <compileReport>true</compileReport>
                    <runTarget>http://localhost:8080/</runTarget>
                </configuration>
                <executions>
                    <execution>
                        <configuration>
                        </configuration>
                        <goals>
                            <goal>resources</goal>
                            <goal>update-widgetset</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
    </pluginManagement>
</build>

这篇关于无法运行mvn vaadin:在Vaadin Maven项目中编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆