I am deploying my Artifacts from an Ant build to Artifactory using these Targets:
<project name="myApp" default="main" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant">
.
.
.
<path id="maven-ant-tasks.classpath">
<fileset refid="maven-ant-tasks.fileset" />
</path>
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" classpathref="maven-ant-tasks.classpath" />
<target name="define-artifact-properties">
<property name="artifact.group" value="my.org" />
<property name="artifact.name" value="myApp" />
<property name="artifact.version" value="1.9.0-devel.SNAPSHOT" />
<property name="artifact.type" value="jar" />
<property name="artifact.dir" value="${build.dir}/artifacts" />
<property name="artifact.pom" value="${artifact.dir}/${artifact.name}-${artifact.version}.pom" />
</target>
<target name="copy-artifacts" depends="init, define-artifact-properties">
<copy file="${server.jar}" tofile="${artifact.dir}/${artifact.name}-${artifact.version}-server.jar" overwrite="true" preservelastmodified="true" />
<copy file="${dist.ear.dir}/${application.name}.depl" tofile="${artifact.dir}/${artifact.name}-${artifact.version}.depl" overwrite="true" preservelastmodified="true" />
<copy file="${server.ear}" tofile="${artifact.dir}/${artifact.name}-${artifact.version}.ear" overwrite="true" preservelastmodified="true" />
<copy file="${client.jar}" tofile="${artifact.dir}/${artifact.name}-${artifact.version}-client.jar" overwrite="true" preservelastmodified="true" />
<copy file="${server.interfaces.jar}" tofile="${artifact.dir}/${artifact.name}-${artifact.version}-interfaces.jar" overwrite="true" preservelastmodified="true" />
<copy file="${prozess.jar}" tofile="${artifact.dir}/${artifact.name}-${artifact.version}-prozess.jar" overwrite="true" preservelastmodified="true" />
<copy file="${src.zip}" tofile="${artifact.dir}/${artifact.name}-${artifact.version}-sources.jar" overwrite="true" preservelastmodified="true" />
</target>
<!-- deploy-task for creating and writing a temporary pom-file and deploying the artifact beside this pom-file -->
<target name="release-artifacts" depends="init, define-artifact-properties, copy-artifacts">
<fail message="Property 'artifactory.publish.url' muss fuer das Releasen ins Artifactory gesetzt sein!" unless="artifactory.publish.url" />
<fail message="Property 'artifactory.publish.username' muss fuer das Releasen ins Artifactory gesetzt sein!" unless="artifactory.publish.username" />
<fail message="Property 'artifactory.publish.password' muss fuer das Releasen ins Artifactory gesetzt sein!" unless="artifactory.publish.password" />
<mkdir dir="${artifact.dir}" />
<artifact:pom id="tmp.pom" groupid="${artifact.group}" artifactid="${artifact.name}" version="${artifact.version}" packaging="${artifact.type}" name="${artifact.name}" />
<artifact:writepom pomRefId="tmp.pom" file="${artifact.pom}" />
<artifact:deploy file="${artifact.dir}/${artifact.name}-${artifact.version}-server.jar">
<remoteRepository url="${artifactory.publish.url}">
<authentication username="${artifactory.publish.username}" password="${artifactory.publish.password}" />
</remoteRepository>
<attach file="${artifact.dir}/${artifact.name}-${artifact.version}.depl" type="depl" />
<attach file="${artifact.dir}/${artifact.name}-${artifact.version}.ear" type="ear" />
<attach file="${artifact.dir}/${artifact.name}-${artifact.version}-client.jar" classifier="client" type="jar" />
<attach file="${artifact.dir}/${artifact.name}-${artifact.version}-interfaces.jar" classifier="interfaces.jar" type="jar" />
<attach file="${artifact.dir}/${artifact.name}-${artifact.version}-prozess.jar" classifier="prozess.jar" type="jar" />
<attach file="${artifact.dir}/${artifact.name}-${artifact.version}-sources.jar" classifier="sources" type="jar" />
<pom file="${artifact.pom}" />
</artifact:deploy>
</target>
This works fine with normal version. I can find the artifacts on Artifactory as expected. Even versions like "1.9.0-devel-SNAPSHOT" work just fine.
But if I use a version that contains ".SNAPSHOT" (for example "1.9.0-devel.SNAPSHOT") Artifactory adds a timestamp. This might not look like a big deal, but for that reason Artifactory fills up with Snapshots and old Snapshots are not getting deleted. The Maven Snapshot Version Behavior on Artifactory is set to Nonunique so that should prevent the timestamps, but it does not!
It is really strange, how the Artifacts end up in the Repository when using a ".SNAPSHOT"-version, because the Version Folder is correct, but the Artifactnames are wrong:
Here is my repository configuration:
The only Topic I have found so far is this one (Artifactory Snapshot filename handling), but ist does not directly apply to my problem, because I don't want any Timestamps.
I am using Artifactory 3.8.0
Any help and explanations would be greatly appreciated