spring-boot-security-saml-samples icon indicating copy to clipboard operation
spring-boot-security-saml-samples copied to clipboard

Not able to download dependencies

Open niketdude opened this issue 6 years ago • 6 comments

When we are giving maven build , we are getting below error. Anyone has any idea on this. We have tried adding most of the repository but no progress.

Failed to collect dependencies at com.github.ulisesbocchio:spring-boot-security-saml:jar:1.16 -> org.springframework.security.extensions:spring-security-saml2-core:jar:1.0.4.RELEASE -> org.opensaml:opensaml:jar:2.6.6: Failed to read artifact descriptor for org.opensaml:opensaml:jar:2.6.6: Could not transfer artifact net.shibboleth:parent-v2:pom:4 from/to shib-release (https://build.shibboleth.net/nexus/content/groups/public): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]

Failed to collect dependencies at com.github.ulisesbocchio:spring-boot-security-saml:jar:1.16 -> org.springframework.security.extensions:spring-security-saml2-core:jar:1.0.4.RELEASE -> org.opensaml:opensaml:jar:2.6.6 at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:221) at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:128) at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:246) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:200) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345) at org.apache.maven.cli.MavenCli.main(MavenCli.java:191) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

niketdude avatar Jan 25 '19 08:01 niketdude

It seems that the opensaml 2.6.6 JAR is not in Maven Central (it goes up to 2.6.4 and seems that maybe at one point had 2.6.6, somehow). You can add the Shibboleth repository to your pom.xml repositories element to bring in the dependency:

	<repositories>
		<repository>
			<id>shibboleth</id>
			<name>Shibboleth</name>
			<url>https://build.shibboleth.net/nexus/content/repositories/releases/</url>
		</repository>
	</repositories>

jasonwjones avatar Nov 26 '19 17:11 jasonwjones

It looks like opensaml 2.6.6 is in Maven Central, but when you look at it, it says there is a newer version available, which points at version 2.6.4 (strange) https://mvnrepository.com/artifact/org.opensaml/opensaml/2.6.6

Jolley71717 avatar Feb 14 '20 17:02 Jolley71717

I was searching for answers as to why opensaml 2.6.6 isn't on Maven Central and found this document by the Shibboleth project: https://wiki.shibboleth.net/confluence/display/DEV/Use+of+Maven+Central

kyleshrader avatar Jul 16 '20 16:07 kyleshrader

Its there in alfresco repository. Add below in your pom
alfresco-public
https://artifacts.alfresco.com/nexus/content/groups/public

vaibhavj28 avatar Sep 20 '21 12:09 vaibhavj28

I had the same issue when I tried to use spring-security-saml2-core version="1.0.10.RELEASE". After changing the version to "2.0.0.M31" the issue was fixed.

MarinPuizina avatar Oct 08 '21 08:10 MarinPuizina

New Version is available for this dependency. In my case this solved the error. <dependency> <groupId>org.springframework.security.extensions</groupId> <artifactId>spring-security-saml2-core</artifactId> <version>2.0.0.M31</version> </dependency>

ravinapit3 avatar Nov 22 '21 20:11 ravinapit3