无法在内部存储库中获得依赖关系 [英] Unable to get dependency in an internal repository

查看:120
本文介绍了无法在内部存储库中获得依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用Maven 3.0.3.我们已经将JAR文件部署到内部存储库中,位于

We are using Maven 3.0.3. We have deployed a JAR file to an internal repository at

http://maven/maven_repo/repositories/release/org/openqa/selenium/server/selenium-server/0.9.2/selenium-server-0.9.2-standalone.jar

然后我就包含了这种依赖性...

I have then included this dependency ...

    <dependency>
        <groupId>org.openqa.selenium.server</groupId>
        <artifactId>selenium-server</artifactId>
        <version>0.9.2</version>
        <scope>test</scope>
    </dependency>

此外,在我的〜/.m2/settings.xml文件中,我们有内部存储库...

Also, in my ~/.m2/settings.xml file, I have our internal repository ...

            <repository>
                <id>mycoInternalRelease</id>
                <layout>default</layout>
                <name>myco Internal Repository</name>
                <url>http://maven/maven_repo/repositories/release</url>
                <releases>
                    <enabled>true</enabled>
                    <checksumPolicy>fail</checksumPolicy>
                    <updatePolicy>always</updatePolicy>
                </releases>
                <snapshots>
                    <enabled>false</enabled>
                    <checksumPolicy>fail</checksumPolicy>
                    <updatePolicy>always</updatePolicy>
                </snapshots>
            </repository>

尽管如此,当我运行pom时,我得到了错误

Despite all this, when I run my pom, I get the error

[ERROR] Failed to execute goal on project myco-productplus-web: Could not resolve dependencies for project myco-productplus:myco-productplus-web:war:1.0-SNAPSHOT:The following artifacts could not be resolved: org.openqa.selenium.server:selenium-server:jar:0.9.2, org.openqa.selenium.server:selenium-server-coreless:jar:0.9.2: Could not find artifact org.openqa.selenium.server:selenium-server:jar:0.9.2 in mycoInternalRelease (http://maven/maven_repo/repositories/release) -> [Help 1]
[ERROR]

我该如何治愈疼痛?谢谢,-戴夫

How can I heal the pain? Thanks, - Dave

推荐答案

鉴于您的工件名为"selenium-server-0.9.2-standalone.jar",您可能需要在pom中的依赖项声明中添加<classifier>standalone</classifier>

Given your artifact is named "selenium-server-0.9.2-standalone.jar" you might need to add <classifier>standalone</classifier> to your dependency declaration in your pom.

这篇关于无法在内部存储库中获得依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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