spring-security-saml missing jar in repo - maven

As per the instructions on http://projects.spring.io/spring-security-saml/, I have the following in my pom.xml:
<dependencies>
<dependency>
<groupId>org.springframework.security.extensions</groupId>
<artifactId>spring-security-saml</artifactId>
<version>1.0.0.RC2</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
When I execute mvn clean install -U, I receive the following error:
[ERROR] Failed to execute goal on project myproj: Could not resolve dependencies
for project com.acme.myproj:myproj:war:1.0.0-SNAPSHOT: Could not find artifact org.
springframework.security.extensions:spring-security-saml:jar:1.0.0.RC2 in spring
-milestones (http://repo.spring.io/milestone) -> [Help 1]
The repo is there at http://repo.spring.io/milestone/org/springframework/security/extensions/spring-security-saml/1.0.0.RC2/, but there is no .jar file.

The correct dependency to use is:
<dependency>
<groupId>org.springframework.security.extensions</groupId>
<artifactId>spring-security-saml2-core</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>
The jar is available both in Maven Central and http://repo.spring.io/list/release/
The Spring SAML web will get fixed soon.

Related

Could not find artifact com.wavefront:wavefront-spring-boot-bom:pom:2.1.1-SNAPSHOT

I am using spring-cloud-sleuth-otel-autoconfigure dependency for distributed tracing. Getting error while mvn clean install -X
Actual error message is Could not find artifact com.wavefront:wavefront-spring-boot-bom:pom:2.1.1-SNAPSHOT in xxxxSnapshots i am using settings.xml file in inside .m2 folder.
i tried to exclude these wavefront-spring-boot-bom dependency. but iam not able to see the mvn dependency:tree bcs of build failure. This is the repo link..https://repo.grails.org/grails/core/org/springframework/cloud/spring-cloud-sleuth-otel-dependencies/1.0.0-M7/
and this is excactly what i added.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-otel-autoconfigure</artifactId>
<version>1.0.0-M7</version>
<exclusions>
<exclusion>
<groupId>com.wavefront</groupId>
<artifactId>wavefront-spring-boot-bom</artifactId>
</exclusion>
</exclusions>
</dependency>
<repositories>
<repository>
<id>grails</id>
<name>grails</name>
<url>https://repo.grails.org/grails/core/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>grails-plugins</id>
<name>grails-plugins</name>
<url>https://repo.grails.org/grails/plugins</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
How can i fix this issue?
Could you please try the followings:
Go to https://start.spring.io and generate a project with sleuth
Follow the documentation and add Sleuth-OTel (exclude Brave)
Please use the official repo (see the docs above) instead of third -party ones
Two extra tips:
Use mvn verify instead of mvn clean install
OTel is still in Alpha, it is not meant to be used in production (that's why SLeuth-OTel is an incubator project)

Maven :How to use local archiva repository in project?

Downloaded Apache Archiva and uploaded 10 Jar file on it now i want to use this Archiva repository in my pom.xml so these 10 jar download from the Archiva ..What all setting i have to do i made changes in my pom.xml file like below
<repository>
<id>internal</id>
<name>Archiva Managed Internal Repository</name>
<url>http://serverip:8888/archiva/repository/internal/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
Also added all jar in pom.xml file
<dependency>
<groupId>org.forum</groupId>
<artifactId>jforum</artifactId>
<version>2.3.5</version>
</dependency>
<dependency>
<groupId>org.imaging</groupId>
<artifactId>imaging</artifactId>
<version>01012005</version>
</dependency>
<dependency>
<groupId>org.jbosscaches</groupId>
<artifactId>jboss-logging-spi</artifactId>
<version>2.1.2.GA</version>
</dependency>
But i am getting
Missing artifact org.jbosscaches:jboss-transaction-api:jar:1.0.1.GA
What all i am missing?
I made the following changes it worked now
<url>http://ipaddress:8888/repository/internal/</url>

Maven build error because of an unresolved Maven POM property used in repository URL when specifying Spring's bill-of-material POM

I'm facing a reproducible strange behavior when referencing a Maven POM property in the POM's repositories section and having a bill of materials POM (here Spring-Framework-BOM) defined.
Setup to reproduce the problem:
Maven 3.0.5, JDK 1.7.0.51.x86_64
Maven POM with a property that holds my Nexus-URL prefix
that property is referenced in the pluginRepositories and repositories section
additionally having spring-framework-bom dependency in dependencyManagement section defined
The build error occurring in the log:
[ERROR] Non-resolvable import POM: Could not transfer artifact org.springframework:spring-framework-bom:pom:4.0.3.RELEASE from/to mycompany.public (${nexus.baseUrl}/content/groups/public/): No connector available to access repository mycompany.public (${nexus.baseUrl}/content/groups/public/) of type default using the available factories WagonRepositoryConnectorFactory # line 692, column 16
Here the excerpt from my Maven POM file:
<properties>
<nexus.baseUrl>http://nexus.mycompanydomain.com</nexus.baseUrl>
<spring.version>4.0.3.RELEASE</spring.version>
</properties>
<pluginRepositories>
<pluginRepository>
<id>public</id>
<url>${nexus.baseUrl}/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>mycompany.public</id>
<name>MyCompany Public Repository</name>
<url>${nexus.baseUrl}/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>${spring.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Hotfix
I could solve the problem by replacing the nexus.baseUrl by it's value in the repositories section of the POM:
<repository>
<id>mycompany.public</id>
<name>MyCompany Public Repository</name>
<url>http://nexus.mycompanydomain.com/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
Question
Is anyone able to explain why the resolution of the nexus.baseUrl property is not taking place while the spring.version property is resolved successfully (see error log)?
IMHO the the problem lies in the order of evaluation of the pom.
Properties, like in your case, the property "nexus.baseUrl" are not getting evaluated before the import scope is getting triggered.
In my case, replacing property reference (nexus.baseUrl) in the repository url element with the concrete url solved the problem.

Pom.xml throws Missing artifact error for org.springframework.security.extentions continously

Below is a small part my pom.xml for SSO using SAML,
<properties>
<SAML-version>1.0.0-RC2-SNAPSHOT</SAML-version>
</properties>
<dependency>
<groupId>org.springframework.security.extensions</groupId>
<artifactId>spring-security-saml2-core</artifactId>
<version>${SAML-version}</version>
</dependency>
for which STS(spring tool suite 3.1) throws below error continuosly,
"Missing artifact org.springframework.security.extensions:spring-security-saml2- core:jar:1.0.0-RC2-SNAPSHOT".
I navigated to maven repo and i can find the jar downloaded by maven.
Kindly help me.
Thanks,Selva
Add This
<repositories>
<repository>
<id>repo.springsource.org</id>
<name>repo.springsource.org-snapshots</name>
<url>http://repo.springsource.org/libs-snapshot</url>
</repository>
</repositories>
The Spring Security SAML website is currently incorrect.. The groupId should actually be org.springframework.security.extensions instead of just org.springframework.security.
The below dependency configuration works for me:
<dependencies>
<dependency>
<groupId>org.springframework.security.extensions</groupId>
<artifactId>spring-security-saml2-core</artifactId>
<version>1.0.0.RC2</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

Unable to get dependency in an internal repository

We are using Maven 3.0.3. We have deployed a JAR file to an internal repository at
http://maven/maven_repo/repositories/release/org/openqa/selenium/server/selenium-server/0.9.2/selenium-server-0.9.2-standalone.jar
I have then included this dependency ...
<dependency>
<groupId>org.openqa.selenium.server</groupId>
<artifactId>selenium-server</artifactId>
<version>0.9.2</version>
<scope>test</scope>
</dependency>
Also, in my ~/.m2/settings.xml file, I have our internal repository ...
<repository>
<id>mycoInternalRelease</id>
<layout>default</layout>
<name>myco Internal Repository</name>
<url>http://maven/maven_repo/repositories/release</url>
<releases>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<checksumPolicy>fail</checksumPolicy>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
Despite all this, when I run my pom, I get the error
[ERROR] Failed to execute goal on project myco-productplus-web: Could not resolve dependencies for project myco-productplus:myco-productplus-web:war:1.0-SNAPSHOT:The following artifacts could not be resolved: org.openqa.selenium.server:selenium-server:jar:0.9.2, org.openqa.selenium.server:selenium-server-coreless:jar:0.9.2: Could not find artifact org.openqa.selenium.server:selenium-server:jar:0.9.2 in mycoInternalRelease (http://maven/maven_repo/repositories/release) -> [Help 1]
[ERROR]
How can I heal the pain? Thanks, - Dave
Given your artifact is named "selenium-server-0.9.2-standalone.jar" you might need to add <classifier>standalone</classifier> to your dependency declaration in your pom.

Resources