Skip to content

Commit

Permalink
[MNG-8075] Allow project.baseUri in repository.url
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekjaranowski committed Mar 15, 2024
1 parent 33788fd commit 1fc87b8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -982,10 982,12 @@ private void validateRawRepositories(
repository.getUrl(),
null,
repository)) {
// only allow ${basedir} and ${project.basedir}
// only allow ${basedir}, ${project.basedir} or ${project.baseUri}
Matcher m = EXPRESSION_NAME_PATTERN.matcher(repository.getUrl());
while (m.find()) {
if (!("basedir".equals(m.group(1)) || "project.basedir".equals(m.group(1)))) {
if (!("basedir".equals(m.group(1))
|| "project.basedir".equals(m.group(1))
|| "project.baseUri".equals(m.group(1)))) {
validateStringNoExpression(
prefix prefix2 "[" repository.getId() "].url",
problems,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 37,14 @@ under the License.
<id>repo</id>
<url>file://${basedir}/target/remote-repo</url>
</repository>
<repository>
<id>repo-project-basedir</id>
<url>file://${project.basedir}/sdk/maven/repo</url>
</repository>
<repository>
<id>repo-project-baseUri</id>
<url>${project.baseUri}/sdk/maven/repo</url>
</repository>
</repositories>

</project>
</project>

0 comments on commit 1fc87b8

Please sign in to comment.