1. Create a directory: for example, tag-libraries
2. Create another directory under Tag-libraries: Meta-inf (required)
3. Put the ". TLD" file you wrote in the "Meta-inf" directory and return to the Tag-libraries
4. Put your class file in this directory: for example Com.demo ....
5. Place the resource file under the Resource folder under Meta-inf
Step two: Package as Jar
1. Run cmd, enter command: Jar CVF my-taglib.jar meta-inf com
You can also directly use MAVEN to package
<resources>
<resource>
<directory>src/main/webapp/resources</directory>
<targetPath>META-INF/resources/resources</targetPath>
<includes>
<include>**/*.css</include>
<include>**/*.less</include>
<include>**/*.js</include>
<include>**/*.png</include>
<include>**/*.gif</include>
<include>**/*.jpg</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/webapp/WEB-INF</directory>
<targetPath>META-INF</targetPath>
<includes>
<!--<include>**/*.xml</include>-->
<include>**/*.tld</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
Custom labels packaged for other project references