Hi everyone!
I am looking for a way to find out what a given project will publish to a local/remote Maven repo when the corresponding task is executed w/o modifying the project scripts. It looks like org.gradle.tooling.model.gradle.ProjectPublications is supposed to provide that info but I can’t seem to get it populated.
For example, if I take the GitHub - apache/kafka: Mirror of Apache Kafka project. I tried something like
final ProjectConnection connection = GradleConnector.newConnector().forProjectDirectory(kafkaProjectDir).connect();
try {
final ProjectPublications publications = connection.model(ProjectPublications.class).forTasks("generatePomFileForMavenJavaPublication").get();
} finally {
connection.close();
}
The publications I receive are always empty, although I can see the pom-default.xml files generated. Or do I have to actually publish the project to get that model populated?