0

在我的项目中,我们使用的是 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,并尝试 mvn 安装它们,现在我的 .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 构建,我看到 mvn 何时下载所需的包,但它再次出现:

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

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

4

0 回答 0