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

Duplicate key error when using enableClasspathAwareImporter and jquery-dist 3.6.0 webjar #89

Open
qsiebers opened this issue Mar 30, 2022 · 0 comments

Comments

@qsiebers
Copy link

I'm running into an error when using the enableClasspathAwareImporter option:

Failed: Duplicate key META-INF/resources/webjars/jquery/dist/jquery.js

This error happens specifically when I use the org.webjars.bowergithub.jquery:jquery-dist:3.6.0 webjar. From what I can see from the code, this is caused by the following files in the webjar:

jar:file:/<redacted>/.m2/repository/org/webjars/bowergithub/jquery/jquery-dist/3.6.0/jquery-dist-3.6.0.jar!/META-INF/resources/webjars/jquery/dist/jquery.js
jar:file:/<redacted>/.m2/repository/org/webjars/bowergithub/jquery/jquery-dist/3.6.0/jquery-dist-3.6.0.jar!/META-INF/resources/webjars/jquery/src/jquery.js

The cause seems to be the WebJarTranslator. convertMatchedPath method not creating unique keys for these files. Note that the only difference is the dist and src path parts.

Should the WebJarTranslator even consider javascript files?

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

No branches or pull requests

1 participant