如何解决"Could not find artifact com.ohadr:authentication-flows"?

How to solve "Could not find artifact com.ohadr:authentication-flows"?

我试过:
mvn clean install -DskipTests -DdownloadSources=true
用于建筑 https://github.com/OhadR/Authentication-Flows.git
我有:

...Failed to execute goal on project client: Could not resolve dependencies for project com.ohadr.auth-flows:client:war:1.0.0-SNAPSHOT: Could not find artifact com.ohadr:authentication-flows:jar:1.6.2-SNAPSHOT... The POM for com.ohadr:authentication-flows:jar:1.6.2-SNAPSHOT is missing, no dependency information available...


接下来,我尝试添加这个存储库:

     <repository>
       <id>central-maven</id>
       <name>Central Maven</name>
       <url>http://central.maven.org/maven2</url>
     </repository>

以及下载 jar (http://central.maven.org/maven2/com/ohadr/authentication-flows/1.6.0-RELEASE/authentication-flows-1.6.2-RELEASE.jar) 并手动安装:

 mvn install:install-file -DgroupId=com.ohadr \
   -DartifactId=authentication-flows \
   -Dversion=1.6.2-SNAPSHOT \
   -Dpackaging=jar -Dfile=authentication-flows-1.6.2-RELEASE.jar

现在我有:

...Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project client: Compilation failure: Compilation failure:...impl/CustomCreateAccountEndpoint.java:[6,38] package com.ohadr.auth_flows.endpoints does not exist

我做错了什么?谢谢。

客户端应用程序的最新版本(主分支)取决于 "latest" 版本 - SNAPSHOT 版本 - authentication-flows JAR。快照在 maven-repository 中不存在,这就是你得到错误的原因。

您也可以克隆 authentication-flows 项目并在本地构建它,或者更改依赖项 客户端 pom 版本 1.6.1-RELEASE.

HTH