Ich erhalte den folgenden Fehler beim Ausführen von Komponententests in IntelliJ: Fehler: Die Hauptklasse $ {surefireArgLine} konnte nicht gefunden oder geladen werden. Ich bin mit Maven und in pom.xml ich habe:
<properties>
...
<surefire.argLine />
</properties>
<build>
<plugins>
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
<!--Sets the VM argument line used when unit tests are run.-->
<argLine>${surefire.argLine}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.1.201405082137</version>
<executions>
<!--
Prepares the property pointing to the JaCoCo runtime agent which
is passed as VM argument when Maven the Surefire plugin is executed.
-->
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<!--Sets the path to the file which contains the execution data.-->
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
<!--
Sets the name of the property containing the settings
for JaCoCo runtime agent.
-->
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
...
Hat jemand ähnliches Problem haben? Wie setze ich den Wert für todsichereArgLine?
Haben Sie jemals eine andere Lösung dafür gefunden? Ich muss es von meiner IDE aus ausführen, um den Debug-Modus verwenden zu können. – LisaMM
Leider habe ich keine andere Lösung dafür gefunden. – BlueLettuce16
@LisaMM Sie können Tests debuggen, ohne die Tests in einer IDE auszuführen. Starten Sie einfach die Tests mit * mvnDebug * in der Kommandozeile. Verwenden Sie dann Ihre bevorzugte IDE, um eine Verbindung zum Befehlszeilenprozess herzustellen. Google für "Remote-Debug" in Ihrer Lieblings-IDE. – jah