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

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>

Related

3rdparty repository issues with maven pom.xml

I was looking for BIRT Dependency in the net. Package my code refers are
import org.eclipse.birt.chart.model.Chart;
import org.eclipse.birt.chart.model.attribute.Anchor;
It is using chartengineapi and below is the maven dependency entry for POM.
<!-- https://mvnrepository.com/artifact/org.eclipse.birt/chartengineapi -->
<dependency>
<groupId>org.eclipse.birt</groupId>
<artifactId>chartengineapi</artifactId>
<version>2.3.2</version>
</dependency>
Since it is part of other repository (https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/) it gives error in Pom.xml. Could any one help me to sort out this ?
added repository tag and resolved.
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
Add one more <repository></repository> and the give the new repo name and link. It worked for me though I am not sure whether this is a standard approach.

spring data lovelace m3 and spring boot 2.0

I am using spring boot 2.0.5-RELEASE, and trying to use spring data Lovelace-M3 for it's MongoDB transaction support with MongoTransactionManager class, i added the lovelace-m3 dependency with release train repository as follow :
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-releasetrain</artifactId>
<version>Lovelace-M3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>spring-libs-release</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>
But maven doesn't download the jar of lovealace, only the pom, can't find anywhere lovelace classes. I don't know what i am missing here.
Milestone version does not publish on https://repo.spring.io/libs-release.
Please add the following code into your ...
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
Also, if you need to use milestones plugin, you can add the following code:
<pluginRepositories>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
Spring boot 2.0 does not support Spring data lovelace, if someone want to enjoy MongoDB 4 Transaction feature he needs to wait for Spring boot 2.1 unfortunately.
See : https://github.com/spring-projects/spring-boot/issues/14644

spring-security-saml missing jar in repo

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.

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>

The POM for org.springframework.security:org.springframework.security.web:jar:3.0.5.RELEASE is missing, no dependency information available

When including into pom.xml
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>org.springframework.security.web</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
with repositories
<repository>
<id>com.springsource.repository.bundles.milestone</id>
<name>EBR Spring Milestone Repository</name>
<url>http://repository.springsource.com/maven/bundles/milestone</url>
</repository>
<repository>
<id>org.springframework.maven.milestone</id>
<name>Maven Central Compatible Spring Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
</repository>
<repository>
<id>com.springsource.repository.bundles.release</id>
<name>EBR Spring Release Repository</name>
<url>http://repository.springsource.com/maven/bundles/release</url>
</repository>
<repository>
<id>com.springsource.repository.bundles.external</id>
<name>EBR External Release Repository</name>
<url>http://repository.springsource.com/maven/bundles/external</url>
</repository>
I get the following error message when doing the maven build:
The POM for org.springframework.security:org.springframework.security.web:jar:3.0.5.RELEASE is missing, no dependency information available
Other spring libraries are included well. What's going wrong? Thank you for any help.
Update
I simplified pom.xml to
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>test</artifactId>
<packaging>jar</packaging>
<version>1.0.1</version>
<name>test</name>
<url>http://test</url>
<dependencies>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>org.springframework.security.web</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>com.springsource.repository.bundles.milestone</id>
<name>EBR Spring Milestone Repository</name>
<url>http://repository.springsource.com/maven/bundles/milestone</url>
</repository>
<repository>
<id>org.springframework.maven.milestone</id>
<name>Maven Central Compatible Spring Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
</repository>
<repository>
<id>com.springsource.repository.bundles.release</id>
<name>EBR Spring Release Repository</name>
<url>http://repository.springsource.com/maven/bundles/release</url>
</repository>
<repository>
<id>com.springsource.repository.bundles.external</id>
<name>EBR External Release Repository</name>
<url>http://repository.springsource.com/maven/bundles/external</url>
</repository>
</repositories>
</project>
and when calling mvn -U install (forces update check) it gives
[ERROR] Failed to execute goal on project test: Could not resolve dependencies for project test:test:jar:1.0.1: Could not find artifact org.springframework.security:org.springframework.security.web:jar:3.0.5.RELEASE in com.springsource.repository.bundles.milestone (http://repository.springsource.com/maven/bundles/milestone)
I see that the repository is properly populated, so the problem is a wrong artifactId. It's spring-security-web, not org.springframework.security.web.
You are using the wrong artifactId. Use this:
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
And you don't need any custom repositories, you can find it in Maven Central.
http://static.springsource.org/spring-security/site/petclinic-tutorial.html gives a wrong artificact Id where I copied the dependency from. Interestingly it works with version 3.0.3.RELEASE but not with 3.0.5.RELEASE.
Thanks for the hint Sean, I updated the answer.

Resources