Skip to content

Maven 4 (rc5) creates effective pom with wrong <project> header #11715

Description

@RalfNaujokat

Affected version

4.0.0-rc5

Bug description

Hi all.

With a minimal POM

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.1.0"
		 xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 http://maven.apache.org/xsd/maven-4.1.0.xsd">
	<modelVersion>4.1.0</modelVersion>


	<groupId>tmp</groupId>
	<artifactId>tmp</artifactId>
	<version>tmp</version>
	<packaging>pom</packaging>


</project>

i noticed, that mvn help:effective-pom
generates a pom with 4.0.0 schemaLocation

Effective POMs, after inheritance, interpolation, and profiles are applied:

<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== -->
<!--                                                                        -->
<!-- Generated by Maven Help Plugin                                         -->
<!-- See: https://maven.apache.org/plugins/maven-help-plugin/               -->
<!--                                                                        -->
<!-- ====================================================================== -->
<!-- ====================================================================== -->
<!--                                                                        -->
<!-- Effective POM for project 'tmp:tmp:pom:tmp'                            -->
<!--                                                                        -->
<!-- ====================================================================== -->
<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.1.0</modelVersion>
  <groupId>tmp</groupId>
  <artifactId>tmp</artifactId>
  <version>tmp</version>
  <packaging>pom</packaging>

  ...

I don't know what are the consequences, but i guess this should be corrected.

greetings
Ralf

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:blockerBlocks development and/or testing work, production could not run

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions