Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DRYing the webjars versions in leaf projects #139

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

Closed
wants to merge 1 commit into from

Conversation

rdlopes
Copy link
Contributor

@rdlopes rdlopes commented Feb 18, 2017

Hi guys,
thanks for your great job at explaining me what this Spring Boot + AngulasJS was all about!

I felt I could pay you back with a little help: DRYing webjars versions.

Indeed, first version of the tutorial shows a nice mechanism to filter properties in wro4J file but the Github version gets rid of that nice feature, probably to correct previous compatibility issues with bootstrap CSS files.

In this pull request, I suggest creating jquery, bootstrap and AngularJS versions in one place, Maven properties, and then take advantage of the neat Spring filtering @variable@ to inject versions.

This way, versions for webjars are defined once and for all, and injected magically by Spring.

And my IntelliJ IDEA now can resolve the CSS and JS files since they are present in the generated-resources folder! (makes me happy when IntelliJ stops complaining)

Some notes about the correction:

1- Some wro.xml files were not processing the main.less file since there was still the @project.basedir@ mention in it
2- I fought myself not to promote the properties to the root pom.xml (I guess it was more convenient for tutorial scoping/chunking to have it defined in leaf projects)
3- I changed the Wro configuration folder to become the ${project.build.directory}/wro since once the resources plugin kicks in, we have everything filtered there.

Hope this helps you keeping up with your good work.

Thanks again!

@pivotal-issuemaster
Copy link

@rdlopes Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@rdlopes Thank you for signing the Contributor License Agreement!

@dsyer dsyer closed this in 9cc7abf Feb 19, 2017
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.

2 participants