处理官网没有的jar包

对于官网没有的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]

<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>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值