Open SiKing opened 1 month ago
Hello @SiKing,
The only issue i see here is that the testng configuration isn't updated. https://github.com/eclipse-m2e/m2e-core/blob/master/RELEASE_NOTES.md#262
As a workaround you can disable it in the meantime by launching Eclipse with the JVM system property
-Dm2e.process.test.configuration=false.
Another less absolute workaround would be to exclude your tests from surefire/failsafe
<configuration>
<excludes>
<exclude>**/MyExcludedTest1.java</exclude>
<exclude>**/MyExcludedTest2.java</exclude>
</excludes>
</configuration>
My issue is that using Maven Update Project wipes my environment settings (and some others) from the Run Configuration. I am sure this started happening only a few months ago. Is this a new feature?
The m2e.process.test.configuration=false
setting does what I need.
Yes it is a new feature in 2.6.2
Surefire/Failsafe plugin configuration propagated to Junit/TestNG launch configuration
The following arguments are supported:
<argLine>,
<environmentVariables>,
<systemPropertyVariables>,
<workingDirectory>,
<enableAssertions>,
Configuration is propagated on unit test launch configuration creation and also when executing maven > update project
Seems strange for Maven plugin to modify non-Maven files - the run configuration.
In our case, environment variables is how we pass passwords into our code. For obvious reasons, we do not want these in the Surefire configuration.
For a maven plugin yes but for m2e no It is one of the goal of m2e to propagate maven configuration into eclipse to have the same behaviour between cli and eclipse
mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart
.this=that
.If you save the run configuration to disk first, it still gets wiped.
I tried all this with a TestNG run configuration, and this problem does not happen in this case.
This started happening after an update a few months back? So I decided to completely reinstall the latest and greatest:
It is still happening there.