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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With