unresolvable parent POM at parent tag - maven

In the project i am working on i have the following pom.xml file. when right click and choose maven clean, i receive the following error
The project xx.xx.xx.xx.xx:0.0.1-SNAPSHOT (C:\Users\xx.xx\xx\xx-api\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for de.bund.jki.sf.awanti:api:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.6.RELEASE from/to osgeo (https://repo.osgeo.org/repository/release/): Remote host terminated the handshake and 'parent.relativePath' points at wrong local POM # line 10, column 10: SSL peer shut down incorrectly -> [Help 2]
[ERROR]
i referrd to some questions in our website but it did not solve the issue. for example to add relativePath tag, it did not solve the issue.
please find the pom.xml file posted below. and please let me know how to fix it
the error eclipse generates is at the
<parent>
and it says:
Project build error: Non-resolvable parent POM for xx.xx.xx.xx.xx:api:0.0.1-SNAPSHOT: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.1.6.RELEASE from https://repo.osgeo.org/repository/release/ was cached in the local repository, resolution will not be reattempted until the update interval of osgeo has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.6.RELEASE from/to osgeo (https://repo.osgeo.org/repository/release/): Remote host terminated the handshake and 'parent.relativePath' points at wrong local POM
code:
<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>de.xx.xx.xx.xx</groupId>
<artifactId>api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.6.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>

Please try the following:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.6.RELEASE</version>
<relativePath/>
</parent>

Related

How to resolve Springboot build error in STS - CoreException: Could not get the value for parameter compilerId for plugin execution default-compile

Here is my POM.xml file and Errors I got in STS as below:
<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.ducat.springboot.mongodb</groupId>
<artifactId>Ideas</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Ideas Maven Webapp</name>
<url>http://maven.apache.org</url>
<!-- spring boot parent dependency jar -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.1.RELEASE</version>
</parent>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
</dependencies>
<build>
<finalName>Ideas App</finalName>
</build>
</project>
CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.8.0 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-compiler-plugin:jar:3.8.0 -> org.apache.maven.shared:maven-shared-incremental:jar:1.1 -> org.apache.maven:maven-core:jar:2.2.1 -> org.apache.maven:maven-project:jar:2.2.1 -> org.apache.maven:maven-artifact-manager:jar:2.2.1 -> backport-util-concurrent:backport-util-concurrent:jar:3.1: ArtifactDescriptorException: Failed to read artifact descriptor for backport-util-concurrent:backport-util-concurrent:jar:3.1: ArtifactResolutionException: Failure to transfer backport-util-concurrent:backport-util-concurrent:pom:3.1 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 backport-util-concurrent:backport-util-concurrent:pom:3.1 from/to central (https://repo.maven.apache.org/maven2): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target pom.xml /Ideas line 13 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (execution: default-compile, phase: compile) pom.xml /Ideas line 13 Maven Project Build Lifecycle Mapping Problem
It would be generally helpful if you provide the stack trace as a code snippet to make it more readable.
It looks like the root cause is as follows:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
You should find posts here on StackOverflow or on the web that explain how to configure the JVM you are using to execute Maven. :)

jenkins not downloading parent POM for spring boot 2.2.2.Release

All flow is working fine locally but it is getting issue on jenkins. I am performing following steps:
1- created simple spring boot sample project downloaded strating from spring.io. Below is the 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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>13</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
2- On Jenkins -> Project -> Build Now -> Console Output. It just pull the latest code and run maven command
mvn clean install
Jenkins when work on POM, gives following error:
Downloading: http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.2.2.RELEASE/spring-boot-starter-parent-2.2.2.RELEASE.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.cassandra:datacenter-microservice:0.0.1 (/var/jenkins_home/workspace/dataservice-microservice/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.2.2.RELEASE from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.2.2.RELEASE/spring-boot-starter-parent-2.2.2.RELEASE.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. and 'parent.relativePath' points at no local POM # line 5, column 13 ->
You are using http instead of https cause central repository is only available via https and not via http anymore https://blog.sonatype.com/central-repository-moving-to-https.
This parent pom is there in https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter/ repository. Include this repository in your settings.xml

Maven Failed to Find dependency : prompt error of 'parent.relativePath' points at wrong local POM

I'm a newbie on Kotlin, Maven, and SpringBoot.
I encounter a problem when trying to build up the sample kotlin project. I actually did add external jar that needed. I just cut a few lines of error out because the other project has the same error.
[FATAL] Non-resolvable parent POM for com.jxinternet.platform:ms-common:1.0-SNAPSHOT: Failure to find com.jxinternet.platform:kotlin-starters:pom:1.0.1 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 and 'parent.relativePath' points at wrong local POM # line 3, column 13
[WARNING] 'parent.relativePath' of POM com.jxinternet.platform:ms-account:1.0-SNAPSHOT (C:\Development File\eclipse-workspace\kotlin-starters\ms-account\pom.xml) points at com.jxinternet.platform:kotlin-starters instead of com.jxinternet.platform:dao-starters, please verify your project structure # line 3, column 13
#
[ERROR] The build could not read 9 projects -> [Help 1]
[ERROR]
[ERROR] The project com.jxinternet.platform:ms-data:1.0-SNAPSHOT (C:\Development File\eclipse-workspace\kotlin-starters\ms-data\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.jxinternet.platform:ms-data:1.0-SNAPSHOT: Failure to find com.jxinternet.platform:kotlin-starters:pom:1.0.1 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 and 'parent.relativePath' points at wrong local POM # line 3, column 13 -> [Help 2]
[ERROR]
below is my build configuration. * I follow some StackOverflow answer*
This is my main 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>com.jxinternet.platform</groupId>
<artifactId>kotlin-starters</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>ms-parent</name>
<modules>
<module>otp</module>
<module>ms-data</module>
<module>ms-common</module>
<module>ms-account</module>
<module>ms-order</module>
<module>ms-su-web</module>
<module>ms-plugin-web</module>
<module>ms-merchant-web</module>
<module>ms-scheduled-task</module>
<module>ms-payment-web</module>
<!--<module>ms-test</module>-->
</modules>
<properties>
<spring.boot.version>2.0.1.RELEASE</spring.boot.version>
<spring.boot.redis.version>1.4.4.RELEASE</spring.boot.redis.version>
<logback.verion>4.11</logback.verion>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.jxinternet.platform</groupId>
<artifactId>otp</artifactId>
<version>${project.version}</version>
</dependency>
<!-- inner -->
<dependency>
<groupId>com.jxinternet.platform</groupId>
<artifactId>ms-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.jxinternet.platform</groupId>
<artifactId>ms-data</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.jxinternet.platform</groupId>
<artifactId>ms-account</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.jxinternet.platform</groupId>
<artifactId>ms-order</artifactId>
<version>${project.version}</version>
</dependency>
<!-- spring -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-redis</artifactId>
<version>${spring.boot.redis.version}</version>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>${logback.verion}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
</dependencies>
</dependencyManagement>
<distributionManagement>
<snapshotRepository>
<id>nexus</id>
<name>maven-snapshots</name>
<url>http://192.168.1.25:8081/repository/maven-snapshots/</url>
</snapshotRepository>
<repository>
<id>nexus</id>
<name>maven-releases</name>
<url>http://192.168.1.25:8081/repository/maven-releases/</url>
</repository>
</distributionManagement>
</project>
One of my child 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">
<parent>
<artifactId>kotlin-starters</artifactId>
<groupId>com.jxinternet.platform</groupId>
<version>1.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ms-account</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<dependencies>
<!-- inner -->
<dependency>
<groupId>com.jxinternet.platform</groupId>
<artifactId>ms-data</artifactId>
</dependency>
<dependency>
<groupId>com.jxinternet.platform</groupId>
<artifactId>ms-common</artifactId>
</dependency>
<dependency>
<groupId>com.jxinternet.platform</groupId>
<artifactId>otp</artifactId>
</dependency>
<!-- redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.jxinternet.platform</groupId>
<artifactId>money-system-parent</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Guys, I super newbie, I don't know what caused the error and don't know how to fix this. I'm looking for StackOverflow answer, some say look for my m2 folder. But i would'n know what to look for...I so lose. Thanks, guys.
Your parent version is 1.0-SNAPSHOT yet in the child pom.xml for ms-data you're specifying parent version as 1.0.1. It should be 1.0-SNAPSHOT. Check all others as well so the parent version matches.

Sonarqube maven plugin : "The 'report' parameter is missing" when analyzing Maven Project

My error log
I'm using sonarqube 6.7.1 to analyze my maven project (maven 3.5.2) & sonar-maven 3.4.0.905. I keep getting the error "The 'report' parameter is missing". I did researches for hours but looks like almost no one has had this error. Did anyone have this same issue?
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project university-service: The 'report' parameter is missing
Here is my 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.hoang.universityservice</groupId>
<artifactId>university-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>university-service</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
</parent>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
In our situation, the root cause was on the Sonar server:
sonar.log:Caused by: java.io.IOException: No space left on device
Freeing up disk space solved the issue.
If you ever get this error, all you have to do is to upgrade to Java SDK 9

Non-resolvable parent POM in Maven Project made with http://start.spring.io/

I've created a Maven Project using Spring Initializr, but when I try to build it I get the following error:
[ERROR] The project com.example:demo:0.0.1-SNAPSHOT (/home/alessandro/Work/workspaces/demo/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.4.2.RELEASE from/to repo (http://artifactory.dev.*****.it/artifactory/repo): Failed to transfer http://artifactory.dev.*****.it/artifactory/repo/org/springframework/boot/spring-boot-starter-parent/1.4.2.RELEASE/spring-boot-starter-parent-1.4.2.RELEASE.pom. Error code 504, Gateway Time-out and 'parent.relativePath' points at no local POM # line 14, column 10 -> [Help 2]
the auto-generated pom.xml is the following:
<?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.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.2.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
I tried to specify a relative path inside the parent tag (like '../pom.xml') without success, can anyone help me please?
Thanks
Nothing to do with start.spring.io.
You most probably have a custom ~/.m2/settings.xml where everything (or Maven Central) is proxied to http://artifactory.dev.*****.it/artifactory/repo/
Failed to transfer http://artifactory.dev.*****.it/artifactory/repo/org/springframework/boot/spring-boot-starter-parent/1.4.2.RELEASE/spring-boot-starter-parent-1.4.2.RELEASE.pom.
If that artifactory server is supposed to fetch outside, maybe there's a network glitch or something. Regardless, please ask the admin of that server for help.

Resources