Skip to content
Open
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
a8be830
Add specification for dependency:add, dependency:remove, and dependen…
brunoborges Mar 31, 2026
a2ad085
Resolve open design questions in specification
brunoborges Mar 31, 2026
9733943
Implement dependency:add, dependency:remove, and dependency:search goals
brunoborges Mar 31, 2026
813f661
Fix 9 edge cases in dependency management goals
brunoborges Mar 31, 2026
c7b5425
Fix round-2 edge cases: type/classifier matching, NPE guard, dynamic …
brunoborges Mar 31, 2026
6b5f957
Improve search error handling: validate response, extract HTTP error …
brunoborges Mar 31, 2026
d9a7394
Detect property-interpolated dependencies via resolved model cross-re…
brunoborges Mar 31, 2026
e988ed5
Security and validation hardening: XXE protection, scope validation, …
brunoborges Mar 31, 2026
9b433d3
Use originalModel for cross-reference to avoid false positives on inh…
brunoborges Mar 31, 2026
3a938f1
Add Mojo-level tests for all previously untested edge case fixes
brunoborges Mar 31, 2026
329c53f
Add comprehensive documentation: spec updates, Javadoc, site pages, I…
brunoborges Mar 31, 2026
9b37f9a
Fix BOM+XML declaration detection, validate search rows parameter
brunoborges Mar 31, 2026
6f4541a
Add interactive mode to dependency:search goal
brunoborges Mar 31, 2026
d43d072
Fix interactive search edge cases
brunoborges Mar 31, 2026
2567d4c
Add -Dtype/-Dclassifier/-Dbom to remove, support clearing fields on u…
brunoborges Mar 31, 2026
383c204
Fix NONE sentinel creating empty XML elements for new dependencies
brunoborges Mar 31, 2026
38a7d80
Revert README.md to upstream — feature docs belong in site pages
brunoborges Mar 31, 2026
d6e3fce
Fix documentation inaccuracies across spec, site page, and Javadoc
brunoborges Mar 31, 2026
efe4597
Add -Dprofile parameter for profile-scoped dependencies
brunoborges Apr 1, 2026
b076cb6
Require profile to exist — do not create profiles automatically
brunoborges Apr 1, 2026
f6d1e92
Add mojo-level tests for profile-not-found failure
brunoborges Apr 1, 2026
51a2704
Add comprehensive profile test coverage
brunoborges Apr 1, 2026
4b254bd
Add mojo-level tests for core AddDependencyMojo behaviors
brunoborges Apr 1, 2026
6cf67d1
Extract duplicated methods to AbstractDependencyMojo
brunoborges Apr 1, 2026
69d0fda
Code quality: remove dead code, fix patterns, deduplicate
brunoborges Apr 1, 2026
e002f89
Sync spec with code, fix BOM+classifier gap, add 14 tests
brunoborges Apr 1, 2026
6eb2205
Final spec sync and test coverage for module targeting and NONE sentinel
brunoborges Apr 1, 2026
6cf1c9e
Remove -Dmodule parameter in favor of Maven's native -pl flag
brunoborges Apr 1, 2026
03adf21
Remove specification.md from version control
brunoborges Apr 1, 2026
7d924b9
Rename documentation from 'CLI Dependency Management' to 'Managing De…
brunoborges Apr 1, 2026
0ab57fc
Add dependency:add, dependency:remove, and dependency:search to Goals…
brunoborges Apr 1, 2026
cb6439d
Remove specification.md from .gitignore
brunoborges Apr 1, 2026
f1c8715
Auto-update existing dependencies instead of failing
brunoborges Apr 1, 2026
10d8673
Improve documentation on property cross-reference detection
brunoborges Apr 1, 2026
aada3f1
Add dependency:add, remove, and search to usage.apt.vm
brunoborges Apr 1, 2026
26b8c66
Add auto-generated table of contents to Managing Dependencies page
brunoborges Apr 1, 2026
4f2f758
Remove cargo/npm references from documentation
brunoborges Apr 1, 2026
a18c1c5
Address @rmannibucau review feedback on PR #1599
brunoborges Apr 2, 2026
9903dba
Remove test-runtime from VALID_SCOPES to keep PR focused on Maven 3.x
brunoborges Apr 2, 2026
faedbd1
Replace hand-rolled DOM manipulation with DomTrip
brunoborges Apr 3, 2026
13152c5
Remove dependency:search goal to focus PR on add and remove
brunoborges Apr 3, 2026
4ae0011
Use -Dgav only, remove split groupId/artifactId/version params
brunoborges Apr 3, 2026
116a456
Rename DependencyCoordinates to DependencyEntry
brunoborges Apr 3, 2026
2043303
Fix error messages to reference -Dgav instead of removed -Dversion
brunoborges Apr 3, 2026
9c30485
Remove -Dbom flag from add and remove goals
brunoborges Apr 3, 2026
a756b1e
Fix stale documentation references
brunoborges Apr 3, 2026
d6046bc
Use Apache Commons Lang3 in examples instead of Gson
brunoborges Apr 3, 2026
f74c05e
Add design note to DependencyEntry javadoc
brunoborges Apr 3, 2026
d3e86f2
Fix model sync in RemoveDependencyMojo to match on type and classifier
brunoborges Apr 3, 2026
e5e6a86
Add test for model sync type/classifier matching on remove
brunoborges Apr 3, 2026
8a5e16c
Fix audit findings: temp file leak, XXE case bypass, stale javadoc, d…
brunoborges Apr 3, 2026
7cbd853
Fix second audit: stale docs, empty-string normalization, NPE guard, …
brunoborges Apr 3, 2026
5b43f82
Fix third audit: null guards, stale docs, consistent quoting
brunoborges Apr 3, 2026
b9cc608
Add convention auto-detection for dependency:add (align mode)
gnodet Apr 4, 2026
80e0a01
Merge pull request #2 from gnodet/feature/convention-detection
brunoborges Apr 6, 2026
d615098
Improve convention detection: enum, resolved-model check, unit tests
brunoborges Apr 6, 2026
33a1ffb
Use domtrip-maven PomEditor directly
brunoborges Apr 15, 2026
d28aa22
explicitly list used dependency
brunoborges Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ under the License.
<scope>provided</scope>
</dependency>

