I am trying to create my first ever Spring Boot application. The pom.xml
that I am using here is:
<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>me.hahaha</groupId>
<artifactId>SpringBootTutorial</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<!-- <name>SpringBootTutorial</name>
<url>http://maven.apache.org</url> -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
</parent>
<dependencies>
<!-- JUnit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- Spring Boot Dependency -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
However, eclipse complains saying:
No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format
<plugin-prefix>:<goal>
or<plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>
. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
I wonder what goal
should my project have.
At this point, all I want is the project to build, compile and run and get the "Congratulations from BlogController.java" message on the localhost. I believe this isn't something specific to the project either (because it doesn't do anything much) and the pom.xml
that I have posted above is pretty similar to the one they give in the docs for Maven.
Thanks.
Note: In case required, the tutorial that I am trying to follow is here.