且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在maven构建期间找不到外部jar的类文件?

更新时间:2023-11-10 18:36:58

您需要安装外部jar 本地存储库的方式如下:

You need to install your external jar in local repository in following way:

mvn install:install-file -Dfile=c:\kaptcha-{version}.jar -DgroupId=com.google.code -DartifactId=kaptcha -Dversion={version} -Dpackaging=jar

并在pom中添加以下依赖项:

and add the following dependency in pom:

<dependency>
      <groupId>com.google.code</groupId>
      <artifactId>kaptcha</artifactId>
      <version>2.3</version>
 </dependency>

请替换外部jar的值对于 c:\kaptcha- {version} .jar

再次构建并告诉我结果。

Build again and tell me the result.

您还可以查看 http://www.mkyong.com/maven/how-to-include-library-manully-into-maven-local-repository/