1
votes

I configured a Jenkins to deploy the artifact to Jfrog (community). This is what I want to have and instead what I have.

  1. I have a spring-boot maven project "maven-example" with version 0.0.1-SNAPSHOT.
  2. Jenkins, due to the git push, start the building using the Build Environment : Maven3-Artifactory Integration
  3. This is the Artifactory Configuration

4.In Build : Invoke artifactory Maven and used clean install goals

  1. All seems to be ok. The artifact is published to my local artifact repository but when I browse it, I see the jar with date appended like in this picture

enter image description here

  1. In a 2nd spring-boot project which depends on the maven-example, I would like to have :

       <dependency>
          <groupId>com.example</groupId>
          <artifactId>mavenexample</artifactId>
          <version>0.0.1-SNAPSHOT</version>
       </dependency>
    

but I cannot retrieve the library if I do not use

    <dependency>
        <groupId>com.example</groupId>
        <artifactId>mavenexample</artifactId>
        <version>0.0.1-20200511.103423-1</version>
    </dependency>

What I missed? (I already set the .m2 setting.xml to target my Jfrog)

Thank you in advance

1
The timestamps are the expected behaviour. Nevertheless, Maven should resolve 0.0.1-SNAPSHOT against the latest timestamp. If not, there is probably some configuration error.J Fabian Meier

1 Answers

1
votes

What you are seeing is the expected behavior of Maven unique snapshots (as written by JF Meier in the comments).
Maven is using a high resolution timestamp to uniquely identify the snapshot version (this is the only supported snapshot type since Maven 3).