How to download maven dependency as *.jar file? - java

I attempt to implement the example from here, but upon the Maven dependencies installation I can't find jar file amongst downloaded dependencies.
My pom.xml looks like this:
<?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>
<!-- This is often your domain name (reversed.) -->
<groupId>com.abc</groupId>
<!-- The name of this project (actually, the name of the artifact, which is the thing that this project produces. A jar in this case.) -->
<artifactId>javaparser-maven-sample</artifactId>
<!-- The version of this project. SNAPSHOT means "we're still working on it" -->
<version>1.0-SNAPSHOT</version>
<properties>
<!-- Tell Maven we want to use Java 8 -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- Tell Maven to treat all source files as UTF-8 -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<geotools.version>2.5.7</geotools.version>
</properties>
<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net repository</name>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<id>osgeo</id>
<name>Open Source Geospatial Foundation Repository</name>
<url>http://download.osgeo.org/webdav/geotools/</url>
</repository>
<repository> <!--Add the snapshot repository here-->
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>opengeo</id>
<name>OpenGeo Maven Repository</name>
<url>http://repo.opengeo.org</url>
</repository>
</repositories>
<dependencies>
<!-- Here are all your dependencies. Currently only one. These are automatically downloaded from https://mvnrepository.com/ -->
<dependency>
<groupId>com.github.javaparser</groupId>
<artifactId>javaparser-core</artifactId>
<version>3.15.21</version>
</dependency>
<!-- https://mvnrepository.com/artifact/mil.nga.geopackage/geopackage -->
<dependency>
<groupId>mil.nga.geopackage</groupId>
<artifactId>geopackage</artifactId>
<version>3.5.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.geotools/gt-api -->
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-api</artifactId>
<version>20.5</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-epsg-hsql</artifactId>
<version>${geotools.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.geotools/gt-geometry -->
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-geometry</artifactId>
<version>2.5-M2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.geotools/gt-referencing -->
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-referencing</artifactId>
<version>17.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.locationtech.jts.io/jts-io-common -->
<dependency>
<groupId>org.locationtech.jts.io</groupId>
<artifactId>jts-io-common</artifactId>
<version>1.16.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.opengis/geoapi -->
<dependency>
<groupId>org.opengis</groupId>
<artifactId>geoapi</artifactId>
<version>3.0.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.geotools/gt-jts-wrapper -->
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-jts-wrapper</artifactId>
<version>17.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-swing</artifactId>
<version>17.0</version>
</dependency>
</dependencies>
<!-- This blob of configuration tells Maven to make the jar executable. You can run it with:
mvn clean package
java -jar target/javaparser-maven-sample-1.0-SNAPSHOT-shaded.jar
-->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.3</version>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.abc.conversion.LogicPositivizer</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
I am able to download all the jars except geotools related jars. When I clean and run the project, in the .m2 folder I am not able to see the geotool related jars. Even in the maven repository I am not able to download the jar file.
Maven repo
Is there any alternative way to proceed?

The repository run by Boundless has been replaced by one hosted by OSGeo. The OSGeo webdav repo was merged into the new OSGeo repo. Details are here (https://docs.geotools.org/latest/userguide/tutorial/quickstart/maven.html)
Replace this block
<repository>
<id>osgeo</id>
<name>Open Source Geospatial Foundation Repository</name>
<url>http://download.osgeo.org/webdav/geotools/</url>
</repository>
<repository> <!--Add the snapshot repository here-->
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>opengeo</id>
<name>OpenGeo Maven Repository</name>
<url>http://repo.opengeo.org</url>
</repository>
with
<repository>
<id>osgeo</id>
<name>OSGeo Release Repository</name>
<url>https://repo.osgeo.org/repository/release/</url>
<snapshots><enabled>false</enabled></snapshots>
<releases><enabled>true</enabled></releases>
</repository>
<repository>
<id>osgeo-snapshot</id>
<name>OSGeo Snapshot Repository</name>
<url>https://repo.osgeo.org/repository/snapshot/</url>
<snapshots><enabled>true</enabled></snapshots>
<releases><enabled>false</enabled></releases>
</repository>

If you paste the Open Source Geospatial Foundation Repository URL in your web browser and hit enter it will return 404 Not Found error. This happens when Maven attempts to connect to that resource to fetch dependency for you but it's no longer available. However, if you pay close attention to Maven Repo link, there is a note:
Note: this artefact is located at Boundless repository (https://repo.boundlessgeo.com/main/)
Try to replace http://download.osgeo.org/webdav/geotools/ with a given in the note URL and run mvn clean install
Please let me know if that worked for you.

Related

Netbeans Maven Failed to execute goal on project

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

Maven can't resolve the Kotlin Maven Plugin jar

Not sure how to fix this.
I want this version of the Kotlin runtime and maven plugin.
These are the bits in my pom.xml:
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-runtime</artifactId>
<version>1.2-M2</version>
</dependency>
<build>
<plugins>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>1.2-M2</version>
<executions>
And I added this as a repo:
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>kotlin-bintray</id>
<name>Kotlin Bintray</name>
<url>http://dl.bintray.com/kotlin/kotlin-dev/</url>
</repository>
I get this error:
Failure to find
org.jetbrains.kotlin:kotlin-maven-plugin:jar:1.2-M2 in
https://repo.maven.apache.org/maven2 was cached in the local
repository, resolution will not be reattempted until the update
interval of central has elapsed or updates are
forced
But I don't see anything that might be wrong.
By the way, notice that the runtime jar is found, so the repository section must be correct since this repository is where maven finds it. The maven plugin jar is a different matter for some reason though...
I just fixed. It was something really silly. I found out that for plugins one needs to define a plugin repository section.
<pluginRepositories>
<pluginRepository>
<id>kotlin-bintray</id>
<name>Kotlin Bintray</name>
<url>http://dl.bintray.com/kotlin/kotlin-dev</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
And now it works. I guess I should spend more time learning maven in depth :)
To make sure it downloads fresh from maven central you will need to blow away your local copy, so delete the directory:
~/.m2/repo/org/jetbrains/kotlin/kotlin-maven-plugin
You will also need to add the 3rd party repo to your settings.xml at ~/.m2 see here
<settings>
...
<profiles>
...
<profile>
<id>myprofile</id>
<repositories>
<repository>
<id>my-repo2</id>
<name>your custom repo</name>
<url>https://dl.bintray.com/kotlin/kotlin-dev/</url>
</repository>
</repositories>
</profile>
...
</profiles>
<activeProfiles>
<activeProfile>myprofile</activeProfile>
</activeProfiles>
...
</settings>
At the documentation, we can see how to implement Compiler Plugins
For kotlin-allopen add the followin <configuration> and <pluginOptions> inside the <plugin> tag
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>${kotlin.version}</version>
<configuration>
<compilerPlugins>
<!-- Or "spring" for the Spring support -->
<plugin>all-open</plugin>
</compilerPlugins>
<pluginOptions>
<!-- Each annotation is placed on its own line -->
<option>all-open:annotation=com.my.Annotation</option>
<option>all-open:annotation=com.their.AnotherAnnotation</option>
</pluginOptions>
</configuration>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-allopen</artifactId>
<version>${kotlin.version}</version>
</dependency>
</dependencies>
</plugin>
i just added this line and it worked for me
<version>${kotlin.version}</version>

Return code is: 409, ReasonPhrase:Conflict (JCenter)

I have a artificact deployed in JCenter (oss.jfrog.org) although the deployment did not end without error (see Deploy SNAPSHOT to oss.jfrog.org (JCenter)), the jars are there when I check the Repository browser.
Now I add the dependency in a project for this artifact (library) and adding:
<repositories>
<!-- Release repository -->
<repository>
<id>oss-jfrog-artifactory-releases</id>
<name>oss-jfrog-artifactory-releases</name>
<url>http://oss.jfrog.org/artifactory/oss-release-local</url>
</repository>
<!-- Snapshot repository -->
<repository>
<id>oss-jfrog-artifactory-snapshots</id>
<name>oss-jfrog-artifactory-snapshots</name>
<url>http://oss.jfrog.org/artifactory/oss-snapshot-local</url>
</repository>
</repositories>
When maven started building, it throws this error:
Failed to transfer file: http://oss.jf
rog.org/artifactory/oss-release-local/com/myorg/mylibrary/0.0.1-SNAPSHOT/mylibrary-0.0.1-SNAPSHOT.pom. Return code is: 409, ReasonPhrase:Conflict. -> [Help 1]
for the dependency I added. What could be the problem here?
Try using the virtual repositories
<repositories>
<!-- Release repository -->
<repository>
<id>oss-jfrog-artifactory-releases</id>
<name>oss-jfrog-artifactory-releases</name>
<url>http://oss.jfrog.org/artifactory/libs-release</url>
</repository>
<!-- Snapshot repository -->
<repository>
<id>oss-jfrog-artifactory-snapshots</id>
<name>oss-jfrog-artifactory-snapshots</name>
<url>http://oss.jfrog.org/artifactory/libs-snapshot</url>
</repository>
</repositories>
I have a workaround. No idea why, but in my case adding shade plugin to all modules solved the problem, even an empty one:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<artifactSet>
</artifactSet>
<relocations>
</relocations>
</configuration>
</plugin>
</plugins>
</build>

Qt Jambi Javadoc missing

When i fetched qt jambi jars from maven repository i found that there is no javadocs in it.
Downloading javadocs in maven didn't help.
My pom.xml:
<dependencies>
<dependency>
<groupId>net.sf.qtjambi</groupId>
<artifactId>qtjambi</artifactId>
<version>4.6.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>net.sf.qtjambi</groupId>
<artifactId>qtjambi-maven-plugin</artifactId>
<configuration>
<!-- Specifies where sources are. This parameter is MANDATORY -->
<sourcesDir>src/main/java</sourcesDir>
<!-- following parameters aren't mandatory, they use defaults as specified
here if not specified <translationsDir>src/main/resources/translations</translationsDir>
<destinationDir>target/generated-sources/qtjambi</destinationDir> -->
<!-- cause -noobsolete switch for lupdate -->
<noObsoleteTranslations>true</noObsoleteTranslations>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>qtjambi</id>
<name>qtjambi</name>
<url>http://qtjambi.sourceforge.net/maven2/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>qtjambi</id>
<name>qtjambi</name>
<url>http://qtjambi.sourceforge.net/maven2/</url>
</pluginRepository>
</pluginRepositories>
I've tried to download jar manually, but there is still no javadoc in it.
http://repository.qt-jambi.org/nexus/content/repositories/releases-before-2011/net/sf/qtjambi/qtjambi-maven-plugin/4.6.3.1/ should contains qtjambi-maven-plugin-4.6.3.1-javadoc.jar. It's not there, so file a request at that project that they upload there javadocs as well.

Cannot build Spring 4 project with Maven

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

Categories

Resources