You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "wujek.srujek" <wu...@gmail.com> on 2010/03/23 13:03:50 UTC

[surefire] and

Hi. I have a requirement to use a javaagent and system properties in the same
test run. I found out about the properties mentioned in the title, but here
is what I noticed (mvn 2.2.1):
- to be able to use the agent (<argLine>) JVM has to be forked, but then
<systemPropertyVariables> are not set
- when <forkMode>never</forkMode> javaagent naturally doesn't work, but the
properties are visible

The workaround that I found is to include everything (javaagent and
properties) in the <argLine> element, but there is a gotcha - it has to be
single line in the pom, when it is broken (for example when using Eclipse
formatter) this doesn't work, surefire fails (in my case the javaagent is
EclipseLink weaver and it fails saying that some classes are not found that
are in the agent's jar file). Needless to say that with many arguments this
could mean a realy long line.

Now the question - is it a surefire bug that the system properties are not
propagated to the forked JVM? I couldn't find anything about it on the net,
and maybe it makes perfect sense not to do it, in which case I would
appreciate some insight.

I am sorry if this is an incorrect forum, but I wanted to ask first before
filing a bug (I would consider it a bug as I do specify that the settings
have to be available, unless someone could explain why this would be a bad
thing). I also didn't want to post it in the 'users' forum as this is a more
internal question in my opinion. Again, sorry if it should go somewhere
else.

- Wujek
-- 
View this message in context: http://old.nabble.com/-surefire--%3CargLine%3E-and-%3CsystemPropertyVariables%3E-tp27999884p27999884.html
Sent from the Maven Developers mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org