Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Include parent properties when doing late replacement of argLine #1976

Closed
wants to merge 1 commit into from

Conversation

basil
Copy link
Contributor

@basil basil commented Apr 2, 2022

When doing late replacement of properties in argLine, the Maven plugin correctly considers properties defined in the POM, but it fails to consider properties defined in the parent POM. This PR corrects the problem by consulting the model for such properties. The included test case fails without the changes to plugins/maven/src/main with this stack trace:

junit.framework.AssertionFailedError: 
Expected :[-ea, module.value, parent.value]
Actual   :[-ea, module.value, @{parentProp}]
	at junit.framework.Assert.fail(Assert.java:57)
	at junit.framework.Assert.failNotEquals(Assert.java:329)
	at junit.framework.Assert.assertEquals(Assert.java:78)
	at junit.framework.Assert.assertEquals(Assert.java:86)
	at junit.framework.TestCase.assertEquals(TestCase.java:253)
	at org.jetbrains.idea.maven.execution.MavenJUnitPatcherTest.ArgLineLateReplacementParentProperty(MavenJUnitPatcherTest.java:397)

With the changes to plugins/maven/src/main, the test passes.

@basil
Copy link
Contributor Author

basil commented Apr 2, 2022

CC @amaembo

@amaembo
Copy link
Contributor

amaembo commented Apr 5, 2022

Pushed, thanks:
5dcd922

@amaembo amaembo closed this Apr 5, 2022
@amaembo amaembo added the Merged label Apr 5, 2022
@jtnord
Copy link

jtnord commented Jul 12, 2022

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants