Tarun4201 commented on PR #13277:
URL: https://github.com/apache/maven/pull/13277#issuecomment-5856609472
@elharo Thank you for the review and feedback!
To address your questions:
### 1. To what extent is this user-facing?
- **End users**: Users can invoke CLI extensions without manual classpath
configuration via:
- ```bash
- mvn --clapp <toolname> [args...]
- mvn --clapp=<toolname> [args...]
- ```
- Both Unix (`mvn`) and Windows (`mvn.cmd`) launchers are supported.
- - **Third-party tool authors**: Developers can package standalone CLI
tools inside `${maven.home}/lib/clapp/<toolname>/` with their private JAR
dependencies, completely isolated from the core Maven classpath (avoiding
dependency pollution and version conflicts) while still having full access to
Maven core APIs.
### 2. Documentation Updates
In commit `b0314a42`, we added comprehensive documentation:
1. **Developer Guide**: Created
[`clapp.md`](https://github.com/apache/maven/pull/13277/files#diff-75b4737d92cbce6f7f3f619e0750c1840ea89b9643dcfc50b6910793c2fbbe39)
under `api/maven-api-cli/src/site/markdown/clapp.md` covering:
2. - Architecture & classloader delegation model (child `URLClassLoader`
delegating to `plexus.core`)
3. - Directory structure under `${maven.home}/lib/clapp/<toolname>/`
4. - `clapp.properties` descriptor format (`mainClass=...`)
5. - Entry point contract (`public static int main(String[] args,
ClassWorld world)`)
6. - Exception handling and error categories
7. 2. **Site Index**: Updated `api/maven-api-cli/src/site/markdown/index.md`
linking to the CLAPP guide alongside `mvn`, `mvnenc`, `mvnsh`, and `mvnup`.
8. 3. **Distribution README**: Updated
`apache-maven/src/assembly/maven/lib/clapp/README.txt` with entry-point details
and documentation references.
### 3. Exception Hierarchy
Per your inline comment, we replaced the use of `IOException` for reflection
and configuration errors with a dedicated `MavenClappCling.ClappException`
(subclass of `MavenException`), and use `IllegalArgumentException` for
parameter/path validation. Unit tests in `MavenClappClingTest` have been
updated accordingly.
Could you please re-review and consider approving this PR for merge when you
have a moment? Thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]