apache / apache/maven-help-plugin

help:evaluate returns wrong values for properties

Open
#351 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
29
Forks
42
Avg merge
1d 12h
Merged PRs (30d)
6

Description

### Affected version

at least 3.5.1, likely earlier versions too

### Bug description

I am using maven v3.9.11

In my `pom.xml` I define something like
```

11
11
UTF-8
foo-bar

```

If I run
```
mvn org.apache.maven.plugins:maven-help-plugin:3.5.1:evaluate -Dexpression='plugin.id' -q -DforceStdout
```

I'd expect to get back `foo-bar`, instead I get back `org.apache.maven.plugins:maven-help-plugin:3.5.1`.

Using `project.properties.plugin.id` I get `null object or invalid expression`. I can however get all of the properties (including `plugin.id`) if I only use `project.properties`.

I have also tried with -Dartifact specified - the behavior didn't change.

This might be related to #310 and #336.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the maven-help-plugin help:evaluate entry point and reproduce the command shown with the sample pom.xml properties. Trace how the expression and project.properties are resolved, then verify that plugin.id returns foo-bar and project.properties.plugin.id resolves successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.