Java OpenSAML3缺少工件

Java OpenSAML3缺少工件,java,eclipse,maven,opensaml,Java,Eclipse,Maven,Opensaml,尝试在eclipse中构建一个小样本项目(尝试了eclipse的火星和氧气释放)。使用Java1.8。当我添加opensaml依赖项时,它在opensaml saml impl上失败,表明: Missing artifact org.apache.commons:commons-collections:jar:3.2.1 Missing artifact org.apache.commons:commons-lang:jar:2.6 Missing artifact org.apache.jak

尝试在eclipse中构建一个小样本项目(尝试了eclipse的火星和氧气释放)。使用Java1.8。当我添加opensaml依赖项时,它在opensaml saml impl上失败,表明:

Missing artifact org.apache.commons:commons-collections:jar:3.2.1
Missing artifact org.apache.commons:commons-lang:jar:2.6
Missing artifact org.apache.jakarta:oro:jar:2.0.8
具有以下pom.xml的空项目:

<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>testSAML2</groupId>
  <artifactId>test.test.saml</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>abc</name>
  <build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <properties>
    <opensaml.version>3.3.0</opensaml.version>
  </properties>
      <dependencies>
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-core</artifactId>
            <version>${opensaml.version}</version>
        </dependency>
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-saml-api</artifactId>
            <version>${opensaml.version}</version>
        </dependency>
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-saml-impl</artifactId>
            <version>${opensaml.version}</version>
        </dependency>
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-messaging-api</artifactId>
            <version>${opensaml.version}</version>
        </dependency>
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-messaging-impl</artifactId>
            <version>${opensaml.version}</version>
        </dependency>
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-soap-api</artifactId>
            <version>${opensaml.version}</version>
        </dependency>
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-soap-impl</artifactId>
            <version>${opensaml.version}</version>
        </dependency>
         <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <version>1.1.7</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.1.7</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.2</version>
        </dependency>
    </dependencies>
</project>

4.0.0
testSAML2
test.test.saml
0.0.1-快照
abc
src
maven编译器插件
3.7.0
1.8
1.8
3.3.0
org.opensaml
opensaml内核
${opensaml.version}
org.opensaml
opensaml saml api
${opensaml.version}
org.opensaml
opensaml saml impl
${opensaml.version}
org.opensaml
opensaml消息传递api
${opensaml.version}
org.opensaml
opensaml消息传递impl
${opensaml.version}
org.opensaml
opensaml soap api
${opensaml.version}
org.opensaml
opensaml soap impl
${opensaml.version}
回写
回溯堆芯
1.1.7
回写
回归经典
1.1.7
javax.servlet
javax.servlet-api
3.1.0
假如
公用记录
公用记录
1.2
我已尝试在底部添加存储库,但没有更改:

<repositories>
    <repository>
        <id>shib-release</id>
        <url>https://build.shibboleth.net/nexus/content/repositories/releases</url>
    </repository>
</repositories>

shib释放
https://build.shibboleth.net/nexus/content/repositories/releases

有人知道为什么吗?我尝试过“更新项目…”,尝试过作为maven项目删除/添加,尝试过一个空的新项目,尝试过将oxygen作为新ide安装,但仍然遇到同样的问题。

通过一系列步骤解决。最终,我认为最后一步是解决问题的主要步骤(maven build)。以下是系列:

  • 删除整个本地存储库(您的.m2/存储库)
  • 删除了对旧JVM的所有引用
  • 重新启动的eclipse
  • 多次重置为Java1.8接口,当我选择maven |“Update Project…”时,maven中的某些东西认为它是JVM1.5
  • 根据Mike Salleses的回答运行Maven构建
    • 作为| maven build |目标“干净安装-U”运行|运行
maven构建是一种我从未见过的新技术。它基本上构建了包含maven拉取的项目,您可以以日志样式的格式查看失败的细节


maven构建最终强制下载所有JAR并编译。此时,其余的测试项目都使用了干净的构建。

您是否尝试将那些缺少的jar依赖项也添加到pom中?是的,尝试使用3.2.1版本手动添加commons集合,如错误中所示。没有变化。