Resource files are no longer relocated #93

Closed
pron opened this Issue Aug 31, 2014 · 7 comments

Comments

Projects
None yet
2 participants
@pron

pron commented Aug 31, 2014

Hi.
I've just upgraded from 0.8 to 1.1.1, and noticed that resource (non-class) files are no longer relocated. Is there a way to relocate them?

@pron

This comment has been minimized.

Show comment
Hide comment
@pron

pron Aug 31, 2014

Correction: it seems like the reference to the resource files (in the classes) are re-mapped to their supposed new location, it's just that the resource files themselves aren't moved.

pron commented Aug 31, 2014

Correction: it seems like the reference to the resource files (in the classes) are re-mapped to their supposed new location, it's just that the resource files themselves aren't moved.

@johnrengelman

This comment has been minimized.

Show comment
Hide comment
@johnrengelman

johnrengelman Sep 2, 2014

Owner

How are you doing the relocation? Relocation only applies to Java Class files because it has to do with changing package names and rewriting those in the corresponding .class files.

Owner

johnrengelman commented Sep 2, 2014

How are you doing the relocation? Relocation only applies to Java Class files because it has to do with changing package names and rewriting those in the corresponding .class files.

@pron

This comment has been minimized.

Show comment
Hide comment
@pron

pron Sep 2, 2014

relocate 'org.', 'mydom.org.'
  • Relocation also has to do with changing files' paths.
  • 0.8 relocated resource files as well as classes.
  • The references to the resources are being transformed in the current version (e.g., ...getResourceAsStream("org/...") is (correctly) being turned into ...getResourceAsStream("mydom/org/..."))
  • Resource files should be relocated because the shadow plugin is meant to prevent collisions (i.e. if some other transformation isn't applied).
  • AFAIK (I may be wrong) the Maven Shade plugin also relocates resource files

pron commented Sep 2, 2014

relocate 'org.', 'mydom.org.'
  • Relocation also has to do with changing files' paths.
  • 0.8 relocated resource files as well as classes.
  • The references to the resources are being transformed in the current version (e.g., ...getResourceAsStream("org/...") is (correctly) being turned into ...getResourceAsStream("mydom/org/..."))
  • Resource files should be relocated because the shadow plugin is meant to prevent collisions (i.e. if some other transformation isn't applied).
  • AFAIK (I may be wrong) the Maven Shade plugin also relocates resource files

@johnrengelman johnrengelman added this to the 1.1.2 milestone Sep 8, 2014

@johnrengelman johnrengelman added the bug label Sep 8, 2014

@johnrengelman johnrengelman modified the milestones: 1.1.3, 1.1.2 Sep 9, 2014

@pron

This comment has been minimized.

Show comment
Hide comment
@pron

pron Nov 24, 2014

Hi.
Just tried 1.2.0 and unfortunately this doesn't seem to work (i.e. the problem persists exactly as reported before).

pron commented Nov 24, 2014

Hi.
Just tried 1.2.0 and unfortunately this doesn't seem to work (i.e. the problem persists exactly as reported before).

@pron

This comment has been minimized.

Show comment
Hide comment
@pron

pron Nov 24, 2014

OK, I think the problem is that you've applied the fix to visitFile but not to visitArchiveFile, so the relocation is not applied on dependencies.

pron commented Nov 24, 2014

OK, I think the problem is that you've applied the fix to visitFile but not to visitArchiveFile, so the relocation is not applied on dependencies.

@johnrengelman

This comment has been minimized.

Show comment
Hide comment
@johnrengelman

johnrengelman Nov 24, 2014

Owner

ah, my bad. I'll have a patch later today.

Owner

johnrengelman commented Nov 24, 2014

ah, my bad. I'll have a patch later today.

@pron

This comment has been minimized.

Show comment
Hide comment
@pron

pron Nov 24, 2014

Thanks!

pron commented Nov 24, 2014

Thanks!

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