java - Maven包含依赖删除一个
问题描述
这是我pom.xml
在我的电脑中的一个 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 很陌生,但仍在努力。
解决方案
推荐阅读
- python - 使用对极几何和球体寻找对应关系(计算机视觉 strero)
- xamarin.forms - Visual Studio 中 xamarin iOS 中的 DarkMode 图像
- php - Laravel 8 - 将数据存储为 JSON 并检索关系
- python - 如何使用python和sqlserver执行sql脚本并将输出保存在文本文件中
- episerver - 内容安全策略的 reCaptcha v3 控制台错误
- vue.js - 当我使用 $router push 它返回一个错误
- google-bigquery - BigQuery sql将一致的单值转换为多行值
- gitlab - GitLab 合并请求返回“500 内部服务器错误”
- python - 在数据框中填充日期
- java - SSL 证书在 Chrome (Windows/iOS) 上有效,但在 Elastic Beanstalk 调用时不适用于 Safari 或移动设备