Skip to content

Instantly share code, notes, and snippets.

@idletekz
Created October 19, 2017 19:34
Show Gist options
  • Save idletekz/0bb69779f92886782f2643b9be4a25ad to your computer and use it in GitHub Desktop.
Save idletekz/0bb69779f92886782f2643b9be4a25ad to your computer and use it in GitHub Desktop.
from wants a file or path. What you're feeding it, generatePomFileForMavenJavaPublication is a task, which is most definitely not a file or path, so that's not going to work.
What you can do is make generatePomFileForMavenJavaPublication a prerequisite for jar and pick up the pom it creates in your build directory.
Something like the following should accomplish this:
jar {
dependsOn generatePomFileForMavenJavaPublication
from("$builddir/pom.xml") //Or whatever path it goes to in the generate task.
into("META-INF/maven/$project.group/$project.name")
}
@idletekz
Copy link
Author

Could not find property 'generatePomFileForMavenJavaPublication' on task ':jar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment