I am new to the spring boot framework and I'm trying to import the Maven libraries, but I keep getting an error with my pom.xml. Please Help!
Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.0.4.RELEASE from 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. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.4.RELEASE from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org
Dependency 'org.springframework.boot:spring-boot-starter-web:' not found less... (Ctrl+F1)
Inspection info: Inspects a Maven model for resolution problems.
Plugin 'org.springframework.boot:spring-boot-maven-plugin:2.0.4.RELEASE' not found less... (Ctrl+F1)
Inspection info: Inspects a Maven model for resolution problems.
Here is my pom.xml below:
<?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.cierra</groupId>
<artifactId>spring-boot</artifactId>
<version>0.0.1-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.0.4.RELEASE</version>
</plugin>
</plugins>
</build>
</project>
This maybe due to the reason that it is not able to connect and transfer dependencies specified in pom.xml file. The details where it is trying to connect must be mentioned in your settings.xml under .m2 folder
Try adding the pluginRepositories in your pom.xml file:
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<url>http://repo.spring.io/libs-snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
try adding following repository elements inside repositories element in your pom.xml
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
If this set well, change your updatePolicy settings.
<repository>
<id>myRepo</id>
<name>My Repository</name>
<releases>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
Refer question.
The problem was I was behind a proxy that was blocking my pom.xml from running properly. After using a VPN to run the application, it works fine now.
Change Your Maven Version Ad Check Again.
Install Maven and Then Go to File/setting/build,execution,.../build Tools/maven
And Change Maven Home Directory to Your Install Maven Directory
Related
My pom doesn't download this dependancy splunk:jar:1.6.0.0 though the remote repositories does host this jar.
Also, my IDE doesn't have internet/proxy issues while downloading other maven repositories.
Below is the mvn 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.jl</groupId>
<artifactId>p1p2checklist</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>p1p2checklist</name>
<description>P1P2 project for John Lewis Partnership</description>
<dependencies>
<dependency>
<groupId>com.splunk</groupId>
<artifactId>splunk</artifactId>
<version>1.6.0.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>splunk-artifactory</id>
<name>Splunk Releases</name>
<url>http://splunk.artifactoryonline.com/splunk/ext-releases-local</url>
</repository>
</repositories>
</project>
The remote repository url (link) mentioned in above pom does contain the jar, however I'm not sure why the jar isn't downloaded.
Any help would be much appreciated.
Many Thanks in advance.
You are missing dependencies around your dependency tag.
<dependencies>
<dependency>
<groupId>com.splunk</groupId>
<artifactId>splunk</artifactId>
<version>1.6.0.0</version>
</dependency>
</dependencies>
This error encountered because splunk:jar:1.6.0.0 not found at http://splunk.artifactoryonline.com/splunk/ext-releases-local so please update it to https://splunk.artifactoryonline.com/artifactory/ext-releases-local at nifi-splunk-bundle's POM.xml file.
<repository>
<id>splunk</id>
<name>Splunk Artifactory</name>
<url>http://splunk.artifactoryonline.com/artifactory/ext-releases-local/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
This question already has answers here:
How to add local jar files to a Maven project?
(36 answers)
Closed 7 years ago.
I have to include fixedformat4j-root dependency in my pom.xml.
I get artifact info (group, version, ...) from the pom.xml of the project homepage:
https://github.com/jeyben/fixedformat4j/blob/master/pom.xml
When I store that info to my pom.xml, I got this error from m2e eclipse plugin:
Missing artifact
com.ancientprogramming.fixedformat4j:fixedformat4j-root:jar:1.4.0-SNAPSHOT
This is my pom.xml
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
...
<dependencies>
...
<dependency>
<groupId>com.ancientprogramming.fixedformat4j</groupId>
<artifactId>fixedformat4j-root</artifactId>
<version>1.4.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray</id>
<url>http://jcenter.bintray.com</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</pluginRepository>
</pluginRepositories>
<build>
...
</build>
<reporting>
...
</reporting>
</project>
How can I solve this error? Should I set a new repository? Where can I find the repository url from the project pom.xml?
Neither of the repositories you've listed in your POM contain that version of that artifact. They each contain several release versions, but no snapshots.
Looking at the source for this artifact it does appear to be at version 1.4.0-SNAPSHOT but that version has not been deployed to a repository. Either build it yourself locally (via mvn clean install) or reference one of the versions in the given repositories.
I am trying to use some dependency coming from JCenter, rather than the standard maven repositories, but when using
mvn clean install
this results in the following error in my maven output (Compilation error)
package com.bol.api.openapi_4_0 does not exist
cannot find symbol
symbol: class SearchResults
location: class be.goedkoperzoeken.results.BolSearchResults
Etc.
This is my pom.xml for my project
<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>bla.foo.blaat</groupId>
<artifactId>bolapi</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>blaat</name>
<dependencies>
<dependency>
<groupId>com.bol.openapi</groupId>
<artifactId>openapi-java-client</artifactId>
<version>4.0.1</version>
</dependency>
</dependencies>
<repositories>
<repository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>bintray-pvdissel-bol-com-releases</id>
<name>bintray</name>
<url>http://dl.bintray.com/pvdissel/bol-com-releases</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-pvdissel-bol-com-releases</id>
<name>bintray-plugins</name>
<url>http://dl.bintray.com/pvdissel/bol-com-releases</url>
</pluginRepository>
</pluginRepositories>
What am I missing here? It seems to me like my pom.xml has all the information required and Eclipse does not seem to complain.
The error Missing artifact org.sdmxsource:SdmxApi:jar:1.2.7 appears when defining dependencies in the m2eclipss.
I used this definition:
<dependency>
<groupId>org.sdmxsource</groupId>
<artifactId>SdmxApi</artifactId>
<version>1.2.7</version>
</dependency>
What may cause such a problem? Is there another way to import packages from nexus repository(eclipse IDE)?
Thanks in advance
Have you tried manually downloading the dependencies? See the sdmxsource help page: http://www.sdmxsource.org/sdmxsource-java/.
You could also use the parent tag in pom file:
<parent>
<artifactId>SdmxSourceBase</artifactId>
<groupId>org.sdmxsource</groupId>
<version>1.5.3</version>
</parent>
And the following repository in the maven settings.xml file:
<profiles>
<profile>
<id>sdmxsource</id>
<repositories>
<repository>
<id>MTRepo</id>
<url>http://sdmxsource.metadatatechnology.com/nexus/content/repositories/releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>sdmxsource</activeProfile>
</activeProfiles>
Looking at Spring Boot here:
http://projects.spring.io/spring-boot/#quick-start
It appears the "Quick Start" says to include:
<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>
</dependencies>
The following are my current repositories:
<repositories>
<repository>
<id>spring-milestones</id>
<url>http://repo.spring.io/milestone</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-milestones</id>
<url>http://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>
I get a connection timed out exception and when I actually look at the repository...
http://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-parent/
There is no 1.0.1! Is there some other repository that the pom.xml should contain?
Error:
Project build error: Non-resolvable parent POM: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:1.0.0.RC5 from http://repo.spring.io/
milestone was cached in the local repository, resolution will not be reattempted until the update interval of spring-milestones has elapsed or updates are forced.
Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.0.0.RC5 from/to spring-milestones (http://repo.spring.io/
milestone): connection timed out to http://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-parent/1.0.0.RC5/spring-boot-starter-
parent-1.0.0.RC5.pom and 'parent.relativePath' points at wrong local POM
It exists in central repository add following to your pom.xml
<project ...>
<repositories>
<repository>
<id>central</id>
<url>http://central.maven.org/maven2/</url>
</repository>
</repositories>
</project>