Maven plugin for dumping dependencies (cross-repo navigation)#735
Maven plugin for dumping dependencies (cross-repo navigation)#735antonsviridov-src merged 20 commits intomainfrom
Conversation
| Provided, | ||
| "org.apache.maven" % "maven-project" % "2.2.1" | ||
| ), | ||
| Compile / resourceGenerators += |
There was a problem hiding this comment.
Maven has a special packaging mode for plugins, which seems to be nothing more than a post-processing step that introspects the plugin's pom.xml + all the Mojo files, then writes the special plugin.xml file.
https://maven.apache.org/guides/plugin/guide-java-plugin-development.html
Setting up a Maven build just for that seems to be counterproductive, so we just write the plugin.xml by hand using a template. It's obviously not great, but at this point I don't see a better solution, and we don't expect this plugin to change very frequently.
plugin.xml will be force-kept in sync by tests, because Maven derives a lot of information from it, so if it's broken - things won't work.
For local development this allows you to do mavenPlugin/publishM2 and use that in maven builds.
olafurpg
left a comment
There was a problem hiding this comment.
LGTM 👍🏻 Very nice to finally have a Maven plugin. After using Gradle more, I've become fonder of Maven for Java projects (although sbt is still the best JVM build tool, haven't tried Mill much)
| Provided, | ||
| "org.apache.maven" % "maven-project" % "2.2.1" | ||
| ), | ||
| Compile / resourceGenerators += |
| if (artifact.getFile() != null) { | ||
| builder.append( | ||
| String.format( | ||
| "%s\t%s\t%s\t%s\n", |
GRAPH-796
This PR adds a maven plugin that can be used to produce
dependencies.txtfile necessary for cross-repo navigation on Sourcegraph.It can be used in a standalone invocation:
Or added directly to maven build and run with
sourcegraph:sourcegraphDependenciesTest plan