[ 
https://issues.apache.org/jira/browse/SUREFIRE-2225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17801403#comment-17801403
 ] 

ASF GitHub Bot commented on SUREFIRE-2225:
------------------------------------------

michael-o opened a new pull request, #705:
URL: https://github.com/apache/maven-surefire/pull/705

   This closes #705
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
    - [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SUREFIRE) filed 
          for the change (usually before you start working on it).  Trivial 
changes like typos do not 
          require a JIRA issue.  Your pull request should address just this 
issue, without 
          pulling in other changes.
    - [ ] Each commit in the pull request should have a meaningful subject line 
and body.
    - [ ] Format the pull request title like `[SUREFIRE-XXX] - Fixes bug in 
ApproximateQuantiles`,
          where you replace `SUREFIRE-XXX` with the appropriate JIRA issue. 
Best practice
          is to use the JIRA issue title in the pull request title and in the 
first line of the 
          commit message.
    - [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
    - [ ] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will 
          be performed on your pull request automatically.
    - [ ] You have run the integration tests successfully (`mvn -Prun-its clean 
install`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [ ] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   




> Surefire ITs fail when project directory contains space
> -------------------------------------------------------
>
>                 Key: SUREFIRE-2225
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-2225
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: process forking
>    Affects Versions: 3.2.3
>            Reporter: Michael Osipov
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 3.2.4
>
>
> Perform the following, e.g. on Windows:
> {noformat}
> git clone ....maven-surefire.git "Maven Surefire"
> cd "Maven Surefire"
> mvn install
> mvn verify -Prun-its
> {noformat}
> It will fail:
> {noformat}
> [ERROR] 
> org.apache.maven.surefire.its.jiras.Surefire772SpecifiedReportsIT.testSkippedFailsafeReportGeneration
>  -- Time elapsed: 0.080 s <<< ERROR!
> org.apache.maven.surefire.its.fixture.SurefireVerifierException:
> Exit code was non-zero: 255; command line and log =
> D:\Entwicklung\Programme\apache-maven-3.8.8\bin\mvn -fn -e --batch-mode 
> -Dmaven.repo.local=C:\Users\mosipov\.m2\repository 
> org.apache.maven.plugins:maven-clean-plugin:clean 
> -Dsurefire.version=3.2.4-SNAPSHOT 
> -Djacoco.agent="-javaagent:C:\\Users\\mosipov\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.8\\org.jacoco.agent-0.8.8-runtime.jar=destfile=D:\\Entwicklung\\Projekte\\Maven
>  
> Surefire\\surefire-its\\target\\jacoco.exec,includes=**/failsafe/*:**/failsafe/**/*:**/surefire/*:**/surefire/**/*,excludes=**/HelpMojo.class:**/shadefire/**/*:org/jacoco/**/*:com/vladium/emma/rt/*"
>  -nsu -Dclean.skip=true -Dmaven.clean.skip=true -PskipFailsafe 
> org.apache.maven.plugins:maven-surefire-report-plugin:3.2.4-SNAPSHOT::failsafe-report-only
>  
> org.apache.maven.plugins:maven-surefire-report-plugin:3.2.4-SNAPSHOT:report-only
> Syntaxfehler.
>         at 
> org.apache.maven.surefire.its.fixture.MavenLauncher.executeCurrentGoals(MavenLauncher.java:274)
>         at 
> org.apache.maven.surefire.its.fixture.SurefireLauncher.executeCurrentGoals(SurefireLauncher.java:142)
>         at 
> org.apache.maven.surefire.its.jiras.Surefire772SpecifiedReportsIT.testSkippedFailsafeReportGeneration(Surefire772SpecifiedReportsIT.java:53)
>         at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>         at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
>         at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>         at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
>         at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>         at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
>         at 
> org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
>         at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
>         at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
>         at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
>         at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
>         at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
>         at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
>         at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
>         at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
>         at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
>         at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
>         at org.junit.runners.Suite.runChild(Suite.java:128)
>         at org.junit.runners.Suite.runChild(Suite.java:27)
>         at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
>         at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
>         at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
>         at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
>         at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
>         at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
>         at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
>         at 
> org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:49)
>         at 
> org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:120)
>         at 
> org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:95)
>         at 
> org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
>         at 
> org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:69)
>         at 
> org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:146)
>         at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
>         at 
> org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
>         at 
> org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
>         at 
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
> {noformat}
> The problem is that the Jacoco Maven Plugin generates an {{argLine}} fully 
> quoted, etc. which is supposed to be passed to Surefire Plugin, but it is 
> passed to a property in {{surefire-its/pom.xml}}: 
> {{<jacoco.agent>${jacoco-it.agent}</jacoco.agent>}}. This will create an 
> invalid command line for {{cmd.exe}}:
> {noformat}
> [INFO] --- maven-help-plugin:3.4.0:evaluate (default-cli) @ surefire-its ---
> [INFO] No artifact parameter specified, using 
> 'org.apache.maven.surefire:surefire-its:jar:3.2.4-SNAPSHOT' as project.
> [INFO] Enter the Maven expression i.e. ${project.groupId} or 0 to exit?:
> ${jacoco-it.agent}
> [INFO]
> "-javaagent:C:\\Users\\mosipov\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.8\\org.jacoco.agent-0.8.8-runtime.jar=destfile=D:\\Entwicklung\\Projekte\\Maven
>  
> Surefire\\surefire-its\\target\\jacoco.exec,includes=**/failsafe/*:**/failsafe/**/*:**/surefire/*:**/surefire/**/*,excludes=**/HelpMojo.class:**/shadefire/**/*:org/jacoco/**/*:com/vladium/emma/rt/*"
> ShellCommandline: [cmd.exe, /X, /C, 
> "D:\Entwicklung\Programme\apache-maven-3.8.8\bin\mvn -e --batch-mode 
> -Dmaven.repo.local=C:\Users\mosipov\.m2\repository 
> org.apache.maven.plugins:maven-clean-plugin:clean 
> -Dsurefire.version=3.2.4-SNAPSHOT 
> "-Djacoco.agent="-javaagent:C:\\Users\\mosipov\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.8\\org.jacoco.agent-0.8.8-runtime.jar=destfile=D:\\Entwicklung\\Projekte\\Maven
>  
> Surefire\\surefire-its\\target\\jacoco.exec,includes=**/failsafe/*:**/failsafe/**/*:**/surefire/*:**/surefire/**/*,excludes=**/HelpMojo.class:**/shadefire/**/*:org/jacoco/**/*:com/vladium/emma/rt/*""
>  -nsu test -DtestNgVersion=5.7 -DtestNgClassifier=jdk15"]
> {noformat}
> It will choke on the redudant quotes after {{-Djacoco.agent=}}. We need to 
> drop the quotes and quote in the actual ITs POMs. From my PoV the Jacoco 
> Plugin is too smart here.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to