Maven 无法解析 WebSphere 提供的依赖项的依赖项

Maven could not resolve dependency of WebSphere provided dependency

我正在尝试在 IntelliJ 上导入遗留应用程序,并且大多数模块都依赖于 com.ibm.tools.target.was 和 com.ibm.tools.target.portal 工件。

我在 IntelliJ 的 Maven window 中得到这个:

这是我在 mvn install 上收到的错误消息:

Failed to execute goal on project xxx-managers: Could not resolve dependencies for project com.xxx.xxx.xxx-managers:xxx-managers:ejb:0.0.1-SNAPSHOT: Failure to find com.ibm.tools.target:was:pom:8.0.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

我试图模仿在 IBM 网络知识中心 (https://www.ibm.com/support/knowledgecenter/en/SSHR6W/com.ibm.websphere.wdt.doc/topics/install_server_apis.html) 中找到的类似过程,但没有成功。

我将 was_public.pom 添加为 maven 项目并将该项目作为依赖项导入到我的其他模块中。

我还尝试将 WebSphere 添加为库依赖项:

没有任何效果。

请帮助,在此先感谢。 编辑:这是我的 settings.xml(我从应用程序运行的其他环境复制它)并且它包括 IBM 存储库:

    <?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <profiles>
    <profile>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <releases>
            <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>false</enabled>
            <updatePolicy>never</updatePolicy>
          </snapshots>
          <id>ibm-maven-repo</id>
          <name>ibm-maven-repo</name>
          <url>http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <releases>
            <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>false</enabled>
            <updatePolicy>never</updatePolicy>
          </snapshots>
          <id>ibm-maven-repo</id>
          <name>ibm-maven-repo</name>
          <url>http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/</url>
        </pluginRepository>
      </pluginRepositories>
      <id>standard-extra-repos</id>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>standard-extra-repos</activeProfile>
  </activeProfiles>
</settings>

您错过了一些人工制品,例如com.ibm.tools.target:was:pom:8.0.0,您需要在 settings.xml 中指定一个存储库,或者将这些工件安装到您的本地存储库中。