I've created a Maven project with the archetype "webapp" but when I start the command "mvn tomcat7:start", I've the following error :
No plugin found for prefix 'tomcat7' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\dark\.m2\repository), central (http://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
My project structure :
-src
-main
-resources
-webapp
-WEB-INF
-web.xml
-index.jsp
-target
-classes
-dependency
- // the 'dependency' directory contains all the jar files
-lbagno
-maven-archiver
-surefire
lbagno.war
My pom.xml contains well the dependency for tomcat.
pom.xml
<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>com.myspace</groupId>
<artifactId>lbagno</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>lbagno Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.1.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<type>maven-plugin</type>
</dependency>
</dependencies>
<build>
<finalName>lbagno</finalName>
</build>
</project>
I don't understand why it doesn't work.
Do you have any solutions ?
Thank you
I know it was asked a year ago, but my answer might work for somebody other than me.
If creating the build tag in the pom.xml file not works, try editing the settings.xml file at your .m2 directory this way:
<pluginGroups>
...
<pluginGroup>org.apache.tomcat.maven</pluginGroup>
...
</pluginGroups>
I found the solution here:
http://tomcat.apache.org/maven-plugin-2.2/
First, there is no start goal, see the goals page of the doc.
Next, it's a plugin, you declared it as a dependency, this is why you get this error, I suggest you read the usage page of the plugin.
Here is a schematic structure of the pom.xml:
<project>
<!-- ... -->
<dependencies>
<!-- your deps here -->
</dependencies>
<build>
<plugins>
<!-- your default build plugins here -->
</plugins>
<build>
<!-- ... -->
</project>
This worked for me:
mvn clean install tomcat7:run
Run mvn with -X -e params. This should give you more information about the error.
I saw that you don't have any pluginRepositories declared. Add the following lines to your pom.xml:
<pluginRepositories>
<pluginRepository>
<id>apache.snapshots</id>
<name>Apache Snapshots</name>
<url>http://repository.apache.org/content/groups/snapshots-group/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
Try to delete this part from your dependency and put this line of code in plugins on your projects pom.xml.
From dependency delete this line of codes:
<dependency>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<type>maven-plugin</type>
</dependency>
and put this in ....
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
This will surely work.
Related
So this is probably a stupid question, but I have created an own library "testlib" which I want to include in other of my own Maven projects.
This is my own librarys .pom
<?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.test.testlib</groupId>
<artifactId>testlib</artifactId>
<version>1.0-SNAPSHOT</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>testlibrary</description>
<packaging>jar</packaging>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>
In order to include my library in another new project, I have created a local repository in my new projects .pom
...
<repositories>
<repository>
<id>data-local</id>
<name>data</name>
<url>file://${project.basedir}/repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.test.testlib</groupId>
<artifactId>testlib</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
...
Installing my own library "testlib" via mvn install is working fine for testlib itself. The problem is, that Maven will not detect that "testlib" requires org.slf4j, hence won't get it when I run install.
I have checked other dependencies in my .m2 folder and saw they have a .pom file with the same name as the .jar (for log4j that'd be log4j-1.2.17.pom). I tried copying testlibs .pom next to its .jar and changed the name accordinly, but that doesn't do it.
What do I have to do in order to get the same functionality as any other library from maven central? In other words, I don't want a fat .jar that has all dependencies included. I want a Maven project that adds my library as a dependency to discover that it needs sl4j and include it when mvn install is run.
I am working on a java project currently, my problem is a bit weird as yesterday my code was working fine then suddenly today when I try to build and test my code I get this error:
Failed to execute goal on project extraportGlobalSearch: Could not resolve dependencies for project com.api:extraportGlobalSearch:jar:1.0: Failed to collect dependencies for [org.glassfish.jersey.containers:jersey-container-grizzly2-http:jar:2.27 (compile), org.glassfish.jersey.inject:jersey-hk2:jar:2.27 (compile), junit:junit:jar:4.9 (test), com.googlecode.json-simple:json-simple:jar:1.1.1 (compile), com.fasterxml.jackson.core:jackson-annotations:jar:2.5.4 (compile), javax.servlet:javax.servlet-api:jar:3.0.1 (compile), com.google.zxing:core:jar:3.3.3 (compile), com.fasterxml.jackson.core:jackson-databind:jar:2.5.4 (compile), oracle:ojdbc:jar:11.2.0.4 (compile), org.glassfish.grizzly:grizzly-http-server:jar:2.4.0 (compile)]: Failed to read artifact descriptor for oracle:ojdbc:jar:11.2.0.4: Could not transfer artifact oracle:ojdbc:pom:11.2.0.4 from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/oracle/ojdbc/11.2.0.4/ojdbc-11.2.0.4.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
I tried to add another repo using https://repo.maven.apache.org/maven2/ url in my pom.xml but the error still persist. I have tried to resolve this for the past 5 hours, it would be great if anyone can help me, here is my pom.xml:
<project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.api </groupId>
<artifactId>extraportGlobalSearch</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>extraportGlobalSearch</name>
<repositories>
<repository>
<id>apache2-https</id>
<name>Apache 2 https</name>
<url>https://repo.maven.apache.org/maven2/</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
<version>${jersey.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-http</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
</dependency>
<!-- uncomment this to get JSON support:
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-binding</artifactId>
</dependency>-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.5.4</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.3.3</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.5.4</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>oracle</groupId>
<artifactId>ojdbc</artifactId>
<version>11.2.0.4</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-http-server</artifactId>
<version>2.4.0</version>
<type>jar</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<!-- Run shade goal on package phase -->
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<!-- add Main-Class to manifest file -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.api.GlobalSearch.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<jersey.version>2.27</jersey.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
Help needed. Thanks in advance.
<packaging>jar</packaging>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
</pluginRepository>
</pluginRepositories>
<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>
The issue is related to maven moving to https only: https://blog.sonatype.com/central-repository-moving-to-https
I have found that my problem was that Netbeans (8.2) was set to use the bundled maven executable (3.0.5). This version of maven is outdated and does not automatically reach for the https repo.
I have a newer version installed (Apache Maven 3.5.4 (Red Hat 3.5.4-5)
) that worked by executing mvn clean install in my project's directory.
To get Netbeans to use a different version of maven you can go to Tools->Options->Java->Maven and in Maven Home point to where your maven installation is located. For me it was /usr/bin/mvn and I had to define the path as just /usr as it seems that Netbeans expects to find a directory named bin containing the mvn executable.
Also, related to maven moving repositories, for certain old dependencies I had to use the now insecure endpoint in my maven config:
<pluginRepository>
<id>Codehaus repository</id>
<url>http://insecure.repo1.maven.org/maven2/</url>
</pluginRepository>
Just adding this in case it is useful to anyone.
You should update your maven version, the last maven version use https.
Download maven https://maven.apache.org/download.cgi (binary zip file) and extract it.
In netbeans, go to Tools -> Options -> Java -> Maven. In Maven Home select Browse, and select the folder where you extract maven
Enjoy it!
While the other responses give you workarounds by manually configuring the repository or a more recent version of Maven, the true source of the problem is that Netbeans (8.2) has became obsolete and is no more updated, you'd better migrate to Apache Netbeans (currently at version 11.3).
I fixed the issue by updating to latest maven version, it started to use https instead of http to download all the deps.
I changed maven version for global netbeans configuration Tools -> Options -> Java ->Maven ->Maven Home and Browse your maven installation of windows system (for example maven3.6) , i think so maven version embed netbeans 8.2 needs updated
I am using Maven build to build my project(using Eclipse IDE).
I have put jdk1.8 as default jdk, but still, I am getting an error as the source is 1.6.
Is there a configuration problem I am missing out? Please let me know?
(use -source 8 or higher to enable lambda expressions)
1. "clean install" as goals in "Run Configurations" in Eclipse.
2.pom.xml file
<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.mastercard.ayman</groupId>
<artifactId>Spring_MVC</artifactId>
<version>0.0.1-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.2.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-rest-webmvc</artifactId>
<version>3.0.7.RELEASE</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>spring-libs-release</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/libs-release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</project>
Compiler is JavaSE-1.8
Either set the maven-compiler-plugin as #Horst says or set the maven.compiler.source and maven.compiler.target properties like this.
<project ...>
...
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
...
</dependencies>
<build>
...
</build>
</project>
This is something I have dealt with too many times.
Could you post the following things as an answer?
Your current build command/query.
Your pom.xml code.
Your compiler version.
With these file(s) I could help you further to resolve your problem!
Setting the JDK in eclipse is only half the story, as maven manages the compiler itself.
Try adding the maven compiler plugin to you build configuration:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
I'm using maven on eclipse. I want to use Lwjgl and a few other libraries but Maven wont install them. It says they are missing. Here is what it says when I look at the errors:
ArtifactDescriptorException: Failed to read artifact descriptor for slick:slick:jar:274: ArtifactResolutionException: Failure to transfer slick:slick:pom:274 from http://slick.cokeandcode.com/mavenrepo was cached in the local repository, resolution will not be reattempted until the update interval of slick has elapsed or updates are forced. Original error: Could not transfer artifact slick:slick:pom:274 from/to slick (http://slick.cokeandcode.com/mavenrepo): null to http://slick.cokeandcode.com/mavenrepo/slick/slick/274/slick-274.pom pom.xml /TheLabyrinth
Missing artifact java3d:vecmath:jar:1.3.1 pom.xml /TheLabyrinth
Missing artifact junit:junit:jar:4.10 pom.xml /TheLabyrinth
Missing artifact net.java.jinput:jinput-platform:jar:natives-linux:2.0.5 pom.xml /TheLabyrinth line 1 Maven Dependency Problem
Missing artifact net.java.jinput:jinput-platform:jar:natives-osx:2.0.5 pom.xml /TheLabyrinth
Missing artifact net.java.jinput:jinput-platform:jar:natives-windows:2.0.5 pom.xml /TheLabyrinth
Missing artifact net.java.jinput:jinput:jar:2.0.5 pom.xml /TheLabyrinth
Missing artifact net.java.jutils:jutils:jar:1.0.0 pom.xml /TheLabyrinth
Missing artifact org.hamcrest:hamcrest-core:jar:1.1 pom.xml /TheLabyrinth
Missing artifact org.lwjgl.lwjgl:lwjgl_util_applet:jar:2.8.4 pom.xml /TheLabyrinth
Missing artifact org.lwjgl.lwjgl:lwjgl_util:jar:2.8.4 pom.xml /TheLabyrinth
Missing artifact org.lwjgl.lwjgl:lwjgl-platform:jar:natives-linux:2.8.4 pom.xml /TheLabyrinth
Missing artifact org.lwjgl.lwjgl:lwjgl-platform:jar:natives-osx:2.8.4 pom.xml /TheLabyrinth
Missing artifact org.lwjgl.lwjgl:lwjgl-platform:jar:natives-windows:2.8.4 pom.xml /TheLabyrinth
Missing artifact org.lwjgl.lwjgl:lwjgl:jar:2.8.4 pom.xml /TheLabyrinth
The container 'Maven Dependencies' references non existing library 'C:\Users\Wyatt\.m2\repository\java3d\vecmath\1.3.1\vecmath-1.3.1.jar' TheLabyrinth
The project cannot be built until build path errors are resolved TheLabyrinth
So as you can see it doesn't seem to be working very good. But looking at the errors it seems to be something wrong with my pom.xml so here's a copy of that:
<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.awsp8.labyrinth</groupId>
<artifactId>TheLabyrinth</artifactId>
<version>1.0.0</version>
<name>The Labyrinth</name>
<description>You are stuck in a room, no way out... Or so you think.</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<natives.version>0.0.6</natives.version>
<lwjgl.version>2.8.2</lwjgl.version>
<slick.version>274</slick.version>
<junit.version>4.10</junit.version>
</properties>
<repositories>
<repository>
<id>mavenNatives</id>
<name>Maven Natives Repository</name>
<url>http://mavennatives.googlecode.com/svn/repo</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>slick</id>
<name>slick</name>
<url>http://slick.cokeandcode.com/mavenrepo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.lwjgl.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
<version>2.8.4</version>
</dependency>
<dependency>
<groupId>org.lwjgl.lwjgl</groupId>
<artifactId>lwjgl_util</artifactId>
<version>2.8.4</version>
</dependency>
<dependency>
<groupId>org.lwjgl.lwjgl</groupId>
<artifactId>lwjgl_util_applet</artifactId>
<version>2.8.4</version>
</dependency>
<dependency>
<groupId>slick</groupId>
<artifactId>slick</artifactId>
<version>${slick.version}</version>
</dependency>
<dependency>
<groupId>java3d</groupId>
<artifactId>vecmath</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<plugin>
<groupId>com.googlecode.mavennatives</groupId>
<artifactId>maven-nativedependencies-plugin</artifactId>
<version>0.0.5</version>
<executions>
<execution>
<id>unpacknatives</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
</executions>
</plugin>
</project>
Am I doing something wrong? Thanks in advance.
I am going through this guide:
https://spring.io/guides/gs/rest-service/
I use Maven for building, so I've fetched the pom.xml linked in the official Spring guide:
https://github.com/spring-guides/gs-rest-service/blob/master/initial/pom.xml
<?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>org.springframework</groupId>
<artifactId>gs-rest-service</artifactId>
<version>0.1.0</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.0.1.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
</dependencies>
<properties>
<start-class>hello.Application</start-class>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-build</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<url>http://repo.spring.io/libs-snapshot</url>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>spring-repo</id>
<name>Spring Repository</name>
<url>http://repo.spring.io/release</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<url>http://repo.spring.io/libs-snapshot</url>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</project>
I get the following error when running mvn install
[ERROR] Error resolving version for plugin
org.springframework.boot:spring-boot-maven-build' from the
repositories [local (C:\Users\Laszlo_Szucs.m2\repository),
spring-snapshots (repo.spring.io/libs-snapshot), central
repo.maven.apache.org/maven2)]: Plugin not found in any plugin
repository -> [Help 1]
How do I know which version to provide in the pom.xml for this?
Check whether http://repo.spring.io/libs-snapshot is in pom.xml. If not, Add http://repo.spring.io/libs-snapshot to maven repository.
<repository>
<id>spring-repo</id>
<name>Spring Repository</name>
<url>http://repo.spring.io/release</url>
</repository>
And upgrade the maven to 3.0.5 above.
In my case, removing the ~/.m2/repository/org/springframework/boot folder and then cleaning the project resolved the issue. After this issue, I also faced another issue in which STS complained that my maven project was not updated. However, right clicking on the issues in the Markers area and selecting Quick Fix popped up a window which prompted me to update the maven projects. Selecting the projects and clicking the update button in this window resolved the issue.
I specified d goals as "spring-boot:run" (without quote) it works for me
procedure: right click on myproject>run as >run configurations >click on mavenbuild>goals(specify goal name)>run