Hi, my custom plugin creates custom artifacts with zip extension and has also a custom configuration that needs to be written to the pom.
I created a custom “Software component” similar to the WebApplication.
and added it in the plugin like this:
ArchivePublishArtifact webbundleArtifact = new ArchivePublishArtifact(assembleWebbundleTask);
project.getExtensions().getByType(DefaultArtifactPublicationSet.class).addCandidate(webbundleArtifact);
project.getComponents().add(new WebbundleComponent(webbundleArtifact))
And configured the publication like this:
project.publishing {
publications {
webbundle(MavenPublication) {
from project.components.webbundle
}
}
}
The publish task seems to work but I have a few problems now: - the pom does not contain any dependencies. - how should I map my custom configuration (“webbundle”) to the a custom pom scope (also “webbundle”). I read something that I need to overwrite this manually with pom.withXML, is this still valid?
- if I need to write it via “pom.withXML” I don’t understand how then later on gradle is able to resolve these custom dependencies again in another project?
Thanks in advance
Max
ps: a bit of topic but is there any preview option when I create a post/topic?