无法在内部存储库中获得依赖关系

时间:2012-02-06 17:08:29

标签: maven repository

我们正在使用Maven 3.0.3。我们已将的内部存储库

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

然后我包含了这个依赖...

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

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

            <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时,我收到了错误

[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]

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

1 个答案:

答案 0 :(得分:1)

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