Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MASSEMBLY-617] add ability to give a fileSuffix to a FileSet #4

Closed
wants to merge 1 commit into from

Conversation

tcollignon
Copy link

Hi

In order to fix https://issues.apache.org/jira/browse/MASSEMBLY-617, I need to add a capability to add file suffix to a FileSet
This PR add this feature, but it need sonatype/plexus-archiver#25 and sonatype/plexus-io#7

Tell me if something goes wrong

@plamentotev
Copy link

The same functionality can be achieved using FileMapper. It would be great if you consider implementing it using file mappers as that would solve other uses cases as well (for example MASSEMBLY-886). For example on how to implement such functionality you can take a look here - https://www.mojohaus.org/xml-maven-plugin/examples/transform-change-extension.html

@tcollignon
Copy link
Author

Hi

Thank for your tips @plamentotev, I will take a look at FileMapper and see if I can update this PR to use directly it.

@tcollignon
Copy link
Author

I don't know a lot of things in this plugin. The InputStreamTransformer is not the same of the FileMapper right ?

@plamentotev
Copy link

No. InputStreamTransformer modifies the content of the file (like changing the line ending). FileMapper changes the file name based on some logic (so it is actually a file name mapper). You need to make a similar change to one already did. But instead of String you need to configure an array of org.codehaus.plexus.components.io.filemappers.FileMapper. And after that you need to propagate the array to AbstractPlexusIoResourceCollection. I don't think BaseFileSet accepts FileMapper[] so I think you need to change it as well.

Hope this helps.

@tcollignon
Copy link
Author

Thx for your precious help, I will try to implement this

@tcollignon
Copy link
Author

This PR can be closed, because I work in #5

@olamy olamy closed this Jan 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants