使用Maven将GWT从1.7升级到2.4

时间:2013-01-28 11:11:03

标签: gwt maven

在我的项目中,我们正在使用GWT 1.7,现在我们要将其升级到2.4。我们还使用maven 1.6来构建项目。我已经更改了所有pom.xml文件,所以它们看起来像这样:

<properties>        
        <gwt.version>2.4.0</gwt.version>
</properties>

<dependencies>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <version>${gwt.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
            <version>${gwt.version}</version>
            <scope>runtime</scope>
        </dependency>
</dependencies>

现在,当我正在尝试构建项目时,它会因错误而崩溃:

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] artifact not found - Unable to download the artifact from any repository

Try downloading the file manually from the project website.

Then, install it using the command: 
    mvn install:install-file -DgroupId=com.google.gwt -DartifactId=gwt-dev -Dversion=2.4.0 -Dclassifier=linux-libs -Dpackaging=zip -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there: 
    mvn deploy:deploy-file -DgroupId=com.google.gwt -DartifactId=gwt-dev -Dversion=2.4.0 -Dclassifier=linux-libs -Dpackaging=zip -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]


  com.google.gwt:gwt-dev:zip:2.4.0

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  smartgwt-maven (http://www.smartclient.com/maven2),
  repo.pentaho.org (http://repository.pentaho.org/artifactory/pentaho),
  java-net-maven2 (http://download.java.net/maven/2),
  thirdparty.pentaho.org (http://repository.pentaho.org/artifactory/thirdparty),
  Octo Technology Nexus (http://forge.octo.com/nexus/content/groups/public),
  codehaus-maven-repo (http://repository.codehaus.org/org/codehaus/mojo/)

我已经下载了文件gwt-2.4.0.zip和gwt-servlet-2.4.0.jar,并试图安装这两个文件,现在我已经在我的.m2 / repository / com / google / gwt / 4目录:gwt,gwt-dev,gwt-servlet和gwt-user,它们都有2.4.0类别(有些也有旧的1.7.0)目录,但仍然出现构建错误。

更新

现在我将版本更改为<gwt.version>2.5.0-rc1</gwt.version>,启动了maven build,我看到mvn正在下载所需的软件包,但它又出现了:

com.google.gwt:gwt-dev:jar:2.5.0-rc1

未找到。我从谷歌网站上下载了gwt-2.5.0.zip,里面有很多.jar文件,我应该安装哪一个?

0 个答案:

没有答案