KWON BYUNGCHANG created RANGER-5688:
---------------------------------------
Summary: maven-source-plugin.version property is referenced but
never defined
Key: RANGER-5688
URL: https://issues.apache.org/jira/browse/RANGER-5688
Project: Ranger
Issue Type: Bug
Components: build-infra
Affects Versions: 3.0.0
Reporter: KWON BYUNGCHANG
RANGER-4076 replaced the hardcoded maven-source-plugin version in the root
pom's pluginManagement with a property reference, but the property was never
defined:
{code:xml}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
{code}
git grep '<maven-source-plugin.version>' returns nothing.
Since pluginManagement entries are only resolved when the plugin is actually
invoked, normal builds are unaffected. But any invocation of the plugin by
prefix, e.g.:
{code}
mvn install source:jar
{code}
fails at startup, because the undefined property survives as a literal and
Maven tries to resolve version ${maven-source-plugin.version} from central:
{code}
[ERROR] Plugin
org.apache.maven.plugins:maven-source-plugin:${maven-source-plugin.version} or
one of its dependencies could not be resolved
{code}
Fix: define the property alongside the other plugin versions in the root pom,
e.g. <maven-source-plugin.version>3.3.1</maven-source-plugin.version>.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)