Skip to content

[MDEP-425] - Add list-plugin-repositories goal#3

Closed
mattnelson wants to merge 1 commit intoapache:masterfrom
mattnelson:mdep-425
Closed

[MDEP-425] - Add list-plugin-repositories goal#3
mattnelson wants to merge 1 commit intoapache:masterfrom
mattnelson:mdep-425

Conversation

@mattnelson
Copy link
Copy Markdown

https://issues.apache.org/jira/browse/MDEP-425
Replacement PR for apache/maven-plugins#113

Add list-plugin-repositories goal to supplement the list-repositories goal.

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MDEP-XXX] - Fixes bug in ApproximateQuantiles,
    where you replace MDEP-XXX with the appropriate JIRA issue. Best practice
    is to use the JIRA issue title in the pull request title and in the first line of the
    commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its clean verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@elharo
Copy link
Copy Markdown
Contributor

elharo commented Jun 30, 2020

closing in favor of #51

@elharo elharo closed this Jun 30, 2020
@jira-importer
Copy link
Copy Markdown

Resolve #868

brunoborges added a commit to brunoborges/maven-dependency-plugin that referenced this pull request Mar 31, 2026
Bugs fixed:
- #1 -Doptional=true now correctly emits <optional>true</optional>
  (was declared but never passed to PomEditor)
- #2 XML namespace-aware parsing: PomEditor now uses
  setNamespaceAware(true) and localName() matching, so POMs with
  xmlns="http://maven.apache.org/POM/4.0.0" work correctly

Robustness improvements:
- apache#3 Atomic file writes: save() writes to a temp file then renames,
  preventing corruption from concurrent POM modifications
- apache#4 GAV trailing colons: split(":", -1) preserves trailing empties;
  empty groupId/artifactId now rejected with clear error messages
- apache#5 JSON escaped quotes: extractStringField() now handles \" and
  \\ in JSON string values instead of using a naive regex

Formatting preservation:
- apache#6 XML declaration preserved: POMs without <?xml?> no longer get one
  added; standalone="no" attribute no longer injected
- apache#7 Indent detection improved: GCD-based analysis across all indented
  lines instead of using only the first indented line
- apache#8 UTF-8 BOM preserved: BOM marker detected on load and re-emitted
  on save
- apache#9 Comment cleanup on remove: preceding XML comments associated with
  a removed dependency are now also removed

48 tests (14 new), all passing. Full existing test suite unaffected.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
brunoborges added a commit to brunoborges/maven-dependency-plugin that referenced this pull request Mar 31, 2026
…pdate

Fix #1: dependency:remove now has explicit -Dtype, -Dclassifier, and
-Dbom parameters, matching dependency:add's parameter parity. The -Dbom
flag is shorthand for -Dmanaged -Dtype=pom, making BOM removal as
simple as: mvn dependency:remove -Dgav=g:a -Dbom

Fix #2: dependency:add -DupdateExisting can now clear fields:
- -Dscope=NONE removes the <scope> element
- -Dtype=NONE removes the <type> element
- -Dclassifier=NONE removes the <classifier> element
- -Doptional=false removes the <optional> element
The 'optional' parameter changed from boolean to Boolean so null
(not specified) is distinguishable from false (explicitly clear).
PomEditor.updateDependency() treats empty strings as remove signals.

Fix apache#3: Interactive search re-query behavior is by design (documented
in code comments) — more powerful than local filtering since it
leverages the full Maven Central search index.

6 new tests, 404 total pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants