AbstractAntTaskBackedMavenPublisher prevents multiple maven artifacts without a classifier


(Justin Ryan) #1

I’m adding signatures to a MavenPublication. These signatures have no classifier, but do have a different extension than the file they are signing. This makes them unique in the publication. But when AbstractAntTaskBackedMavenPublisher.determineMainArtifact (https://github.com/gradle/gradle/blob/master/subprojects/maven/src/main/groovy/org/gradle/api/publish/maven/internal/publisher/AbstractAntTaskBackedMavenPublisher.java#L90) is called it throws an exception because it can’t determine which is the main artifact. But the eror isn’t congruent with a valid maven publication, i.e. not all artifacts require a classifier. I believe this filtering could be improved to include the POM’s packaging type.

If there’s a JIRA create, I could possible fix this. But it should would be nice to have a work around in the meanwhile.


(Luke Daley) #2

Raised GRADLE-2999.

I can’t see a workaround unfortunately, besides not using the new publishing stuff.