Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opensaml 4.2.0 not directly found in maven central

Tags:

opensaml

Searched a lot in the web. But couldn't find the solution for opensaml 4.2.0 to be used in the springboot application.

I referred the below link. Unfortunately it din't work for me. https://github.com/spring-projects/spring-security-samples/blob/main/servlet/spring-boot/java/saml2/login/build.gradle My build.gradle file is

plugins {
    id 'java'
    id 'org.springframework.boot' version '3.0.0'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
repositories {
    mavenCentral()
    maven { url "https://repo.spring.io/milestone" }
    maven { url "https://repo.spring.io/snapshot" }
    maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" }
}
dependencies {
constraints {
        implementation "org.opensaml:opensaml-core:4.2.0"
        implementation "org.opensaml:opensaml-saml-api:4.2.0"
        implementation "org.opensaml:opensaml-saml-impl:4.2.0"
    }
    implementation 'org.springframework.boot:spring-boot-starter'
    implementation 'org.springframework.boot:spring-boot-starter-security'
    implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.security:spring-security-saml2-service-provider'
    implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks.named('test') {
    useJUnitPlatform()
}

But am getting the error in the eclipse problem page: Unresolved dependency: org.opensaml:opensaml-saml-impl:4.2.0

I need to use the opensaml...4.20 jars in my project. Please help to resolve this issue.

like image 707
Pratheepa Balasubramani Avatar asked Jan 17 '26 19:01

Pratheepa Balasubramani


1 Answers

As documented here, the OpenSAML artifacts are hosted at the Shibboleth project repository, not maven central. To use them, you need to provide the shibboleth repository url to use this library (documented for Maven here).

For example, in Gradle:

repositories {
    maven {
        url 'https://build.shibboleth.net/nexus/content/repositories/releases/'
    }
    mavenCentral()
}
like image 123
Mathew Stephen Avatar answered Jan 19 '26 19:01

Mathew Stephen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!