elharo commented on PR #379:
URL: 
https://github.com/apache/maven-antrun-plugin/pull/379#issuecomment-5202932294

   It is not possible to achieve this specific fix while maintaining a single 
Ant `FileSet` reference.
   
   An Ant `FileSet` is strictly constrained to a single base directory (defined 
by the `dir` attribute). Because reactor dependencies (located in the project's 
`target` directories) and resolved dependencies (located in the local Maven 
repository) exist in disparate directory trees, a single `FileSet` cannot 
encapsulate both.
   
   However, backward compatibility for users relying on the `<fileset>` syntax 
can be maintained by altering the plugin's approach rather than modifying the 
data type of the existing reference. There are two primary technical solutions:
   
   ### 1. Dual References (Deprecation Approach)
   
   The plugin can maintain the existing `maven.project.dependencies` reference 
as a `FileSet` restricted only to the local repository, preserving legacy 
behavior (and its existing bug regarding reactor dependencies).
   
   A new reference (e.g., `maven.project.dependencies.resources`) can be 
introduced as a `Union` (ResourceCollection) that correctly resolves all 
artifacts regardless of their location. Users who require reactor module 
support can migrate to the new reference using `<resources>`, while existing 
builds remain unbroken.
   
   ### 2. Staging Directory (File I/O Approach)
   
   The plugin can resolve all dependencies (both reactor and local repository), 
and copy or hardlink them into a temporary staging directory within the build's 
`target` directory.
   
   The plugin can then return a standard `FileSet` with its `dir` attribute 
pointing to this staging directory. This maintains full backward compatibility 
with the `<fileset>` tag and includes all artifacts, but introduces disk I/O 
overhead and increases build time.


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