我正在使用带有32位Java的eclipse 2018-09的较旧版本,不确定是否会有所作为。 (使用这些旧版本的项目限制)
我一直在项目中使用默认的Maven插件,到目前为止,除以下内容外,其他所有工具均已正常工作:
<!-- https://mvnrepository.com/artifact/com.github.kilianB/JImageHash -->
<dependency>
<groupId>com.github.kilianB</groupId>
<artifactId>JImageHash</artifactId>
<version>3.0.0</version>
</dependency>
https://mvnrepository.com/artifact/com.github.kilianB/JImageHash/3.0.0
我得到:缺少工件com.github.kilianB:JImageHash:jar:3.0.0
我已经完成了所有必要的工作,清理,安装等...
此罐位于“ JCenter存储库(https://jcenter.bintray.com/)”。
URL和文件都在那里。https://bintray.com/kilianb/maven/JImageHash/3.0.0#files/com%2Fgithub%2FkilianB%2FJImageHash%2F3.0.0
我什至下载了文件和jar。
。m2中没有我的settings.xml,因为我使用的是默认的Eclipse Maven。 pom.xml是默认的,我添加了所需的依赖项。
缺少什么?
提前感谢。
FWIW这是我正在使用的pom
<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>patmangames</groupId>
<artifactId>carddetect</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>resources</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/net.sourceforge.tess4j/tess4j -->
<dependency>
<groupId>net.sourceforge.tess4j</groupId>
<artifactId>tess4j</artifactId>
<version>4.5.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jsoup/jsoup -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.13.1</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.openpnp</groupId>
<artifactId>opencv</artifactId>
<version>4.3.0-1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.11.0</version>
</dependency>
<!-- FAILS TO FIND AND DOWNLOAD-->
<dependency>
<groupId>com.github.kilianB</groupId>
<artifactId>JImageHash</artifactId>
<version>3.0.0</version>
</dependency>
<!-- FAILS TO FIND AND DOWNLOAD-->
</dependencies>
</project>
没有settings.xml
,您只能从MavenCentral获得罐子。
请注意,MavenCentral与mvnrepository无关。在mvnrepository上找到一个jar并不意味着它在MavenCentral中。
事实上,在您的情况下,该jar位于jcenter中,因此您需要编写一个settings.xml
,然后将该存储库添加为<repository>
。