I am trying out FUSE bundles (http://fuse.fusesource.org/bundle/faq.html). To use them, I have to place the POM for a jar inside the jar in the directory: “META-INF/maven/groupId/artifactId/pom.xml”
How would I go about placing the pom generated by that plugin inside the jar at the location described by the groupID/artifactID that was put in the pom?
I thought it was something like that, but I get this (the publication is mavenJava):
What went wrong: A problem occurred evaluating project ‘:example’. > No such property: generatePomFileForMavenJavaPublication for class: org.gradle.api.internal.file.copy.CopySpecImpl_Decorated
$ gr :example:clean :example:jar
Parallel execution with configuration on demand is an incubating feature.
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\path\to\example\build.gradle' line: 3
* What went wrong:
A problem occurred evaluating project ':example'.
> No such property: generatePomFileForMavenJavaPublication for class: org.gradle.api.internal.file.copy.DefaultCopySpec_Decorated
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 5.898 secs
$ gr --version
------------------------------------------------------------
Gradle 1.9-20131003220019+0000
------------------------------------------------------------
Build time:
2013-10-03 22:00:19 UTC
Build number: none
Revision:
7970ec3503b4f5767ee1c1c69f8b4186c4763e3d
Groovy:
1.8.6
Ant:
Apache Ant(TM) version 1.9.2 compiled on July 8 2013
Ivy:
2.2.0
JVM:
1.7.0_21 (Oracle Corporation 23.21-b01)
OS:
Windows 7 6.1 amd64
Here is the jist of my build script (The line number will not match with above because this is actually a multiproject build with some of this in 'subprojects sections of the main build.gradle)
Yes, and it generates the pom I would expect. I did notice this in the documentation:
The “maven-publish” plugin leverages some experimental support for late plugin configuration, and any GenerateMavenPom tasks will not be constructed until the publishing extension is configured. The simplest way to ensure that the publishing plugin is configured when you attempt to access the GenerateMavenPom task is to place the access inside a publishing block, as the above example demonstrates.
Do I have to wrap this jar part in a publishing block? Would that even work?