I have a parent pom like 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.parent.pom</groupId>
<artifactId>parent-pom</artifactId>
<version>1.0.0</version>
<name>parentpom</name>
<packaging>pom</packaging>
<properties>
<parentversion>1.0.0</parentversion>
</properties>
</project>
And my child pom is like .
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.parent.pom</groupId>
<artifactId>parent-pom</artifactId>
<version>${parentversion}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>com.child.pom</groupId>
<artifactId>child-pom</artifactId>
<version>2.0.0</version>
<name>Childpom</name>
<packaging>pom</packaging>
</project>
My folder structure is like
POM-test(root folder having parent pom) --- child(having the child pom)
when i ran mvn clean install in my child am getting the exception like below.
ERROR] The build could not read 1 project -> [Help 1]
ERROR]
ERROR] The project com.child.pom:child-pom:2.0.0 (C:\Users\kk\Desktop\POM-Test\child\pom.xml) has 1 error
ERROR] Non-resolvable parent POM: Could not transfer artifact com.parent.pom:parent-pom:pom:${parentversion} from/to central (http://repo.maven.apache.org/
maven2): Illegal character in path at index 63: http://repo.maven.apache.org/maven2/com/parent/pom/parent-pom/${parentversion}/parent-pom-${parentversion}.pom
and 'parent.relativePath' points at wrong local POM @ line 5, column 9 -> [Help 2
Why I am not able to install this pom ?