Reputation: 35
I am creating a new maven project from starter.spring.io , with dependencies as web, spring data JPA and Apache Derby, even without writing any code, it is showing error in POM.xml file!
Please help me through this error. This is the full file pom.xml.
'''
4.0.0
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>io.abhinav</groupId>
<artifactId>coutse-api-data</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>coutse-api-data</name>
<description>course api data prohect for spring starter</description>
<properties>
<java.version>1.4</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.derby/derby -->
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
'''
Upvotes: 1
Views: 299
Reputation: 26
Because Maven Central Repository no longer supports communication over HTTP You should add this statement to Your pom.xml:
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
By adding this statement You update The Central Repository of Maven and use HTTPS instead of HTTP.
This thread can give You more insight into this topic: Maven dependencies are failing with a 501 error.
Upvotes: 1