Can't deploy SNAPSHOT artifacts to local maven repo


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'

uploadArchives {
	repositories {
		mavenDeployer {
			repository(url: "file://path/to/my/repo/")

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.

For example:


I was expecting to find a nextflow-0.16.3-SNAPSHOT.jar file.

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 file://path/to/my/repo/.

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.