[Gradle] Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
See original GitHub issueRunning any Gradle task triggers lots of Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
messages.
Example build.gradle
to reproduce:
plugins {
id 'java-gradle-plugin'
id 'groovy'
id 'maven-publish'
id 'com.jfrog.artifactory' version '4.13.0'
}
group = "com.example.artifactory.gradle.test"
version = "1.2.3.9"
dependencies {
implementation gradleApi()
implementation localGroovy()
implementation "com.google.guava:guava:28.2-jre"
}
gradlePlugin {
plugins {
simplePlugin {
id = 'com.example.artifactory.gradle.test'
implementationClass = 'com.example.artifactory.gradle.test.TestPlugin'
}
}
}
artifactory {
contextUrl = "${artifactory_contextUrl}"
publish {
repository {
repoKey = 'publish-test'
username = artifactory_user
password = artifactory_password
maven = true
}
defaults {
// this is needed because some of our project produce no artifacts but have dependencies (in lots of different custom configurations)
configurations.each { conf ->
if (conf.canBeResolved) publishConfigs(conf.name)
}
// this is needed because otherwise the artifactory plugin does _NOTHING_ publishToMavenLocal works just fine...
project.publishing.publications.each { pub ->
publications(pub.name)
}
publishPom = true
}
}
resolve {
repository {
repoKey = 'dependencies'
username = artifactory_user
password = artifactory_password
maven = true
}
}
}
16:57:30 Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
16:57:30 Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
16:57:30 Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
16:57:30 Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
16:57:30 Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
16:57:30 Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
16:57:30 Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
16:57:30 Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
16:57:30 Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
16:57:30 Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
16:57:30 Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
16:57:30 Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
16:57:30 Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
16:57:30 Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a custom pom path.
16:57:30 > Task :compileJava NO-SOURCE
16:57:42 > Task :compileGroovy
16:57:42 > Task :pluginDescriptors
16:57:42 > Task :processResources
16:57:42 > Task :classes
16:57:42 > Task :jar
16:57:42 > Task :assemble
16:57:42 > Task :pluginUnderTestMetadata
16:57:42 > Task :artifactoryPublish
16:57:42 Deploying artifact: https://artifactory/artifactory/publish-test/com/example/artifactory/gradle/test/gradle-plugin-test/1.2.3.9/gradle-plugin-test-1.2.3.9.jar
16:57:43 > Task :artifactoryDeploy
16:57:43
16:57:43 BUILD SUCCESSFUL in 23s
16:57:43 7 actionable tasks: 7 executed
Expected behavior:
- I expect that such a simple project (in terms of build.gradle setup of artifacts and dependencies) automatically publishes all artifacts, that
publishToMavenLocal
would publish, to artifactory. - I expect that all dependencies of the build are listed in the build info of such a build (running with Jenkins) also of subprojects that have no artifacts! -> see also inline comments above
- and while we are at this: why are the build dependencies not published in the build infos? having bad jars on the build classpath is also something I would want to get notified by Xray.
So far it seems to be impossible to publish all artifacts and have all dependencies in the build-info without also having MEGABYTES of the warning above in the build logs (our actual builds have many more subprojects obviously)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:7
Top Results From Across the Web
Cannot publish pom for project ':' it does not contain the ...
Cannot publish pom for project ':' it does not contain the Maven plugin install task and task ':artifactoryPublish' doesn't specify a custom pom...
Read more >Failure: Could not determine which tasks to execute - Old Forum
I am getting the following error: $ gradle ProjectRoot:artifactoryPublish Cannot publish pom for project ':' since it does not contain the Maven plugin...
Read more >Jenkins Artifactory Plugin Cannot Generate POM with Maven ...
Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does not specify a...
Read more >Not able to publish the pom file with maven-publish plugin in ...
Cannot publish pom for project ':' since it does not contain the ... task and task ':artifactoryPublish' does not specify a custom pom...
Read more >[Artifactory-users] Publish a zip and pom from a non-java ...
Cause (ref log): "Cannot publish pom for project ':' since it does not contain the Maven plugin install task and task ':artifactoryPublish' does...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Anyone found answer?
I’m using Gradle 6.9. Plugin version 4.29.0. Single project.
It does appear to be publishing the pom (see below). Maybe the error is spurious?