天天看点

maven 搭建cxf 遇到的问题 :The POM for org.opensaml:opensaml-saml-impl:jar:4.2.0 is missing

针对以前的项目,现在想转换为maven项目,这样管理起来更加的方便,之前的项目中使用了cxf,

然后我在pom.xml文件中引入相关的jar

<dependency>
            <groupId>org.apache.cxf.services.sts</groupId>
            <artifactId>cxf-services-sts-core</artifactId>
            <version>4.0.0</version>
        </dependency>
           

但是在项目编译的过程中总是出现这样的错误:

[WARNING] The POM for org.opensaml:opensaml-saml-impl:jar:4.2.0 is missing, no dependency information available
[WARNING] The POM for org.opensaml:opensaml-xacml-impl:jar:4.2.0 is missing, no dependency information available
[WARNING] The POM for org.opensaml:opensaml-xacml-saml-impl:jar:4.2.0 is missing, no dependency information available
[WARNING] The POM for javax.xml.bind:jaxb-api:jar:2.3.0-b161121.1438 is missing, no dependency information available
[WARNING] The POM for com.sun.istack:istack-commons-runtime:jar:3.0.6 is missing, no dependency information available
[WARNING] The POM for com.sun.xml.fastinfoset:FastInfoset:jar:1.2.14 is missing, no dependency information available
           

原来在cxf-services-sts-core的4.0的版本中用到了opensaml-saml-impl:jar:4.2.0 但是我们到maven官网:Maven Repository: Search/Browse/Explore (mvnrepository.com) 去搜索

maven 搭建cxf 遇到的问题 :The POM for org.opensaml:opensaml-saml-impl:jar:4.2.0 is missing

发现最新的jar才更新到4.0.1,所以我们这边相关联的版本在仓库中下载不到,出现了上面的问题

解决办法:降低cxf-services-sts-core的版本号

<dependency>
            <groupId>org.apache.cxf.services.sts</groupId>
            <artifactId>cxf-services-sts-core</artifactId>
            <version>3.3.0</version>
        </dependency>
           

这样就解决了相关的问题,因为这个关联的opensaml-saml-impl版本比较低,在仓库中是存在的

希望对你有所帮助