简体   繁体   English

在pom中添加依赖项时缺少工件错误

[英]Missing artifact error while adding a depentency in pom

Am trying to add a dependency sauce-connect-plugin in to pom.xml file 我试图在pom.xml文件中添加一个依赖sauce-connect-plugin

<groupId>com.saucelabs.maven.plugin</groupId>
    <artifactId>sauce-connect-plugin</artifactId>
    <version>2.1.18</version>
</dependency>

But building the pom file am getting 但是建立pom文件了

 Missing artifact com.saucelabs:sauce-connect:jar:3.1.32

Also i mentioned the repository 我还提到了存储库

<repositories>
        <repository>
            <id>saucelabs-repository</id>
            <url>https://repository-saucelabs.forge.cloudbees.com/release</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

in this url http://repository-saucelabs.forge.cloudbees.com/release/com/saucelabs/sauce-connect/3.1.32/ sauce-connect:jar:3.1.32 is present Then why Missing artifact error is showing?? 在这个网址http://repository-saucelabs.forge.cloudbees.com/release/com/saucelabs/sauce-connect/3.1.32/ sauce-connect:jar:3.1.32存在那么为什么会出现Missing artifact error ? ? What wrong with me. 我怎么了。

When i directly add following in tho the pom file and added the repository am getting the same error 当我直接在pom文件中添加以下内容并添加了存储库时出现相同的错误

 <dependency>
            <groupId>com.saucelabs</groupId>
            <artifactId>sauce-connect</artifactId>
            <version>3.1.32</version>
        </dependency>

You have used mismatched versions: 您使用了不匹配的版本:

sauce-connect-plugin presents in: http://repository-saucelabs.forge.cloudbees.com/release/com/saucelabs/sauce-connect-plugin/ which have only versions of 1.0.11, 1.0.12, 1.0.13 and 1.0.14 . sauce-connect-plugin存在于: http://repository-saucelabs.forge.cloudbees.com/release/com/saucelabs/sauce-connect-plugin/1.0.11, 1.0.12, 1.0.13 and 1.0.14其版本仅为1.0.11, 1.0.12, 1.0.13 and 1.0.14 But you have tried to download 2.1.18 但是你试图下载2.1.18

What you mentioned with the URL http://repository-saucelabs.forge.cloudbees.com/release/com/saucelabs/sauce-connect/3.1.32/ will not represent for sauce-connect-plugin . 您在网址http://repository-saucelabs.forge.cloudbees.com/release/com/saucelabs/sauce-connect/3.1.32/提到的内容不代表sauce-connect-plugin It will represent for only sauce-connect 它仅代表sauce-connect

So you should try with following dependency: 所以你应该尝试以下依赖:

<dependency>  
        <groupId>com.saucelabs.maven.plugin</groupId>
        <artifactId>sauce-connect-plugin</artifactId>
        <version>1.0.11</version><!-- 1.0.11, 1.0.12, 1.0.13 or 1.0.14 -->
 </dependency>

If you need exactly the version of 2.1.18 , then you need to upload the artifact in the location http://repository-saucelabs.forge.cloudbees.com and try. 如果您确切需要2.1.18的版本,那么您需要在http://repository-saucelabs.forge.cloudbees.com上的位置上传工件并尝试。

在这里你可以找到一个也在使用它的人,尝试比较你的pom https://github.com/saucelabs/sauce-java/blob/master/sauce-connect-plugin/pom.xml

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM