Summary
Starting with org.mortbay.jasper:apache-el:9.0.108, the published POM is a <distributionManagement><relocation> to org.mortbay.jasper:mortbay-apache-el whose <version> element is the literal string ${project.version}. The placeholder is not interpolated during the publish step, so it appears verbatim in the deployed POM:
<distributionManagement>
<relocation>
<groupId>org.mortbay.jasper</groupId>
<artifactId>mortbay-apache-el</artifactId>
<version>${project.version}</version>
<message>This artifact has been relocated to org.mortbay.jasper:mortbay-apache-el ...</message>
</relocation>
</distributionManagement>
The relocation target artifact org.mortbay.jasper:mortbay-apache-el:9.0.118 itself is published correctly.
Ideally a deployed POM should not contain unresolved Maven property references.
Maven
A minimal Maven build with a dependency on apache-el:9.0.118 resolves successfully and logs:
[WARNING] The artifact org.mortbay.jasper:apache-el:jar:9.0.118 has been relocated
to org.mortbay.jasper:mortbay-apache-el:jar:9.0.118: This artifact has been relocated ...
Gradle
With newer Gradle versions, the placeholder is resolved against the relocated POM's parent and the build succeeds.
With Gradle <= 8.5, there is a resolution failure.
settings.gradle:
rootProject.name = "jasper-el-repro"
build.gradle:
plugins { id "java" }
repositories { mavenCentral() }
dependencies {
implementation "org.mortbay.jasper:apache-el:9.0.118"
}
task resolveIt {
doLast {
configurations.runtimeClasspath.files.each { println it }
}
}
gradle/wrapper/gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Run:
./gradlew --refresh-dependencies resolveIt
Output:
* What went wrong:
Execution failed for task ':resolveIt'.
> Could not resolve all files for configuration ':runtimeClasspath'.
> Could not find org.mortbay.jasper:mortbay-apache-el:${project.version}.
Required by:
project : > org.mortbay.jasper:apache-el:9.0.118
Summary
Starting with
org.mortbay.jasper:apache-el:9.0.108, the published POM is a<distributionManagement><relocation>toorg.mortbay.jasper:mortbay-apache-elwhose<version>element is the literal string${project.version}. The placeholder is not interpolated during the publish step, so it appears verbatim in the deployed POM:The relocation target artifact
org.mortbay.jasper:mortbay-apache-el:9.0.118itself is published correctly.Ideally a deployed POM should not contain unresolved Maven property references.
Maven
A minimal Maven build with a dependency on
apache-el:9.0.118resolves successfully and logs:Gradle
With newer Gradle versions, the placeholder is resolved against the relocated POM's parent and the build succeeds.
With Gradle <= 8.5, there is a resolution failure.
settings.gradle:build.gradle:plugins { id "java" } repositories { mavenCentral() } dependencies { implementation "org.mortbay.jasper:apache-el:9.0.118" } task resolveIt { doLast { configurations.runtimeClasspath.files.each { println it } } }gradle/wrapper/gradle-wrapper.properties:Run:
Output: