对于官网没有的jar包,手动添加时除了要加入jar文件,还要有.pom,.jar.sha1,.pom.sha1文件。生成.jar.sha1,.pom.sha1方法是(以pinyin4j-2.5.0为例):
[color=red]1.手动放入pinyin4j-2.5.0.jar文件.[/color]
[color=red]2.手动编写pinyin4j-2.5.0.pom文件:[/color]
[color=red]3.手动编写build.xml文件:[/color]
[color=red]
4.在服务器上运行ant checksum ,即生成下列文件[/color]
pinyin4j-2.5.0.jar.sha1
pinyin4j-2.5.0.pom.sha1
[color=red]5.pom.xml文件配置:[/color]
[color=red]1.手动放入pinyin4j-2.5.0.jar文件.[/color]
[color=red]2.手动编写pinyin4j-2.5.0.pom文件:[/color]
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.pinyin4j</groupId>
<artifactId>pinyin4j</artifactId>
<version>2.5.0</version>
</project>
[color=red]3.手动编写build.xml文件:[/color]
<project default="checksum">
<target name="checksum">
<checksum file="/home/ftp/m2repo/repository/net/sourceforge/pinyin4j/pinyin4j/2.5.0/pinyin4j-2.5.0.jar" algorithm="SHA" fileext=".sha1"/>
<checksum file="/home/ftp/m2repo/repository/net/sourceforge/pinyin4j/pinyin4j/2.5.0/pinyin4j-2.5.0.pom" algorithm="SHA" fileext=".sha1"/>
</target>
</project>
[color=red]
4.在服务器上运行ant checksum ,即生成下列文件[/color]
pinyin4j-2.5.0.jar.sha1
pinyin4j-2.5.0.pom.sha1
[color=red]5.pom.xml文件配置:[/color]
<dependency>
<groupId>net.sourceforge.pinyin4j</groupId>
<artifactId>pinyin4j</artifactId>
<version>2.5.0</version>
</dependency>