Skip to content

CI friendly version not working as expected. #11795

@OldFarmer86

Description

@OldFarmer86

Affected version

3.9.9

Bug description

A multi-module project like below:

[ggfan@fedora 4d-scs]$ tree -L 2
.
├── pom.xml
├── README.md
├── scs-client
│   ├── pom.xml
│   ├── src
│   └── target
└── scs-server
    ├── build.sh
    ├── deployment.yaml
    ├── Dockerfile
    ├── pom.xml
    ├── src
    └── target

parent pom:

<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>
	<groupId>org.itps.scs</groupId>
	<artifactId>scs-parent</artifactId>
	<version>${revision}</version>
	<packaging>pom</packaging>
	<description>ITPS-软件供应链管理服务</description>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>3.4.3</version>
	</parent>
	<properties>
		<!-- -->
		<revision>0.0.1-SNAPSHOT</revision>
    </properties>
    ...
</project>

scs-client child module pom:

<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.itps.scs</groupId>
		<artifactId>scs-parent</artifactId>
		<version>${revision}</version>
		<relativePath />
	</parent>
	<artifactId>scs-client</artifactId>
	<description>供应链管理服务-客户端</description>
        ...
</project>

mvn command fails:

[ggfan@fedora 4d-scs]$ mvn clean compile -Drevision=0.0.1-SNAPSHOT
[INFO] Scanning for projects...
Downloading from xxx-maven-proxy: https://nexus.itps.xxx.com/repository/maven-public/org/itps/scs/scs-parent/$%7Brevision%7D/scs-parent-$%7Brevision%7D.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.itps.scs:scs-client:${revision}: The following artifacts could not be resolved: org.itps.scs:scs-parent:pom:${revision} (absent): Could not transfer artifact org.itps.scs:scs-parent:pom:${revision} from/to xxx-maven-proxy (https://nexus.itps.xxx.com/repository/maven-public/): status code: 400, reason phrase: Bad Request (400) and 'parent.relativePath' points at no local POM @ line 5, column 10
[FATAL] Non-resolvable parent POM for org.itps.scs:scs-server:${revision}: The following artifacts could not be resolved: org.itps.scs:scs-parent:pom:${revision} (absent): org.itps.scs:scs-parent:pom:${revision} failed to transfer from https://nexus.itps.xxx.com/repository/maven-public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of xxx-maven-proxy has elapsed or updates are forced. Original error: Could not transfer artifact org.itps.scs:scs-parent:pom:${revision} from/to xxx-maven-proxy (https://nexus.itps.xxx.com/repository/maven-public/): status code: 400, reason phrase: Bad Request (400) and 'parent.relativePath' points at no local POM @ line 5, column 10
 @ 
[ERROR] The build could not read 2 projects -> [Help 1]
[ERROR]   
[ERROR]   The project org.itps.scs:scs-client:${revision} (/home/ggfan/2-work/code/itps/4d-scs/scs-client/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.itps.scs:scs-client:${revision}: The following artifacts could not be resolved: org.itps.scs:scs-parent:pom:${revision} (absent): Could not transfer artifact org.itps.scs:scs-parent:pom:${revision} from/to xxx-maven-proxy (https://nexus.itps.xxx.com/repository/maven-public/): status code: 400, reason phrase: Bad Request (400) and 'parent.relativePath' points at no local POM @ line 5, column 10 -> [Help 2]
[ERROR]   
[ERROR]   The project org.itps.scs:scs-server:${revision} (/home/ggfan/2-work/code/itps/4d-scs/scs-server/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.itps.scs:scs-server:${revision}: The following artifacts could not be resolved: org.itps.scs:scs-parent:pom:${revision} (absent): org.itps.scs:scs-parent:pom:${revision} failed to transfer from https://nexus.itps.xxx.com/repository/maven-public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of xxx-maven-proxy has elapsed or updates are forced. Original error: Could not transfer artifact org.itps.scs:scs-parent:pom:${revision} from/to xxx-maven-proxy (https://nexus.itps.xxx.com/repository/maven-public/): status code: 400, reason phrase: Bad Request (400) and 'parent.relativePath' points at no local POM @ line 5, column 10 -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions