| <?xml version="1.0" encoding="UTF-8"?> |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| <modelVersion>4.0.0</modelVersion> |
| |
| <groupId>org.apache.maven.plugins.surefire</groupId> |
| <artifactId>surefire-1881</artifactId> |
| <version>1.0-SNAPSHOT</version> |
| |
| <properties> |
| <maven.compiler.source>${java.specification.version}</maven.compiler.source> |
| <maven.compiler.target>${java.specification.version}</maven.compiler.target> |
| <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
| </properties> |
| |
| <contributors> |
| <contributor> |
| <name>Alexander Kriegisch</name> |
| <roles> |
| <role>author</role> |
| </roles> |
| <url>https://github.com/kriegaex/Maven_Surefire_PrintToConsoleProblems</url> |
| </contributor> |
| </contributors> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-jar-plugin</artifactId> |
| <version>3.2.0</version> |
| <configuration> |
| <forceCreation>true</forceCreation> |
| <archive> |
| <manifestEntries> |
| <Agent-Class>de.scrum_master.dummy.Agent</Agent-Class> |
| <Premain-Class>de.scrum_master.dummy.Agent</Premain-Class> |
| <Can-Redefine-Classes>true</Can-Redefine-Classes> |
| <Can-Retransform-Classes>true</Can-Retransform-Classes> |
| </manifestEntries> |
| <addMavenDescriptor>false</addMavenDescriptor> |
| </archive> |
| </configuration> |
| </plugin> |
| <plugin> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <version>${surefire.version}</version> |
| <configuration> |
| <!-- JVM prints nothing, no unexpected output on console --> |
| <!--<argLine></argLine>--> |
| <!-- JVM prints nothing, start forked booter in debug mode --> |
| <!--<argLine>-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:34567</argLine>--> |
| <!-- JVM prints loaded classes --> |
| <argLine>-verbose:class</argLine> |
| <!-- JVM prints loaded classes, start forked booter in debug mode --> |
| <!--<argLine>-verbose:class -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:34567</argLine>--> |
| |
| <!-- Fix for "[WARNING] Corrupted STDOUT by directly writing to native stream in forked JVM" --> |
| <!-- FIXME: |
| Using this option is meant to fix "[WARNING] Corrupted STDOUT by directly writing to native stream in |
| forked JVM" and creation of "*-jvmRun1.dumpstream" files. Unfortunately, it makes Surefire/Failsafe |
| freeze if a either the JVM prints something to stdOut or stdErr. This happens both in M5 and in |
| M6-SNAPSHOT after both SUREFIRE-1788 and SUREFIRE-1809 have been merged in already. |
| FIXME: |
| *Not* using this option leads to garbled log output when the JVM writes to both stdOut and stdErr |
| before/during tests. |
| TODO: |
| If the garbled output would also appear with this option activated, cannot be tested at present due to |
| the Surefire/Failsafe freeze -> re-test after the freeze has been fixed. |
| --> |
| <forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/> |
| |
| <!-- TODO: |
| We have to use this until SUREFIRE-1809 is fixed in M6, otherwise there are JPMS problems with |
| libraries added to the boot class path. -> re-test, then remove this option |
| --> |
| <useModulePath>false</useModulePath> |
| |
| <!-- |
| <consoleOutputReporter implementation="org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter"> |
| <!– Suppress Surefire/Failsafe output in favour of test output only –> |
| <disable>true</disable> |
| <encoding>UTF-8</encoding> |
| </consoleOutputReporter> |
| --> |
| </configuration> |
| </plugin> |
| <plugin> |
| <artifactId>maven-failsafe-plugin</artifactId> |
| <version>${surefire.version}</version> |
| <configuration> |
| <argLine>-javaagent:${project.build.directory}/${project.build.finalName}.jar</argLine> |
| |
| <!-- Fix for "[WARNING] Corrupted STDOUT by directly writing to native stream in forked JVM" --> |
| <!-- FIXME: |
| Using this option is meant to fix "[WARNING] Corrupted STDOUT by directly writing to native stream in |
| forked JVM" and creation of "*-jvmRun1.dumpstream" files. Unfortunately, it makes Surefire/Failsafe |
| freeze if a Java agent prints something to stdOut or stdErr. This happens both in M5 and in M6-SNAPSHOT |
| after both SUREFIRE-1788 and SUREFIRE-1809 have been merged in already. |
| FIXME: |
| *Not* using this option leads to garbled log output when a Java agent writes to both stdOut and stdErr |
| before/during tests. See comments in class de.scrum_master.dummy.Agent.DummyTransformer for examples. |
| TODO: |
| If the garbled output would also appear with this option activated, cannot be tested at present due to |
| the Surefire/Failsafe freeze -> re-test after the freeze has been fixed. |
| --> |
| <forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/> |
| |
| <!-- TODO: |
| We have to use this until SUREFIRE-1809 is fixed in M6, otherwise there are JPMS problems with |
| libraries added to the boot class path. -> re-test, then remove this option |
| --> |
| <useModulePath>false</useModulePath> |
| |
| <!-- |
| <consoleOutputReporter implementation="org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter"> |
| <!– Suppress Surefire/Failsafe output in favour of test output only –> |
| <disable>true</disable> |
| <encoding>UTF-8</encoding> |
| </consoleOutputReporter> |
| --> |
| |
| <!-- |
| <enableProcessChecker>ping</enableProcessChecker> |
| <forkedProcessTimeoutInSeconds>15</forkedProcessTimeoutInSeconds> |
| --> |
| </configuration> |
| <executions> |
| <execution> |
| <id>integration-test</id> |
| <goals> |
| <goal>integration-test</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| |
| <dependencies> |
| <dependency> |
| <groupId>junit</groupId> |
| <artifactId>junit</artifactId> |
| <version>4.13.1</version> |
| <scope>test</scope> |
| </dependency> |
| </dependencies> |
| |
| </project> |