[
https://issues.apache.org/jira/browse/MNG-8638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17943753#comment-17943753
]
Tamas Cservenak commented on MNG-8638:
--------------------------------------
{quote}is it really a feature to consider repositories declared in referenced
poms?
{quote}
Yes, and always has been. Maven will "follow" repository declarations as it
discovers them. To fix your issue, you can:
* use new CLI switch {{-itr}}
* use RRF https://maven.apache.org/resolver/remote-repository-filtering.html
> Properties in repository id/url not supported anymore
> -----------------------------------------------------
>
> Key: MNG-8638
> URL: https://issues.apache.org/jira/browse/MNG-8638
> Project: Maven
> Issue Type: Bug
> Components: Core
> Affects Versions: 4.0.0-rc-3
> Reporter: Marc Guillemot
> Priority: Major
>
> Following pom.xml can be used with Maven 3.9.x but not mit Maven 4.
> {code:xml}
> <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>test</groupId>
> <artifactId>properties-in-repos</artifactId>
> <version>0.0.1-SNAPSHOT</version>
> <packaging>pom</packaging>
> <properties>
> <repo.snapshots.id>snapshotsRepo</repo.snapshots.id>
>
> <repo.snapshots.url>https://my.server/snapshotsRepo</repo.snapshots.url>
> </properties>
> <profiles>
> <profile>
> <id>useNightlySnapshot</id>
> <properties>
>
> <repo.snapshots.id>nightlySnapshotsRepo</repo.snapshots.id>
>
> <repo.snapshots.url>https://my.server/nightlySnapshotsRepo</repo.snapshots.url>
> </properties>
> </profile>
> </profiles>
> <repositories>
> <repository>
> <id>${repo.snapshots.id}</id>
> <url>${repo.snapshots.url}</url>
> <releases>
> <enabled>false</enabled>
> </releases>
> </repository>
> </repositories>
> </project>
> {code}
> Maven 4.0.0-rc-3 fails with following error:
> {code:java}
> [ERROR] Some problems were encountered while processing the POMs
> [ERROR] The build could not read 1 project -> [Help 1]
> [ERROR]
> [ERROR] The project test:properties-in-repos:pom:0.0.1-SNAPSHOT
> (C:\dev\eclipse-workspace-okular-bis\poc-dynamic-mvn-deploy\pom.xml) has 1
> error
> [ERROR] 'repositories.repository.[${repo.snapshots.id}].url' contains an
> unsupported expression (only expressions starting with 'project.basedir' or
> 'project.rootDirectory' are supported). @
> test:properties-in-repos:0.0.1-SNAPSHOT,
> file://[sic]/poc-dynamic-mvn-deploy/pom.xml, line 26, column 13
> {code}
> This would block our migration to Maven 4 as we use such a construct to
> deploy snapshots from nightly builds to a separate repository.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)