[ https://issues.apache.org/jira/browse/SUREFIRE-1431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16196625#comment-16196625 ]
Matthieu Fillon commented on SUREFIRE-1431: ------------------------------------------- I tried using $ instead of `@` but the thing is : if my jacoco profile is not active, I don't have {{jvm.agent}} property defined and Maven won't replace it trying to execute : java ${jvm.agent} -XX. If I define an empty {{jvm.agent}} property at project level (outside profile), then it's always empty even though Jacoco is activated. > @{argLine} not replaced if undefined > ------------------------------------ > > Key: SUREFIRE-1431 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1431 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin > Affects Versions: 2.21.1 > Environment: Maven 3.5.0 > Reporter: Matthieu Fillon > Assignee: Tibor Digana > Attachments: maven.log > > > I need to specify argLine for my tests. I also need it to work with Java > agent Jacoco when a certain Maven profile is activated. > So I added `@{argLine}` to my argLine property and it works fine when running > with Jacoco agent activated. > When running the tests without profile that activates Jacoco agent, the > surefire plugin fails with following line (relevant maven logs attached) : > {color:red}Error: Could not find or load main class @\{argLine} {color} > I guess @{argLine} is only replaced if an argLine has been defined before by > another plugin but if not it is not replaced at all. > Should'nt it be replaced in any case and if none defined, just replace with > empty value? -- This message was sent by Atlassian JIRA (v6.4.14#64029)