I want to publish a war-artifact, while still including all the dependencies in the generated war-file
If I create a publication based on “components.web”, the POM-file has no dependencies. This is described in http://www.gradle.org/docs/current/userguide/publishing_maven.html#publishing_maven:publications, and is thus working as documented.
What I am trying to achieve is that the POM-file in fact does reference the dependencies, similar to what you can see in https://repo1.maven.org/maven2/org/activiti/activiti-webapp-explorer2/5.16.4/activiti-webapp-explorer2-5.16.4.pom. Here, packaging=war, but the dependencies-section still lists everything required to build it.
You might have to use ‘myPublication.pom.withXml’ and add the dependencies yourself. What’s the use case?
We are trying to tie together a development environment where we want the user to a) have access to the war file content (html, web-inf, etc), and b) have a rich understanding of the dependencies that went into the war file.
We are currently looking at building two publications instead, one of the jar-file (which includes dependencies) and one of the war-file (without dependencies).
It’s not clear to me exactly what is “the right thing to do” with respect to war file POM’s, but since we saw the activiti-explorer war including dependencies, we wondered if that could also be easily solved with gradle.