摘要:今天领导说要把自己定义的样式文件和js文件打成一个自定义的webjar,所以就写了一下,现在记录一下:
1. 先把要打包成webjar的文件放到你新建的maven结构的项目的/src/main/resources目录下
2.编写该项目的pom.xml文件,如下:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.webjars</groupId>
<artifactId>neris-pm-ui</artifactId>
<version>0.0.1-SNAPSHOT</version><name>neris-pm-ui</name>
<url>http://maven.apache.org</url><properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><destDir>${project.build.outputDirectory}/META-INF/resources/</destDir>
</properties><build><resources><resource><directory>${project.basedir}/src/main/resources</directory><targetPath>${destDir}</targetPath></resource></resources>
</build></project>