You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Daniel Subelman (Jira)" <ji...@apache.org> on 2022/04/23 17:17:00 UTC

[jira] [Comment Edited] (SUREFIRE-2063) Adding argLine with tab characters fails

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

Daniel Subelman edited comment on SUREFIRE-2063 at 4/23/22 5:16 PM:
--------------------------------------------------------------------

[~mthmulders], modifying
{code:java}
argLine.replaceAll("\\s+", " ")
{code}
to
{code:java}
argLine.replaceAll("\\s", " ")
{code}
replaces all whitespaces with {{" "}}, allowing multiple consecutive whitespaces (just need to remove the {{'+'}} from the regex).

Another way is to modify it to:
{code:java}
argLine.replaceAll("[^\\S ]+", " ")
{code}
replaces all whitespaces, except {{" "}}, with {{" "}}.



was (Author: dsubel):
[~mthmulders], modifying
{code:java}
argLine.replaceAll("\\s+", " ")
{code}
to
{code:java}
argLine.replaceAll("\\s", " ")
{code}
replaces all whitespaces with {{{}" "{}}}, allowing multiple consecutive whitespaces (just need to remove the {{'+'}} from the regex).

> Adding argLine with tab characters fails
> ----------------------------------------
>
>                 Key: SUREFIRE-2063
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-2063
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 3.0.0-M6
>            Reporter: Daniel Subelman
>            Assignee: Maarten Mulders
>            Priority: Blocker
>             Fix For: 3.0.0-M7
>
>
> Since v3.3.0-M6 fails when using <argLine> to export or open a package. The failure is produced when using --add-opens or --add-exports in <argLine>.
> The execution doesn't fail with v3.3.0-M5 or earlier.
> As an example, it fails when using the following <argLine>:
> {code:java}
> <argLine>
>     --add-opens org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED
>     --add-opens org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED
> </argLine>
> {code}
> The failure log:
> {code:java}
> [INFO] --- maven-surefire-plugin:3.0.0-M6:test (dev) @ testing ---
> [INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
> [INFO] 
> [INFO] -------------------------------------------------------
> [INFO]  T E S T S
> [INFO] -------------------------------------------------------
> WARNING: Unknown module: org.junit.platform.commons specified to --add-opens
> Error: Could not find or load main class --add-opens
> Caused by: java.lang.ClassNotFoundException: --add-opens
> [INFO] 
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time:  9.157 s
> [INFO] Finished at: 2022-04-06T16:28:23-04:00
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6:test (dev) on project testing: 
> {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)