In recent versions of Maven you can activate the debugger by running mvnDebug rather than mvn, the mvnDebug bat/sh file sets MVN__DEBUG_OPTS and passes them to the java.exe. The values passed are:
set MAVEN_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
If that isn't sufficient, this may work (note I've not yet tested this, I'll update once I have). Maven reads properties prefixed with "env." from the environment, you may be able to set environment variables by prefixing with the same. i.e.:
<profile>
<id>dev</id>
<properties>
<env.MAVEN_OPTS>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000<env.MAVEN_OPTS>
</properties>
</profile>
Update: The surefire plugin allows you to specify system properties to be used during test execution. The configuration is as follows:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<systemProperties>
<property>
<name>propertyName</name>
<value>propertyValue</value>
</property>
</systemProperties>
</configuration>
</plugin>
If none of those work for you, it is possible to write a small plugin configured in your profile that binds to the initialize phase and sets your variables. The plugin would have configuration like this:
<plugin>
<groupId>name.seller.rich</groupId>
<artifactId>maven-environment-plugin</artifactId>
<version>0.0.1</version>
<executions>
<execution>
<id>set-properties</id>
<phase>initialize</phase>
<goals>
<goal>set-properties</goal>
</goals>
</execution>
</executions>
<configuration>
<properties>
<env.MAVEN_OPTS>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000<env.MAVEN_OPTS>
</properties>
</configuration>
</plugin>
during execution the plugin would set each passed property using System.setProperty(). If the first two aren't suitable or don't work this should address your issue.