Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Maven variables ${settings.*} not expanded #1333

Closed
martinoconnor opened this issue Jun 25, 2024 · 1 comment · Fixed by #1334
Closed

Maven variables ${settings.*} not expanded #1333

martinoconnor opened this issue Jun 25, 2024 · 1 comment · Fixed by #1334

Comments

@martinoconnor
Copy link
Contributor

private String replacePropertyExpressions(String argLine) {

When setting up JMockit as referenced here https://jmockit.github.io/tutorial/Introduction.html#maven

<plugins>
   <plugin>
      <artifactId>maven-surefire-plugin</artifactId>
      <version>2.22.2</version> <!-- or some other version -->
      <configuration>
         <argLine>
            -javaagent:"${settings.localRepository}"/org/jmockit/jmockit/${jmockit.version}/jmockit-${jmockit.version}.jar
         </argLine>
      </configuration>
   </plugin>
</plugins>

The reference to ${settings.localrepository} is not expanded and the minion fails to find the JMockit jar

One solution might be to inject the Settings parameter into the Mojo and search for references for each of the properties. Not as elegant as iterating through properties but perhaps we only need the localRepository property anyway

@hcoles
Copy link
Owner

hcoles commented Jul 2, 2024

Thanks for the PR. I'll be able to look at this in a couple of weeks.

@hcoles hcoles closed this as completed in 93c3add Jan 6, 2025
hcoles added a commit that referenced this issue Jan 6, 2025
fixes #1333 Expand ${settings.localRepository} in <argLine>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants