Anouar BAKRI
Anouar BAKRI

Reputation: 335

Azure artifact feed show only pom file even if jar packaging

I have this dependency in my pom file

    <dependency>
        <groupId>com.github.stefanbirkner</groupId>
        <artifactId>fake-sftp-server-rule</artifactId>
        <version>2.0.1</version>
        <scope>test</scope>
    </dependency>

it uses sshd-core dependency this way

    <dependency>
        <groupId>org.apache.sshd</groupId>
        <artifactId>sshd-core</artifactId>
        <version>[1,2)</version>
    </dependency>

I configured settings.xml correctly to get dependencies through azure artifact feed and it works because it gets other dependencies with no problem.

but for org.apache.sshd.sshd-core it gives me this error

Could not find artifact org.apache.sshd:sshd-core:jar:1.7.0

enter image description here

In azure artifact feed the dependency org.apache.sshd:sshd-core:jar:1.7.0 exists, but only the pom file is showing up, not the jar file enter image description here

What's the problem ? how to tell azure artifact to redownload the dependency correctely ? In maven central the dependency exist with jars files http://repo.maven.apache.org/maven2/org/apache/sshd/sshd-core/1.7.0/

Upvotes: 1

Views: 376

Answers (1)

Levi Lu-MSFT
Levi Lu-MSFT

Reputation: 30363

It seems redownload sshd core to azure feed is unachieveable. The easiest way to fix the build failed error is to delete sshd-core package from your azure feed. So that maven will install this package from Maven Centrol everytime. But this method has a downside that sshd-core will never be repushed to your azure feed because of immutability. enter image description here

Another more complicated way to fix this is to delete your azure feed and recreate another one. You need to reconfig your pom file in this way. And all the dependencies will be downloaded again to the new azure feed. [check here to permanently delete a feed using restful api, if you need to receate a new azure feed using the same name but failed to do so].

Addition:

Maven central is set to the upstream resources by default. You can click on the gear icon on the right top corner and click upstream resources to manage the upstream resources.

enter image description here

Upvotes: 0

Related Questions