Tarun4201 commented on issue #10316:
URL: https://github.com/apache/maven/issues/10316#issuecomment-5855183533

   ### Solution & Implementation Summary for [MNG-8758] Maven CLAPP
   
   We have implemented the Maven CLAPP (Command Line App) feature on branch 
`feature/MNG-8758-clapp` (Commit `6b4bd5521aae7f33b84a337b02ef27b377a6ba56`).
   
   #### Key Architectural Changes
   1\. **`MavenClappCling` Entry Point**:
      - Added `org.apache.maven.cling.MavenClappCling` which handles isolated 
class-loading for extra Maven CLI tools.
      - Dynamically builds a `URLClassLoader` pointing to 
`${maven.home}/lib/clapp/<toolName>/` jars and delegates execution to the 
tool's main class.
   2\. **ClassWorlds & Assembly Configuration**:
      - Updated `m2.conf` to include `optionally 
${maven.home}/lib/clapp/${maven.clapp.name}/*.jar`.
      - Updated `component.xml` to include `lib/clapp/` in Maven distribution 
builds.
   3\. **Launcher Script (`mvn`)**:
      - Added support for `--clapp <toolName>` and `--clapp=<toolName>`.
      - Reads `clapp.properties` (key `mainClass`) from 
`${maven.home}/lib/clapp/<toolName>/`.
      - Injects `-Dmaven.clapp.name` and `-Dmaven.clapp.mainClass` system 
properties.
   4\. **Tests & Documentation**:
      - Added `MavenClappClingTest` covering jar collection, classloader 
creation, and error handling.
      - Added `lib/clapp/README.txt` detailing directory specification and 
configuration format.


-- 
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]

Reply via email to