Document settings.xml repositories for Maven command line usage - #531
Merged
Conversation
The Maven command line path leaves the pom.xml untouched, so once rewrite-maven-plugin is no longer published to Maven Central the Code Genome Project repository has to be declared in settings.xml instead: as a pluginRepository for the plugin itself, and as a repository for recipe artifacts passed to rewrite.recipeArtifactCoordinates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Once
rewrite-maven-pluginis no longer published to Maven Central, the Maven command line path breaks: it deliberately leaves thepom.xmluntouched, and the "Maven Command Line" tab only pointed at the Maven POM tab, whosesettings.xmlsnippet just carries credentials. TheRunRecipecomponent's command line tab now shows a fullsettings.xmlwith an always-active profile declaring the Code Genome Project as both apluginRepository(for the plugin) and arepository(for recipe artifacts), and pins the plugin version in the command; the same guidance is added to the "without modifying the build" tutorial, the data tables and styles pages, and therecipeArtifactCoordinatesreference entry.I verified this against the real Code Genome Project repository with artifacts that exist only there: with credentials alone the plugin fails to resolve, with the profile it succeeds, and
rewrite.recipeArtifactCoordinatesresolves from Code Genome both by exact version and viaRELEASE. Note that recipe artifacts resolve against the project's repositories, so declaring only a<pluginRepository>is not enough — that failure is now called out in the plugin reference.LATESTwas also changed toRELEASEin the tutorial, since Code Genome hosts snapshots alongside releases.