在maven库中找不到pinyin4j的pom文件,自己写一个,然后写一个build文件,然后生成pinyin4j-2.5.0.jar.sha1
pinyin4j-2.5.0.pom.sha1 2个文件,就行了
pom.xml:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.pinyin4j</groupId>
<artifactId>pinyin4j</artifactId>
<version>2.5.0</version>
</project>
build.xml:
<project default="checksum">
<target name="checksum">
<checksum file="C:/Users/chenzhe/.m2/repository/pinyin4j/pinyin4j/2.5.0/pinyin4j-2.5.0.jar" algorithm="SHA" fileext=".sha1"/>
<checksum file="C:/Users/chenzhe/.m2/repository/pinyin4j/pinyin4j/2.5.0/pinyin4j-2.5.0.pom" algorithm="SHA" fileext=".sha1"/>
</target>
</project>
运行ant checksum 命令生成 sha1文件
本文介绍了如何在Maven环境中为pinyin4j库创建pom文件,并通过构建文件生成SHA1文件的过程,确保了库的完整性验证。
4008

被折叠的 条评论
为什么被折叠?



