Skip to content
New issue

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

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

Already on GitHub? # to your account

Remove old files from m2e-wtp/web-resources #8

Open
micmeyer opened this issue Feb 2, 2013 · 2 comments
Open

Remove old files from m2e-wtp/web-resources #8

micmeyer opened this issue Feb 2, 2013 · 2 comments

Comments

@micmeyer
Copy link
Contributor

micmeyer commented Feb 2, 2013

I'm using one of wro4j's naming strategies:
namingStrategy=hashEncoder-CRC32

This means that after each change to a css (or js) file the resulting file in m2e-wtp/web-resources has a different name.

E.g
default-6b47b395.css
default-cc71650b.css
default-e7657916.css

It seems that at the moment m2e-wro4j does not remove the old files. So after each change there are more files in the m2e-wtp/web-resources folder. Unfortunately there is no way at runtime to determine which of these files is the current one.

@micmeyer
Copy link
Contributor Author

micmeyer commented Feb 3, 2013

After looking at the source code I come to the conclusion that this is not a m2e-wro4j issue.

This change would have to be implemented in the wro4j maven plugin. And even there it would be difficult to implement a 100% correct solution since users have the possibility to implement custom naming conventions.

@ArloL
Copy link
Contributor

ArloL commented Jul 3, 2013

Not sure whether this is what you need but you can use the groupNameMappingFile option to find out which css file is the one that is currently in use. It will look like this:

#Mapping of defined group name to renamed group name
#Wed Jul 03 09:52:13 CEST 2013
main.css=main-98717e95eaa7c6f9ab78741f1bbbd0094ff843ed.cache.css
main.js=main-da39a3ee5e6b4b0d3255bfef95601890afd80709.cache.js

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants