【问题标题】:Unable to install Vaadin Testbench via Maven无法通过 Maven 安装 Vaadin Testbench
【发布时间】:2014-11-10 13:56:33
【问题描述】:

我需要测试一个 Web 应用程序(基于 Vaadin 构建),因此我正在为作为 Selenium Wrapper 的 Vaadin Testbench 执行proof of concept。但我无法使用所需的依赖项构建项目。

我得到的错误是 -

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: com.github.zch:pdfsplit-maven-plugin

Reason: POM 'com.github.zch:pdfsplit-maven-plugin' not found in repository: Unable to download the artifact from any rep
ository

  com.github.zch:pdfsplit-maven-plugin:pom:1.0.1

from the specified remote repositories:
  ...
  vaadin-addons (http://vaadin.com/nexus/content/repositories/vaadin-addons),
  ...
  pdfsplit-plugin (https://raw.github.com/zch/maven/releases/),
  ...

 for project com.github.zch:pdfsplit-maven-plugin

POM.xml(部分)

<repositories>
    <repository>
        <id>vaadin-addons</id>
        <url>http://vaadin.com/nexus/content/repositories/vaadin-addons/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin</artifactId>
        <version>6.8.3</version>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-server</artifactId>
        <version>${vaadin.version}</version>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-themes</artifactId>
        <version>${vaadin.version}</version>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-shared</artifactId>
        <version>${vaadin.version}</version>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-client-compiled</artifactId>
        <version>${vaadin.version}</version>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-client-compiler</artifactId>
        <version>${vaadin.version}</version>
        <exclusions>
            <exclusion>
                <artifactId>servlet-api-2.5</artifactId>
                <groupId>org.mortbay.jetty</groupId>
            </exclusion>
            <exclusion>
                <artifactId>ant</artifactId>
                <groupId>ant</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-client</artifactId>
        <version>${vaadin.version}</version>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-testbench</artifactId>
        <version>4.0.0.rc2</version>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>com.github.zch</groupId>
                <artifactId>pdfsplit-maven-plugin</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>

【问题讨论】:

  • 您是否在 pom.xml 中添加了 部分,例如 github.com/zch/pdfsplit-maven-plugin
  • 发布你的 pom.xml 的相关部分。
  • @Joe 我也试过了,如果你看到给出的 URL 是错误的 [400: Invalid request]
  • @SiKing 添加了部分 pom
  • 随机附注:testbench 应该与 6.8 一起使用吗?

标签: maven-2 vaadin


【解决方案1】:

办公网络阻止了对外部存储库的访问,因此我不得不手动安装 jar 以便 Maven 猜测我之前使用了错误的版本/命令。

我试过这个命令-

mvn install:install-file -DgroupId=com.vaadin -DartifactId=vaadin-testbench -Dversion=4.0.0.rc2 -Dpackaging=jar -Dfile=C:\Users\Downloads\vaadin-testbench-4.0.0.rc2\maven\vaadin-testbench-4.0.0.rc2.jar

【讨论】:

  • 在您的办公室设置一个 Nexus 存储库,并只允许托管该 Nexus 的特定机器连接互联网。然后你就可以毫不费力地使用maven了。
猜你喜欢
  • 2023-02-26
  • 2013-07-10
  • 1970-01-01
  • 2017-12-25
  • 2023-01-30
  • 1970-01-01
  • 2016-05-18
  • 2021-04-21
  • 2016-05-11
相关资源
最近更新 更多