Unable to find artifact from artificial

I am using JFrog artifactory 3.2.1.1 with Maven 3.2.1.

I downloaded the embedded project that exists in libs-snapshot-local in the repository browser. If I go to com.foo.project, I will see the project file-1.0-20151113.133436-1.jar and pom and metadata in the artifactory browser.

Even access to http://example.com:8081/artifactory/webapp/browserepo.html?42&pathId=libs-snapshot-local:com/foo/project/1.0-SNAPSHOT/project-1.0-20151113.133436-1.jar shows me jar file inside.

I used the settings.xml generator from artifactory to create the tag <repository>that I use in the following pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.foo.bar</groupId>
  <artifactId>exampleApp</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>exampleApp</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <repositories>
    <repository>
      <snapshots />
      <id>snapshots</id>
      <name>libs-snapshot</name>
      <url>http://example.foo:8081/artifactory/libs-snapshot</url>
    </repository>
  </repositories>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>com.foo</groupId>
                  <artifactId>project</artifactId>
                  <version>1.0</version>
                  <type>jar</type>
                  <includes>myFolder</includes>
                  <outputDirectory>${project.build.directory}/newFolder/js/gmoketest</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

I just get:

org.apache.maven.plugins: maven-dependency-plugin: 2.8: () App: . com.foo:project:jar:1.0 in http://example.com:8081/artifactory/libs-snapshot ,

        http://example.foo:8081/artifactory/libs-snapshot

        http://example.foo:8081/artifactory/libs-snapshot-local :

[ERROR] org.apache.maven.plugins: maven-dependency-plugin: 2.8: () App: . artefact com.foo:project:jar:1.0 / (http://example.com:8081/artifactory/libs-snapshot-local): : http://example.com:8081/artifactory/libs-snapshot-local/com/foo/project/1.0/project-1.0.jar. : 409, ReasonPhrase: Conflict.

-1.0 , pom SNAPSHOT artifactory.

+4
1

, , :

<version>1.0-SNAPSHOT</version>
0

Source: https://habr.com/ru/post/1615777/


All Articles