GWT-Maven的插件:插件需要Maven的2.1版 [英] gwt-maven-plugin: Plugin requires Maven version 2.1

查看:240
本文介绍了GWT-Maven的插件:插件需要Maven的2.1版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用GWT-Maven的插件来编译我的项目。我已经Maven的3.0.3安装在我的春天工具套件4.2黯然失色。

I am trying to use gwt-maven-plugin to compile my project. I have Maven 3.0.3 installed in my spring tool suite eclipse 4.2.

不过,该插件croaks,它希望使用Maven 2.1。我相信它应该使用没有问题的Maven 3.X吧?

However, the plugin croaks that it wants to use maven 2.1. I am sure it should have no problems using maven 3.x, right??

[神器:MVN] [INFO]错误解决了版本'组织codehaus.mojo:GWT-Maven的插件:插件需要Maven的2.1版

[artifact:mvn] [INFO] Error resolving version for 'org.codehaus.mojo:gwt-maven-plugin': Plugin requires Maven version 2.1

我的插件DEFN:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>gwt-maven-plugin</artifactId>
  <version>2.4.0</version>
  <executions>
    <execution>
      <configuration>
        <module>ally.mc.beal</module>
        <gen>gwt-generated</gen>
      </configuration>
      <goals>
        <goal>compile</goal>
      </goals>
    </execution>
  </executions>
</plugin>

我的ant目标我用来触发GWT编译:

My ant target I used to trigger the gwt compile:

<project name="AllyMcBeal"
  xmlns:artifact="antlib:org.apache.maven.artifact.ant">

  <path id="maven-ant-tasks.classpath" path="maven/maven-ant-tasks-2.1.3.jar" />
...
  <target name="gwt.compile">
    <artifact:mvn>
      <arg value="gwt:compile" />
    </artifact:mvn>
  </target>
...
</project>


  • 请我一定要安装Maven 2.1?

  • ,或者是有没有办法迫使它使用Maven 3.X?

  • 或者,我失去了在配置了一块信息的?

  • 推荐答案

    您需要设置 mavenVersion 属性神器:MVN Ant任务。如果没有这个任务默认为2.0.10一个Maven版本导致您所看到的错误消息。

    You need to set the mavenVersion attribute of the artifact:mvn ant task. Without this the task defaults to a maven version of 2.0.10 which causes the error message you are seeing.

    有关引用我的任务是这样的:

    For reference my task looks like this:

    <artifact:mvn pom="mypomfilepath.xml" mavenVersion="3.0.4">
        <arg value="install"/>
    </artifact:mvn>
    

    这篇关于GWT-Maven的插件:插件需要Maven的2.1版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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