Maven包含依赖项删除了一个

时间:2019-01-14 00:39:14

标签: java maven hikaricp

这是我的pom.xml和我到PC上JAR的位置。

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>net.onima</groupId>
  <artifactId>onimaapi</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>OnimaAPI</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.source>1.8</maven.compiler.source>
  </properties>

  <dependencies>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.zaxxer</groupId>
      <artifactId>HikariCP</artifactId>
      <version>2.7.8</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.github.paperspigot</groupId>
      <artifactId>paperspigot</artifactId>
      <version>1.7.10-R0.1-SNAPSHOT</version>
      <scope>system</scope>
      <systemPath>C:\Users\Jules\Desktop\Serveur Local\paperspigot-1.7.10-R0.1-SNAPSHOT.jar</systemPath>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <configuration>
          <filters>

            <filter>
              <artifact>com.zaxxer:HikariCP</artifact>
              <includes>
                <include>**</include>
              </includes>
            </filter>


          </filters>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>

当我设置过滤器以便可以将HikariCP添加到我的jar中时,与我的PC中的jar相关的依赖项已删除,因此我无法进行全新安装。我不明白为什么,有人可以替我解释吗?我对Maven还是很陌生,但仍然为此感到挣扎。

0 个答案:

没有答案