gwt - 在存储库中找不到 Maven 依赖项

标签 gwt maven extjs dependencies gxt

我正在尝试运行使用 gwt-dev 的项目。 说明位于:http://neiliscoding.blogspot.ru/2012/05/how-to-setup-examples-for-use-in-gxt-3.html?showComment=1362999279386 当我在终端中创建依赖项时:mvn install:install-file -DgroupId=com.google.gwt -DartifactId=gwt-dev -Dversion=2.5.0 -Dpackaging=jar -Dfile='/home/mikhail/Загрузки/libraries/gwt-2.5.0/gwt-dev.jar' 并向 pom.xml 添加依赖项:

 <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-dev</artifactId>
      <version>2.5.0</version>
  </dependency>

maven 说:

    [WARNING] You should not declare gwt-dev as a project dependency. This may introduce complex dependency conflicts
Downloading: http://repo1.maven.org/maven2/com/google/gwt/gwt-dev/2.5.0/gwt-dev-2.5.0-linux-libs.zip
[INFO] Unable to find resource 'com.google.gwt:gwt-dev:zip:linux-libs:2.5.0' in repository central (http://repo1.maven.org/maven2)

否则,如果我删除它,maven 会说:

[INFO] using GWT jars from project dependencies : 2.5.0
Downloading: http://repo1.maven.org/maven2/com/google/gwt/gwt-dev/2.5.0/gwt-dev-2.5.0-linux-libs.zip
[INFO] Unable to find resource 'com.google.gwt:gwt-dev:zip:linux-libs:2.5.0' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR

所以我在这两种情况下都有构建错误。遇到这种情况怎么办?请帮助我。

我还没有解决这个问题,但我刚刚发现我使用了 1.2 版本的 maven 插件。我不确定这是主要问题,但我还是想处理它。所以,我已经根据你的第一个链接添加了这个插件,maven 删除了构建错误: `

[INFO] Scanning for projects...
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Batch mode
[INFO] Archetype repository missing. Using the one from [org.codehaus.mojo:gwt-maven-plugin:2.5.1-rc1] found in catalog remote
[WARNING] Property module is missing. Add -Dmodule=someValue
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Archetype org.codehaus.mojo:gwt-maven-plugin:2.5.1-rc1 is not configured
    Property module is missing.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Tue Mar 12 15:18:50 MSK 2013
[INFO] Final Memory: 27M/428M

` 顺便说一下,我使用的是 intellij IDEA

最佳答案

GWT 很久以前就停止为 windows、linux 和 mac 维护单独的平台相关库。 GWT 1.7 是最后一个此类依赖于平台的库。所以"linux-libs"在你的错误中没有意义。我猜你正在使用一个非常古老的 gwt-maven-plugin 。

  1. 移至最新gwt-maven-plugin .
  2. 使用<scope>provided</scope>用于 gwt-dev 依赖以避免它被插入 WEB-INF/lib(无害但多余)
  3. 使用全局/中央 repository而不是在本地安装它的用户 repo。
  4. 您还可以开始使用 GWT 样本进行 Maven 项目 here .

请注意 - 您的查询可能与 NetBeans + GWT 2.2.0 + Maven compile problem 重复/相似

为新的 GWT 版本编辑

GWT 2.5.1 已发布,同时注意 gwt-maven-plugin2.5.0(比 GWT 落后 1 步:)

关于gwt - 在存储库中找不到 Maven 依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15337133/

相关文章:

java - GWT 单元表问题

带有复选框的 GWT CellTable 获取所有选中的框

java - Maven:打包复制文件夹后复制粘贴WEB-INF到根目录

javascript - 为 sencha 触摸应用程序创建双 slider

extjs - 在 sencha touch 中实现搜索字段功能

java - 将GWT项目部署到Jetty//错误: Couldn't load from super devmode server at localhost:9876

java - GWT 应用程序中的 XMPP 聊天

maven - 使用 Maven Shade 插件创建包含依赖 jar 的依赖文件夹

tomcat - Hudson - Maven 在 Tomcat-6 - Gentoo 上失败(无法创建/dev/null/.m2)

javascript - 如果 Ext.override() 不存在,是否会创建一个新函数?