I’m experiencing a problem when deploying an application artifacts to a local Maven repository.
In my build I have the following snippet:
apply plugin: 'maven'
This works fine as long as the artifacts are not marked as snapshot. But when the version string ends with the “-SNAPSHOT” suffix, the application depending on them (which uses the Aether library to lookup them) reports the following error message:
Missing artifact descriptor for io.nextflow:nxf-extrae:jar:0.15.3-SNAPSHOT
Missing artifact descriptor for io.nextflow:nextflow:jar:0.15.3-SNAPSHOT
Missing artifact descriptor for io.nextflow:nxf-commons:jar:0.15.3-SNAPSHOT
Any clue what’s is wrong with that?
I’m still struggling with this issues. I’ve noticed that snapshot artifacts created in the target folder does not have the
-SNAPSHOT suffix, but only the timestamp suffix.
I was expecting to find a
Is this a feature or a bug?
Gradle will upload SNAPSHOT artifacts with a unique timestamp: this is the default behaviour in Maven 2 and the only supported behaviour in Maven 3. So in your example you should expect to see unique snapshots in
However, Gradle can also install the artifacts in your Maven local repository (
~/.m2). Are you saying that Gradle is installing artifacts into
.m2 with unique timestamps, and that no
-SNAPSHOT artifact is created?
Answering my own question, it looks like you might be hitting GRADLE-2711. Gradle is incorrectly using timestamped artifacts when installing into the
.m2 repository. The workaround is to use the ‘maven-publish’ plugin.