Maven Clean Issue - Non-Resolvable Import Pom - Could Not Transfer Artifact from Nexus

Non-resolvable import POM: Failure to transfer

For everyone who wants to know how I resolved this issue:

First of all like khmarbaise already mentioned, it was a proxy issue. It was already configured in eclipse, therefore I assumned that maven will automatically use the already set proxy configurations from eclipse.

The solution was to create/modify the settings.xml and set it via following eclipse configuration steps:

Window -> Preferences -> Maven -> User Settings, and there configure the path to the settings.xml at the User Settings Input.

I edited my settings.xml and configured my company proxy in it.

Non-resolvable parent POM: Could not transfer artifact when trying to refer to a parent pom from a child pom with ${parent.groupid}

Looks like you're trying to both inherit the groupId from the parent, and simultaneously specify the parent using an inherited groupId!

In the child pom, use something like this:

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.felipe</groupId>
<artifactId>tutorial_maven</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>tutorial_maven_jar</artifactId>

Using properties like ${project.groupId} won't work there. If you specify the parent in this way, then you can inherit the groupId and version in the child pom. Hence, you only need to specify the artifactId in the child pom.

Could not transfer artifact from/to central intellij

Solution 1: I have fixed this issue, in menu choose File -> Setting -> Build, Execution, Deployment ->Build Tools -> Maven.
In section User setting file stick Override and browse to settings.xml of Maven (in my case the settings.xml file in directory ..\apache-maven-3.6.3\conf .

I have proxy configuration in settings.xml)
Sample Image

Solution 2:

In my case I have problem with com/jolira/hickory/1.0.0/hickory-1.0.0.pom

Similar your case with another library

I go to repository of hickory on https://mvnrepository.com

Sample Image

I download .jar file and .pom file from maven page

Sample Image

go to {your .m2 directory home}.m2\repository\com\jolira\hickory\1.0.0 and past the hickory-1.0.0.jar and the hickory-1.0.0.pom to there

Sample Image

open command line and run mvn clean install again. It should sucessful

Non-resolvable import POM Failure to find

The version 2.0.0.M6 isn't located in the repo http://repo.maven.apache.org/maven2. If you wan't to use this version you have to use the maven repo http://repo.spring.io/milestone. So add it to your POM file:

<repositories>
<repository>
<id>spring-milestone-repo</id>
<url>http://repo.spring.io/milestone/</url>
</repository>
</repositories>

I would recommend you to use the latest release version of spring-boot (1.5.8.RELEASE), not a milestone version. I don't know how your POM looks like, but you can define spring boot in your POM in different ways:

1. Using the Spring Boot parent POM

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.8.RELEASE</version>
</parent>

Then you can add the dependencies you wish to use e.g.:

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

See: https://spring.io/guides/gs/spring-boot/

2. Declare Spring-Boot in Dependency-Management

If you already using an own parent POM, you could also import the spring boot dependency management in your POM:

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.5.8.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Same as in variant #1 you can declare afterwards the dependencies of spring boot you wish to use.

Could not transfer artifact (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version -> [Help 1]

Sonatype no longer supports TLSv1.1 and below (effective, June 18th, 2018). My guess is that you are using TLSv1.1 protocol or below.

The documentation I listed gives you 4 options:

  1. Upgrade your Java runtime, for example with OpenJDK builds or Oracle paying support
  2. Configure your Java runtime to enable TLS 1.2 by adding -Dhttps.protocols=TLSv1.2
  3. Use a repository manager that uses a Java version supporting TLS 1.2
  4. Revert back to http until you can acheive one of the above remediation steps.

I fixed it myself by just using -Dhttps.protocols=TLSv1.2 as a VM argument.
 



Related Topics



Leave a reply



Submit