Step by step guide on how to create a webjar for Front-End Application? [closed]

人盡茶涼 提交于 2019-12-23 07:55:01

问题


Hello I've been looking for a step by step guide on how to create a webjar of an existing project. My Front-End project is currently using Angular 2 + webpack, I understand the files need to go in a specific directory META-INF/resources/webjars and that there should be a starter Maven pom file somewhere in the project. The thing is I'm not sure where or how to start implementing this inside my project and so I'm asking here if anyone could help me out or knows where I can find a step by step guide for this.

I plan to use the webjar as a dependency for another project built using Spring Boot. Any help is greatly appreciated.


回答1:


WebJars is really just a packaging of JS / CSS libs that can easily be used as dependencies in Java builds. By putting the contents of these libraries in the META-INF/resources they are automatically available as static resources in most Java web servers. So to create your own JAR that has static resources in the META-INF/resources you can create a JAR however you like. This is usually done with a build tool like Maven or Gradle. If you want to publish that JAR somewhere that anyone can consume as a dependency then most people use Maven Central.



来源:https://stackoverflow.com/questions/42164938/step-by-step-guide-on-how-to-create-a-webjar-for-front-end-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!