-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Append generation and publication of Gradle catalog to the release process #224
Comments
@elect86 Yes, sounds good. I'm in the midst of some server migration work right now, but resolving this Gradle catalog goal is on my shortlist after that. Will try to respond in technical detail before next Friday. The timing is good because we need to make a release of pom-scijava 34.0.0 soon; hopefully we can automate the Gradle catalog updates in time to benefit from that. |
@elect86 I took a look at the scijava-catalog. But it is not clear to me what needs to be done:
The parsing logic of If you could give me a primer on what publication of a Gradle catalog entails, that would help me to get started on integrating this work better into pom-scijava and its releases. Thanks! |
@elect86 Still looking for guidance on how to move this forward. I would love to include it soon, but I don't know how to test it. Or maybe @skalarproduktraum, do you know? |
Sorry, I wanted to tackle this but I still haven't got the time, atm I have to work on imgui for scenery |
@elect86 No worries! I'll wait then till you have time to give me some guidance. No rush. 😄 |
@elect86 Here is a kscript that prints out all the dependencies present in the pom-scijava #!/usr/bin/env kscript
@file:DependsOn("org.scijava:scijava-common:2.94.1")
import java.io.File
import java.util.ArrayList
import org.scijava.util.POM
import org.scijava.util.XML
import org.w3c.dom.Element
println("Parsing POM file...")
val pom: POM = POM(File("eff.xml"))
val deps = pom.elements("//project/dependencyManagement/dependencies/dependency")
deps.forEach { dep ->
val g: String = XML.cdata(dep, "groupId")
val a: String = XML.cdata(dep, "artifactId")
val v: String = XML.cdata(dep, "version")
val exclusionsElement: List<Element> = XML.elements(dep, "exclusions")
val exclusions: List<Element> = if (exclusionsElement.isEmpty()) emptyList() else XML.elements(exclusionsElement[0], "exclusion")
println("$g : $a : $v -- # of exclusions = ${exclusions.size}")
} You can generate the mvn -B help:effective-pom | sed '/^[^ \t<]/d' | sed '/^$/d' > eff.xml which interpolates the various POM layers into one flattened POM, with all property values filled in. This is easier to parse, than doing it recursively yourself. The script leans on the scijava-common library's The hope is that the above approach provides a simpler and more robust way of parsing the pom-scijava |
Here is the generated |
Related idea: according to this blog post, there are benefits to publishing Gradle Module Metadata along with pom-scijava. The gradle-module-metadata-maven-plugin is capable of automating that, so perhaps we should start using it? See also this Zulip discussion. |
With cbf7caf, 6388e54, and e48041e, support has begun for supporting Gradle platforms and/or catalogs. Still to do:
|
Hello,
as titled, I'd like to append the generation and publication of Gradle catalog to the release process
Would this be ok for you? What's the best way to achieve this?
The text was updated successfully, but these errors were encountered: