[ https://issues.apache.org/jira/browse/SUREFIRE-1881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17501680#comment-17501680 ]
Alexander Kriegisch edited comment on SUREFIRE-1881 at 3/5/22, 8:11 AM: ------------------------------------------------------------------------ Sorry, the M6 snapshots never work for me (have not for months now), because I always get: {code:none} Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-shared-utils/$%7Bsurefire-shared-utils.version%7D/surefire-shared-utils-$%7Bsurefire-shared-utils.version%7D.pom [WARNING] The POM for org.apache.maven.surefire:surefire-shared-utils:jar:${surefire-shared-utils.version} is missing, no dependency information available (...) [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6-SNAPSHOT:test (default-test) on project perform-tests: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6-SNAPSHOT:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.apache.maven.surefire:surefire-shared-utils:jar:${surefire-shared-utils.version} in central (https://repo.maven.apache.org/maven2) -> [Help 1] {code} Can you see in the download URL how it is trying to use the unexpanded {{${surefire-shared-utils.version}}} variable as a version number? Something is awry there. It looks like the Surefire root POM cannot be resolved. I have an older version of it installed in my local Maven repo, which is what is is trying to use. But it does not resolve a more recent version. Do I have to add a special plugin snapshot repository to my build? Answering my own question: I do need this snapshot repo: {code:xml} <pluginRepository> <id>apache-snapshots</id> <url>https://repository.apache.org/snapshots/</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> {code} I never actually noticed, because since I locally built an older version of M6 snapshot last year after fixing some bugs which were not on master yet, I never really added the snapshot repo to that one project I am using just now. Stupid me! Sorry for the noise. was (Author: kriegaex): Sorry, the M6 snapshots never work for me (have not for months now), because I always get: {code:none} Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-shared-utils/$%7Bsurefire-shared-utils.version%7D/surefire-shared-utils-$%7Bsurefire-shared-utils.version%7D.pom [WARNING] The POM for org.apache.maven.surefire:surefire-shared-utils:jar:${surefire-shared-utils.version} is missing, no dependency information available (...) [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6-SNAPSHOT:test (default-test) on project perform-tests: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6-SNAPSHOT:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.apache.maven.surefire:surefire-shared-utils:jar:${surefire-shared-utils.version} in central (https://repo.maven.apache.org/maven2) -> [Help 1] {code} Can you see in the download URL how it is trying to use the unexpanded {{${surefire-shared-utils.version}}} variable as a version number? Something is awry there. It looks like the Surefire root POM cannot be resolved. I have an older version of it installed in my local Maven repo, which is what is is trying to use. But it does not resolve a more recent version. Do I have to add a special plugin snapshot repository to my build? Answering my own question: I do need this snapshot repo: {code:xml} <pluginRepository> <id>apache-snapshots</id> <url>https://repository.apache.org/snapshots/</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> {code} I never actually noticed, because since I locally built an older version of M6 snapshot last year after fixing some bugs which were not on master yet, I never really added the snapshot repo. Stupid me! Sorry for the noise. > Java agent printing to native console makes build block when using > SurefireForkNodeFactory > ------------------------------------------------------------------------------------------ > > Key: SUREFIRE-1881 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1881 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Failsafe Plugin, Maven Surefire Plugin > Affects Versions: 3.0.0-M5 > Reporter: Alexander Kriegisch > Assignee: Tibor Digana > Priority: Major > Fix For: 3.0.0-M6 > > Attachments: Bildschirmfoto von 2021-03-29 21-50-25.png, > image-2021-02-08-12-07-34-183.png, image-2021-03-26-09-48-11-398.png, > image-2021-03-26-09-52-36-881.png, image-2021-03-26-18-00-37-889.png, > image-2021-03-31-11-22-50-682.png, image-2021-03-31-11-38-11-119.png, > image-2021-03-31-12-31-55-818.png, image-2021-03-31-12-32-41-589.png, > maven-failsafe-debug-log.txt, screenshot-1.png, screenshot-2.png > > > This is a follow-up to SUREFIRE-1788 which was closed prematurely even though > there still were open issues which were discussed there initially. Basically > the situation is as follows: > * I use Java agents writing to stdOut and stdErr in my tests. > * I was annoyed that Surefire/Failsafe were writing lots of {{[WARNING] > Corrupted STDOUT by directly writing to native stream in forked JVM}} lines > into {{*-jvmRun1.dumpstream}} files. [~tibordigana] then told me to use > {{<forkNode > implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/>}} > in my POM in order to fix the issue. > * I tried this in version 3.0.0-M5, but 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. > * My [sample > project|https://github.com/kriegaex/Maven_Surefire_PrintToConsoleProblems] > reproduces the issue as soon as you uncomment the option in the POM and run > {{mvn clean verify}}. > * The second issue is: *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 > [{{Agent.DummyTransformer}}|https://github.com/kriegaex/Maven_Surefire_PrintToConsoleProblems/blob/master/src/main/java/de/scrum_master/dummy/Agent.java] > for examples for garbled log lines and also comments in > [pom.xml|https://github.com/kriegaex/Maven_Surefire_PrintToConsoleProblems/blob/master/pom.xml#L36] > for further information. > * If the garbled output would also appear with this option activated, cannot > be tested at present due to the Surefire/Failsafe freeze. I will re-test that > after the freeze has been fixed and before this issue can be closed. -- This message was sent by Atlassian Jira (v8.20.1#820001)