简体   繁体   中英

Missing artifact error while adding a depentency in pom

Am trying to add a dependency sauce-connect-plugin in to pom.xml file

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

But building the pom file am getting

 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?? What wrong with me.

When i directly add following in tho the pom file and added the repository am getting the same error

 <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 . But you have tried to download 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 . It will represent for only 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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