0

I'm using the gradle maven-publish plugin.

gradlew tasks

Publishing tasks


generatePomFileForMavenWebPublication - Generates the Maven POM file for publication 'mavenWeb'.

publish - Publishes all publications produced by this project.

publishMavenWebPublicationToMavenLocal - Publishes Maven publication 'mavenWeb' to the local Maven repository.

publishMavenWebPublicationToRemoteArtifactoryRepository - Publishes Maven publication 'mavenWeb' to Maven repository 'remoteArtifactory'.

publishToMavenLocal - Publishes all Maven publications produced by this project to the local Maven cache.

I'd like to execute the 'assemble' task before 'publishMavenWebPublicationToRemoteArtifactoryRepository':

publishMavenWebPublicationToRemoteArtifactoryRepository.dependsOn assemble

However, I get an error:

Could not find property 'publishMavenWebPublicationToRemoteArtifactoryRepository' on root project 'MyProject'?

Any idea on how to ensure 'publishMavenWebPublicationToRemoteArtifactoryRepository' depends on 'assemble'?

Thanks

Mark

Community
  • 1
  • 1
Mark Thomas
  • 141
  • 1
  • 6

1 Answers1

1
publish {
  dependsOn assemble 
}

this should work

Jakim
  • 1,713
  • 7
  • 20
  • 44