Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)
like image 561
Lars Blumberg Avatar asked Apr 16 '11 06:04

Lars Blumberg


People also ask

How do you add spring boot security dependency in POM xml?

For adding a Spring Boot Security to your Spring Boot application, we need to add the Spring Boot Starter Security dependency in our build configuration file. Maven users can add the following dependency in the pom. xml file. Gradle users can add the following dependency in the build.

What is Security starter in Spring Boot?

If Spring Security is on the classpath, Spring Boot automatically secures all HTTP endpoints with “basic” authentication. However, you can further customize the security settings. The first thing you need to do is add Spring Security to the classpath.

What is missing artifact error in POM xml?

The error in pom. xml “missing artifact maven” occurs when the artifact is missing in local repository and remote repository. In eclipse, missing artifact maven error shows in the programs window. Maven is a software tool for building artifacts.

What is Spring Security core?

Spring Security is a powerful and highly customizable authentication and access-control framework. It provides protection against attacks like session fixation, clickjacking, cross site request forgery, etc. License. Apache 2.0.


1 Answers

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.

like image 173
Donal Fellows Avatar answered Oct 27 '22 10:10

Donal Fellows