<!-- domtrip -->
<dependency>
<groupId>eu.maveniverse.maven.domtrip</groupId>
<artifactId>domtrip-maven</artifactId>
<version>1.0.0</version>
</dependency>

<!-- doxia -->
<dependency>
<groupId>org.apache.maven.doxia</groupId>
Expand Down
18 changes: 18 additions & 0 deletions src/it/projects/add-dependency/basic/invoker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:add -Dgav=org.apache.commons:commons-lang3:3.17.0
29 changes: 29 additions & 0 deletions src/it/projects/add-dependency/basic/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>add-dependency-basic</artifactId>
<version>1.0-SNAPSHOT</version>
</project>
25 changes: 25 additions & 0 deletions src/it/projects/add-dependency/basic/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

File pom = new File(basedir, "pom.xml")
assert pom.exists()
def content = pom.text
assert content.contains('<groupId>org.apache.commons</groupId>')
assert content.contains('<artifactId>commons-lang3</artifactId>')
assert content.contains('<version>2.10.1</version>')
18 changes: 18 additions & 0 deletions src/it/projects/add-dependency/gav-shorthand/invoker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:add -Dgav=org.apache.commons:commons-lang3:3.17.0 -Dscope=test
29 changes: 29 additions & 0 deletions src/it/projects/add-dependency/gav-shorthand/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>add-dependency-gav-shorthand</artifactId>
<version>1.0-SNAPSHOT</version>
</project>
26 changes: 26 additions & 0 deletions src/it/projects/add-dependency/gav-shorthand/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

File pom = new File(basedir, "pom.xml")
assert pom.exists()
def content = pom.text
assert content.contains('<groupId>org.apache.commons</groupId>')
assert content.contains('<artifactId>commons-lang3</artifactId>')
assert content.contains('<version>2.10.1</version>')
assert content.contains('<scope>test</scope>')
18 changes: 18 additions & 0 deletions src/it/projects/add-dependency/managed/invoker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:add -Dgav=org.apache.commons:commons-lang3:3.17.0 -Dmanaged
29 changes: 29 additions & 0 deletions src/it/projects/add-dependency/managed/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>add-dependency-managed</artifactId>
<version>1.0-SNAPSHOT</version>
</project>
25 changes: 25 additions & 0 deletions src/it/projects/add-dependency/managed/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

File pom = new File(basedir, "pom.xml")
assert pom.exists()
def content = pom.text
assert content.contains('<dependencyManagement>')
assert content.contains('<groupId>org.apache.commons</groupId>')
assert content.contains('<version>2.10.1</version>')
18 changes: 18 additions & 0 deletions src/it/projects/remove-dependency/basic/invoker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:remove -Dgav=org.apache.commons:commons-lang3
36 changes: 36 additions & 0 deletions src/it/projects/remove-dependency/basic/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>remove-dependency-basic</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.17.0</version>
</dependency>
</dependencies>
</project>
24 changes: 24 additions & 0 deletions src/it/projects/remove-dependency/basic/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

File pom = new File(basedir, "pom.xml")
assert pom.exists()
def content = pom.text
assert !content.contains('<groupId>org.apache.commons</groupId>')
assert !content.contains('commons-lang3')
19 changes: 19 additions & 0 deletions src/it/projects/remove-dependency/not-found/invoker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

invoker.buildResult = failure
invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:remove -Dgav=nonexistent:lib
29 changes: 29 additions & 0 deletions src/it/projects/remove-dependency/not-found/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>remove-dependency-not-found</artifactId>
<version>1.0-SNAPSHOT</version>
</project>
21 changes: 21 additions & 0 deletions src/it/projects/remove-dependency/not-found/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

def log = new File(basedir, "build.log")
assert log.text.contains('not found')
Loading
Loading