maven-pmd-plugin icon indicating copy to clipboard operation
maven-pmd-plugin copied to clipboard

IT "MPMD-335-aggregate-classpath-repositories" not compatible with Maven 4

Open Bukama opened this issue 9 months ago • 2 comments

Affected version

3.26.1-SNAPSHOT

Bug description

The IT MPMD-335-aggregate-classpath-repositories is not compatible with Maven 4 (see https://github.com/apache/maven-pmd-plugin/pull/190)

'repositories.repository.[corp1].url' contains an unsupported expression (only expressions starting with 'project.basedir' or 'project.rootDirectory' are supported).

The project.rootDirectory property only exists in Maven 4.

So the IT's repository definition using ${user.dir} is not compatible with Maven 4:

    <repositories>
        <repository>
            <id>corp1</id>
            <url>file://${user.dir}/private-repo</url>
        </repository>
    </repositories>

Bukama avatar Apr 19 '25 19:04 Bukama

Who's at fault here? Is this a issue in the IT or in Maven 4?

elharo avatar Apr 23 '25 11:04 elharo

Maven POM defined repositories URL cannot contain expressions (just a limited set of them), otherwise you get "chicken and egg" situation, as POM defined repo is meant for example to download parent POM.

cstamas avatar Apr 23 '25 11:04 cstamas