java-client-api icon indicating copy to clipboard operation
java-client-api copied to clipboard

Added pom.xml file to try out github's Dependency Graph

Open rjrudin opened this issue 3 years ago • 3 comments

I'd like to get this added to the master branch so that I can see what Insight / Dependency Graph shows in github - in particular, I want to see what the Dependents view shows. Adding it to the develop branch won't help because github only cares about what's on the master branch. And this has to be a Maven pom.xml file instead of a Gradle build.gradle file since the Dependency Graph feature only supports Maven and not Gradle.

rjrudin avatar Jul 19 '21 17:07 rjrudin

This can be reverted from master once the results of the Dependency Graph are visible.

rjrudin avatar Jul 19 '21 17:07 rjrudin

I'm using this task to generate the pom file dynamically, which includes a comment noting the purpose of the file:

task generatePomForDependencyGraph(dependsOn: "generatePomFileForMainJavaPublication") {
	description = "Prepare for a release by making a copy of the generated pom file in the root directory so that it " +
		"can enable Github's Dependency Graph feature, which does not yet support Gradle"
	doLast {
		def preamble = '<?xml version="1.0" encoding="UTF-8"?>'
		def comment = "<!--\n" +
			"This file was generated via Gradle and is being used primarily for github's Dependency Graph feature.\n" +
			"It is not intended to be used to build this project.\n" +
			"-->"
		def fileText = file("build/publications/mainJava/pom-default.xml").getText()
		file("pom.xml").setText(fileText.replace(preamble, preamble + comment))
	}
}

rjrudin avatar Jul 23 '21 13:07 rjrudin

Hi @rjrudin . Should we merge this pull request?

anu3990 avatar Aug 22 '22 19:08 anu3990

I'm going to update this soon for our upcoming 5.6.0 release.

rjrudin avatar Sep 28 '22 19:09 rjrudin