You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2019/03/17 11:24:17 UTC

[GitHub] [maven-assembly-plugin] plamentotev commented on issue #5: MASSEMBLY-617 : add ability to set fileMappers in FileSet in maven as…

plamentotev commented on issue #5: MASSEMBLY-617 : add ability to set fileMappers in FileSet in maven as…
URL: https://github.com/apache/maven-assembly-plugin/pull/5#issuecomment-473656272
 
 
   Hi @tcollignon,
   
   The problem is not that much with the verbosity of the code, but that is the list of file mappers is practically hard coded. If you want to add another one you'll need to change the `AddDirectoryTask` as well. You can get a `FileMapper` instance from Plexus using its role so you can avoid hard coding the instances. The bigger problem is how to configure them. Unfortunately the interface does not contain means to configure them so the only option is through reflection. You can take a look how `Archiver` is configured - org.apache.maven.plugins.assembly.archive.DefaultAssemblyArchiver#configureArchiver. You need something similar for MDO, but I'm not too familiar with it myself. I guess you can add field of type `DOM` that can contain arbitrary XML so you can use it to configure the `FileMapper` instances.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services