有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java我如何告诉Maven捆绑依赖的JAR

我想用Jmathplot。罐子

我试着把它当作一种依赖

<dependency>
      <groupId>jmathplot</groupId>
      <artifactId>jmathplot</artifactId>
      <version>1.0</version>
      <scope>system</scope>
      <systemPath>${project.basedir}/lib/jmathplot.jar</systemPath>
    </dependency>

但在安装时,我会遇到以下错误:

Some problems were encountered while building the effective model for com.NResearch:dable-start-tRisk:jar:0.1-SNAPSHOT 
[WARNING] 'dependencies.dependency.systemPath' for jmathplot:jmathplot:jar should not point at files within the project directory, ${project.basedir}/lib/jmathplot.jar will be unresolvable by dependent projects @ line 44, column 19 

我怎样才能避开这件事

编辑1:

我无法将Maven更改为将所有依赖的jar包含在一个jar中。因为这是上传到一个网络项目


共 (1) 个答案

  1. # 1 楼答案

    最好的方法是在本地存储库上安装依赖项。为此:

    1)使用project source,使用mvn install安装到本地存储库

    2)如果没有源代码,请使用this安装到本地存储库

    希望能有所帮助

    注:你是在围绕这个问题发垃圾邮件,是吗?(见此处:JMathPlot what is the Maven dependency code please