[
https://issues.apache.org/jira/browse/MRELEASE-1102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17719241#comment-17719241
]
Mahdi Konzali edited comment on MRELEASE-1102 at 5/4/23 9:47 AM:
-----------------------------------------------------------------
In fact no, because if it's so we must not have nullPointerException.
I've been through the source code and I figured out that in the map
construction you did the interpolation so we have like map= [quarkus.io :
\{Artifact}]
and later when you create release pom you don't do interpolation so you try to
do map.get(${quarkus.platform.group-id}) which returns null .
It's globally that, you can start from line ArtifactUtils.java:77 to figure
this out.
may be the solution is to add interpolation for groupIds in the release pom
creation.
Thanks and regards.
was (Author: JIRAUSER293500):
In fact no, because if it's so we must not have nullPointerException.
I've been through the source code and I figured out that in the map
construction you did the interpolation so we have like map= [quarkus.io :
\{Artifact}]
and later when you create release pom you don't do interpolation so you try to
do map.get(${quarkus.platform.group-id}) which returns null .
It's globally that, you can start from line ArtifactUtils.java:77 to figure
this out.
may be the solution is to add interpolation for groupIds in the release pom
creation.
Thanks and regards.
> prepare-with-pom : NullPointerException when plugin's group-id is a property
> ----------------------------------------------------------------------------
>
> Key: MRELEASE-1102
> URL: https://issues.apache.org/jira/browse/MRELEASE-1102
> Project: Maven Release Plugin
> Issue Type: Bug
> Components: prepare-with-pom
> Affects Versions: 3.0.0-M1, 3.0.0-M4, 3.0.0-M5, 3.0.0-M6
> Reporter: Mahdi Konzali
> Priority: Major
>
> we had in our initial pom
> <plugins>
> <plugin>
> <groupId>${quarkus.platform.group-id}</groupId>
> <artifactId>quarkus-maven-plugin</artifactId>
> <version>${quarkus.platform.version}</version>
> ...
> </plugin>
> when creating release pom from this original pom we had the error log below :
> Caused by: java.lang.NullPointerException at
> org.apache.maven.artifact.ArtifactUtils.versionlessKey
> (ArtifactUtils.java:77) at
> org.apache.maven.shared.release.phase.GenerateReleasePomsPhase.getReleaseVersion
> (GenerateReleasePomsPhase.java:528) at
> org.apache.maven.shared.release.phase.GenerateReleasePomsPhase.createReleasePlugins
> (GenerateReleasePomsPhase.java:580) at
> org.apache.maven.shared.release.phase.GenerateReleasePomsPhase.createReleaseModel
> (GenerateReleasePomsPhase.java:297) at
> org.apache.maven.shared.release.phase.GenerateReleasePomsPhase.generateReleasePom
> (GenerateReleasePomsPhase.java:164) at
> org.apache.maven.shared.release.phase.GenerateReleasePomsPhase.generateReleasePoms
> (GenerateReleasePomsPhase.java:151) at
> org.apache.maven.shared.release.phase.GenerateReleasePomsPhase.execute
> (GenerateReleasePomsPhase.java:129) at
> org.apache.maven.shared.release.phase.GenerateReleasePomsPhase.simulate
> (GenerateReleasePomsPhase.java:426) at
> org.apache.maven.shared.release.DefaultReleaseManager.prepare
> (DefaultReleaseManager.java:220) at
> org.apache.maven.shared.release.DefaultReleaseManager.prepare
> (DefaultReleaseManager.java:122) at
> org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease
> (PrepareReleaseMojo.java:416) at
> org.apache.maven.plugins.release.PrepareWithPomReleaseMojo.execute
> (PrepareWithPomReleaseMojo.java:48) at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> (DefaultBuildPluginManager.java:137) at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:210) at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:156) at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:148)
> replacing the property by its value resolves the problem by our side.
> But if this passes the build and package goals it should pass the
> prepare-with-pom goal
--
This message was sent by Atlassian Jira
(v8.20.10#820010)