2

I am new to spring and I'm trying to create a Spring Starter Project. However there is an error in my pom.xml. Here it is.

<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.example</groupId>
<artifactId>chatbot_api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>chatbot_api</name>
<description/>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.0.RELEASE</version>
    <relativePath/>
    <!-- lookup parent from repository -->
</parent>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

The line <parent> here is the one causing the problem.

complete error message

I have seen these links but it did not resolved my problem.

Gayan Mettananda
  • 1,498
  • 14
  • 21
Earl. Fojas
  • 79
  • 3
  • 12
  • `connect timed out` suggests that either you weren't connected to the Internet or you need to configure a proxy. If you don't need a proxy, the problem will fix itself in an hour, or you can run `mvn -U dependency:resolve` to force a refresh. – chrylis -cautiouslyoptimistic- Nov 29 '18 at 04:35

1 Answers1

2

Create settings.xml for proxy in m2 dirctory as below :

Under Linux/Unix, place it under ~/.m2/settings.xml. Under Windows place it under c:\documents and settings\youruser.m2\settings.xml or c:\users\youruser.m2\settings.xml.

Please refer apache article for more details on settings.xml

KOTIOS
  • 11,177
  • 3
  • 39
  • 66