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-886] Add fileMappers to BaseFileSet #92

Closed
wants to merge 2 commits into from

Conversation

tcollignon
Copy link
Contributor

Hi

Refer to #91, this PR intend to add an Array of FileMapper to BaseFileSet.
This will fix [MASSEMBLY-886] and [MASSEMBLY-617]

Copy link
Member

@plamentotev plamentotev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

It would be great if you add a test that verifies that your change works and make sure that future changes won't break it. While there is no suitable existing tests in AbstractArchiverTest, I think ZipArchiverTest#testAddArchivedFileSet would do the trick. Among other things it verifies that the InputStreamTransformer is working. Maybe you can add FileMapper and verify it is working. This is just a suggestion of course - feel free to add the test where you think it is most suitable.

Otherwise it looks good to me.

@@ -64,5 +66,12 @@
* @return The transformers.
*/
InputStreamTransformer getStreamTransformer();

/**
* Returns a set of file mappers, which should be used
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better if the comment explicitly states that only the file names are changed. Otherwise combined with the bit misleading name of FileMapper somebody may get the false impression that the files themselves are changed. Of course a quick look at the FileMapper docs would make that clear but I think it will be more developer friendly if the comment is explicit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

of course you right, I add more explicit comment

* Sets a set of file mappers, which should be used
* to change included files.
*/
public void setFileMappers( FileMapper[] fileMappers )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@tcollignon
Copy link
Contributor Author

HI

You've right I need to add a test ! Thx for you help !
Indeed I miss a code, and it was not working

@plamentotev plamentotev added this to the 3.7.0 milestone Jul 28, 2018
@plamentotev
Copy link
Member

Thank you for your contribution. I've bumped the Plexus Archiver version (new API is introduced) , squashed the commits and merged them in master. Also I've striped some extra white spaces at the end of empty lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants