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

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.

Related

Missing artifact de.jetwick:snacktory:jar:1.1-SNAPSHOT

I am trying to use snacktory thus I have the following in my pom.xml file:
<!-- ... -->
<dependencies>
<!-- ... -->
<dependency>
<groupId>de.jetwick</groupId>
<artifactId>snacktory</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>snacktory_snapshots</id>
<url>https://github.com/karussell/mvnrepo/tree/master/snapshots/de/jetwick/snacktory/</url>
</repository>
</repositories>
</project>
However, I am getting
Missing artifact de.jetwick:snacktory:jar:1.1-SNAPSHOT
in Eclipse from the Maven build. I've tried, as in another question stated 1.2 and 1.3 as well but the result is the same.
Why am I not able to get this dependency?
If you look on their github repository (used as a maven repository), they provide the repository url to use : https://github.com/karussell/mvnrepo
Change the repository to:
<repository>
<id>snacktory_snapshots</id>
<url>https://github.com/karussell/mvnrepo/raw/master/snapshots</url>
</repository>
Use the release instead
I would advise you to use their release version instead:
<repository>
<id>snacktory_releases</id>
<url>https://github.com/karussell/mvnrepo/raw/master/releases</url>
</repository>
with the dependency:
<dependency>
<groupId>de.jetwick</groupId>
<artifactId>snacktory</artifactId>
<version>1.2</version>
</dependency>

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.

mvn release plugin releasing next snapshot not current release

Hello I've been releasing a project from my workstation with no problems. I've recently tried releasing another project from 1.0.0-SNAPSHOT. However when it actually does the release it releases 1.0.1-SNAPSHOT to the snapshots repository instead of 1.0.0 to releases repository.
I've done dryRun=true and it seems fine. In fact it defaults me to the versions:
What is the release version for "Appname"? (...) 1.0.0: :
What is SCM release tag or label for "Appname"? (...) Appname-1.0.0: :
What is the new development version for "Appname"? (...) 1.0.1-SNAPSHOT: :
I take all the defaults.
However when i do the "mvn release:perform"
This is what it does:
[INFO] Uploading: http://{corporate-nexus-site}/snapshots/{app-path}/1.0.1-SNAPSHOT/fei-logging-formatter-1.0.1-20140929.153303-1.jar
...
[INFO] [INFO] BUILD SUCCESS
I'm using latest maven and i manually added latest release plugin. And I can release another project using same parent and settings.xml setup.
Looking at the properties file after a dryrun and prepare it all looks right to me.
I thought originally i had my distribution set up wrong, and was releasing a release to the snapshot repository, but as you can see its actually thinking its doing a good job and releasing a snapshot.
confused royally.
Any ideas on what to try?
thanks.
UPDATE: In the project I updated the pom from 1.0.0-SNAPSHOT to 1.0.0 and did a "mvn deploy" and it put it exactly where I expected in releases, without out all the goodies of course.
UPDATE2: Pom (company name to protect the guilty)
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>logging-formatter</groupId>
<artifactId>logging-formatter</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>Logging Formatter</name>
<description>logging tool to format your logging in the standard cn way.</description>
<parent>
<groupId>com.companyname.pom.parent.master</groupId>
<artifactId>cn-pom-parent-master</artifactId>
<version>2014.3.0</version>
</parent>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
</build>
<scm>
<url>http://svn.sys.ds.companyname.com/svn/cn-logging</url>
<connection>scm:svn:http://svn.sys.ds.companyname.com/svn/cn-logging</connection>
<developerConnection>scm:svn:http://svn.sys.ds.companyname.com/svn/cn-logging</developerConnection>
</scm>
<organization>
<name>CompanyName Enterprises</name>
</organization>
<ciManagement>
<system>Jenkins</system>
<url>http://jenkins.sys.ds.companyname.com:8080/job/cn-logging-DEVELOP/</url>
</ciManagement>
</project>
UPDATE3: Adding parent settings info
SETTINGS.XML
<repositories>
<repository>
<id>fei-releases</id>
<name>Ferguson Release Repository</name>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<url>http://{companyname}/nexus/content/repositories/releases</url>
<layout>default</layout>
</repository>
<repository>
<id>fei-snapshots</id>
<name>Ferguson Snapshot Repository</name>
<releases>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
<url>http://{companyname}/nexus/content/repositories/snapshots/</url>
<layout>default</layout>
</repository>
<repository>
<id>fei-thirdparty</id>
<name>Ferguson 3rd Party Repository</name>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<url>http://{companyname}/nexus/content/repositories/thirdparty/</url>
<layout>default</layout>
</repository>
</repositories>
PARENT REPOSITORIES:
<repositories>
<repository>
<id>third-party</id>
<name>3rd Party Repository</name>
<url>http://{companyname}/nexus/content/repositories/thirdparty/</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories/>
PARENT DISTRIBUTION MANAGEMENT:
<distributionManagement>
<repository>
<id>fei-releases</id>
<name>Ferguson Release Repository</name>
<url>http://{companyname}/nexus/content/repositories/releases</url>
<layout>default</layout>
</repository>
<snapshotRepository>
<id>fei-snapshots</id>
<name>Ferguson Snapshot Repository</name>
<url>http://{companyname}/nexus/content/repositories/snapshots</url>
<layout>default</layout>
</snapshotRepository>
</distributionManagement>
i did a "mvn release:clean release:prepare" then a "mvn
release:perform" Same steps I used to release another project without
issue using the same parent.
So you have another project that is deployed fine after release? (you see the release version in the repo)?
If so, it sounds like an issue in your 'problematic' project. Can you share its pom.xml?
#SteveHolt,
I see a red flag in your pom.xml file:
<scm>
<url>http://svn.sys.ds.companyname.com/svn/cn-logging</url>
<connection>scm:svn:http://svn.sys.ds.companyname.com/svn/cn-logging</connection>
<developerConnection>scm:svn:http://svn.sys.ds.companyname.com/svn/cn-logging</developerConnection>
</scm>
None of these urls contain the trunk, branches, or tags keywords.
Consequently, when Maven creates the release tag, it tells SVN to use the same url as before:
http://svn.sys.ds.companyname.com/svn/cn-logging
When release-prepare runs, it performs
$ svn checkout http://svn.sys.ds.companyname.com/svn/cn-logging/
but it can't tell apart the release tag from the development trunk.
Therefore it retrieves the post-release snapshot revision (which is the latest commit) rather than the release revision (the preceding commit).
Solution:
Create a trunk dir under cn-logging and move all your code into it:
svn/cn-logging/
trunk/
pom.xml
src/
main/
java/
branches/
tags/
Hope that helps.

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>

Resources