Re: Can't test a package with Surefire?
FYI, I have just created https://issues.apache.org/jira/browse/SUREFIRE-2234 with a suggested fix. -- Alexander Kriegisch https://scrum-master.de Alexander Kriegisch schrieb am 06.02.2024 08:58 (GMT +07:00): > Sorry, hit the send button too quickly. > > The fact that e.g. on Bash > > mvn test -Dtest=dev.aspectj.* > > does not find any tests, but > > mvn test -Dtest=dev/aspectj/* > > does, is IMO simply a bug that ought to be fixed. > > > Alexander Kriegisch schrieb am 06.02.2024 08:54 (GMT +07:00): > >> Bash: >> mvn test -Dtest=dev.aspectj.MyO* >> >> Windows Cmd/PowerShell: >> mvn test "-Dtest=dev.aspectj.MyO*" >> >> >> Gary D. Gregory schrieb am 05.02.2024 22:22 (GMT +07:00): >> >>> Hi All: >>> >>> mvn clean test -Dtest=org.apache.commons.compress.harmony.unpack200.tests.* >>> >>> gives me: >>> >>> [INFO] --- surefire:3.2.5:test (default-test) @ commons-compress --- >>> [INFO] >>> >>> [INFO] BUILD FAILURE >>> [INFO] >>> >>> [INFO] Total time: 40.740 s >>> [INFO] Finished at: 2024-02-05T10:18:31-05:00 >>> [INFO] >>> >>> [ERROR] Failed to execute goal >>> org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) on >>> project commons-compress: No tests matching pattern >>> "org.apache.commons.compress.harmony.unpack200.tests.*" were executed! (Set >>> -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) -> [Help 1] >>> >>> What am I doing wrong? >>> >>> Does this page not say what I think it's saying? >>> https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html >>> >>> "As of Surefire Plugin 2.19.1, the syntax with fully qualified class names >>> or >>> packages can be used ..." >>> >>> Reproduce me: >>> >>> git clone https://gitbox.apache.org/repos/asf/commons-compress.git >>> cd commons-compress >>> mvn clean test -Dtest=org.apache.commons.compress.harmony.unpack200.tests.* > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Can't test a package with Surefire?
Sorry, hit the send button too quickly. The fact that e.g. on Bash mvn test -Dtest=dev.aspectj.* does not find any tests, but mvn test -Dtest=dev/aspectj/* does, is IMO simply a bug that ought to be fixed. -- Alexander Kriegisch https://scrum-master.de Alexander Kriegisch schrieb am 06.02.2024 08:54 (GMT +07:00): > Bash: > mvn test -Dtest=dev.aspectj.MyO* > > Windows Cmd/PowerShell: > mvn test "-Dtest=dev.aspectj.MyO*" > > > Gary D. Gregory schrieb am 05.02.2024 22:22 (GMT +07:00): > >> Hi All: >> >> mvn clean test -Dtest=org.apache.commons.compress.harmony.unpack200.tests.* >> >> gives me: >> >> [INFO] --- surefire:3.2.5:test (default-test) @ commons-compress --- >> [INFO] >> >> [INFO] BUILD FAILURE >> [INFO] >> >> [INFO] Total time: 40.740 s >> [INFO] Finished at: 2024-02-05T10:18:31-05:00 >> [INFO] >> >> [ERROR] Failed to execute goal >> org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) on >> project commons-compress: No tests matching pattern >> "org.apache.commons.compress.harmony.unpack200.tests.*" were executed! (Set >> -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) -> [Help 1] >> >> What am I doing wrong? >> >> Does this page not say what I think it's saying? >> https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html >> >> "As of Surefire Plugin 2.19.1, the syntax with fully qualified class names or >> packages can be used ..." >> >> Reproduce me: >> >> git clone https://gitbox.apache.org/repos/asf/commons-compress.git >> cd commons-compress >> mvn clean test -Dtest=org.apache.commons.compress.harmony.unpack200.tests.* - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Can't test a package with Surefire?
Bash: mvn test -Dtest=dev.aspectj.MyO* Windows Cmd/PowerShell: mvn test "-Dtest=dev.aspectj.MyO*" -- Alexander Kriegisch https://scrum-master.de Gary D. Gregory schrieb am 05.02.2024 22:22 (GMT +07:00): > Hi All: > > mvn clean test -Dtest=org.apache.commons.compress.harmony.unpack200.tests.* > > gives me: > > [INFO] --- surefire:3.2.5:test (default-test) @ commons-compress --- > [INFO] > > [INFO] BUILD FAILURE > [INFO] > > [INFO] Total time: 40.740 s > [INFO] Finished at: 2024-02-05T10:18:31-05:00 > [INFO] > > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) on > project commons-compress: No tests matching pattern > "org.apache.commons.compress.harmony.unpack200.tests.*" were executed! (Set > -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) -> [Help 1] > > What am I doing wrong? > > Does this page not say what I think it's saying? > https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html > > "As of Surefire Plugin 2.19.1, the syntax with fully qualified class names or > packages can be used ..." > > Reproduce me: > > git clone https://gitbox.apache.org/repos/asf/commons-compress.git > cd commons-compress > mvn clean test -Dtest=org.apache.commons.compress.harmony.unpack200.tests.* > > TY! > Gary > > > > Gary > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Can't test a package with Surefire?
Mon, 5 Feb 2024, /sebb/: Under Windows, mvn test -Dtest=org.apache.commons.compress.harmony.unpack200.tests.ArchiveTest fails with Unknown lifecycle phase ".apache.commons.compress.harmony.pack2000.tests.ArchiveTest". but the following works: mvn test -Dtest="org.apache.commons.compress.harmony.unpack200.tests.ArchiveTest" I think this shows that '.' *is* treated as a separator on Windows. All right. What you describe appears happening using PowerShell vs. the standard Command Prompt. Using Command Prompt the former works just fine, and the later fails: =org.apache.commons.compress.harmony.unpack200.tests.ArchiveTest"" was unexpected at this time. I don't use (never liked) PowerShell and I'm not aware of its parsing rules. -- Stanimir - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Can't test a package with Surefire?
There appears to be a different syntax for wild-card matching. On macOS, the following works: mvn test -Dtest=org.apache.commons.compress.harmony.unpack200.tests.ArchiveTest but mvn test -Dtest=org.apache.commons.compress.harmony.unpack200.tests.* fails with No tests matching pattern "org.apache.commons.compress.harmony.unpack200.tests.*" were executed! Under Windows, mvn test -Dtest=org.apache.commons.compress.harmony.unpack200.tests.ArchiveTest fails with Unknown lifecycle phase ".apache.commons.compress.harmony.pack2000.tests.ArchiveTest". but the following works: mvn test -Dtest="org.apache.commons.compress.harmony.unpack200.tests.ArchiveTest" I think this shows that '.' *is* treated as a separator on Windows. The wildcard version fails on Windows as for macOS. The different syntax for wild-cards affects both Windows and macOS On Mon, 5 Feb 2024 at 16:43, Gary D. Gregory wrote: > > Yep, slashes work. The double quoting gives a syntax error. > > TY. > > Gary > > On 2024/02/05 15:53:41 Stanimir Stamenkov wrote: > > Mon, 5 Feb 2024, /sebb/: > > > > > That looks like a Windows quoting issue; Windows does not like '.' in > > > parameter values > > > > > > Try > > > > > > mvn clean test > > > -D"test=org.apache.commons.compress.harmony.unpack200.tests.*" > > > > Dot (.) doesn't appear a standard delimiter on Windows: > > > > * https://ss64.com/nt/syntax-esc.html#delimiters > > > > and the the suggested quoting doesn't work for me. > > > > However I've tried alternative syntax I've noticed in the referenced > > documentation: > > > > pkg/**/Ci*leTest.java > > > > and the following worked for me: > > > > > mvn clean test > > -Dtest=org/apache/commons/compress/harmony/unpack200/tests/* > > [...] > > [WARNING] Tests run: 168, Failures: 0, Errors: 0, Skipped: 10 > > > > Maybe it is just the plugin documentation wrong? > > > > > > >> On 2024/02/05 15:22:09 "Gary D. Gregory" wrote: > > >> > > >>> [...] > > >>> [ERROR] Failed to execute goal > > >>> org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test > > >>> (default-test) on project commons-compress: No tests matching pattern > > >>> "org.apache.commons.compress.harmony.unpack200.tests.*" were executed! > > >>> (Set -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) -> > > >>> [Help 1] > > >>> > > >>> What am I doing wrong? > > >>> > > >>> Does this page not say what I think it's saying? > > >>> https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html > > >>> > > >>> "As of Surefire Plugin 2.19.1, the syntax with fully qualified class > > >>> names or packages can be used ..." > > >>> > > >>> Reproduce me: > > >>> > > >>> git clone https://gitbox.apache.org/repos/asf/commons-compress.git > > >>> cd commons-compress > > >>> mvn clean test > > >>> -Dtest=org.apache.commons.compress.harmony.unpack200.tests.* > > > > -- > > > > - > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > > For additional commands, e-mail: users-h...@maven.apache.org > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Can't test a package with Surefire?
Yep, slashes work. The double quoting gives a syntax error. TY. Gary On 2024/02/05 15:53:41 Stanimir Stamenkov wrote: > Mon, 5 Feb 2024, /sebb/: > > > That looks like a Windows quoting issue; Windows does not like '.' in > > parameter values > > > > Try > > > > mvn clean test > > -D"test=org.apache.commons.compress.harmony.unpack200.tests.*" > > Dot (.) doesn't appear a standard delimiter on Windows: > > * https://ss64.com/nt/syntax-esc.html#delimiters > > and the the suggested quoting doesn't work for me. > > However I've tried alternative syntax I've noticed in the referenced > documentation: > > pkg/**/Ci*leTest.java > > and the following worked for me: > > > mvn clean test > -Dtest=org/apache/commons/compress/harmony/unpack200/tests/* > [...] > [WARNING] Tests run: 168, Failures: 0, Errors: 0, Skipped: 10 > > Maybe it is just the plugin documentation wrong? > > > >> On 2024/02/05 15:22:09 "Gary D. Gregory" wrote: > >> > >>> [...] > >>> [ERROR] Failed to execute goal > >>> org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) > >>> on project commons-compress: No tests matching pattern > >>> "org.apache.commons.compress.harmony.unpack200.tests.*" were executed! > >>> (Set -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) -> > >>> [Help 1] > >>> > >>> What am I doing wrong? > >>> > >>> Does this page not say what I think it's saying? > >>> https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html > >>> > >>> "As of Surefire Plugin 2.19.1, the syntax with fully qualified class > >>> names or packages can be used ..." > >>> > >>> Reproduce me: > >>> > >>> git clone https://gitbox.apache.org/repos/asf/commons-compress.git > >>> cd commons-compress > >>> mvn clean test > >>> -Dtest=org.apache.commons.compress.harmony.unpack200.tests.* > > -- > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Can't test a package with Surefire?
Mon, 5 Feb 2024, /sebb/: That looks like a Windows quoting issue; Windows does not like '.' in parameter values Try mvn clean test -D"test=org.apache.commons.compress.harmony.unpack200.tests.*" Dot (.) doesn't appear a standard delimiter on Windows: * https://ss64.com/nt/syntax-esc.html#delimiters and the the suggested quoting doesn't work for me. However I've tried alternative syntax I've noticed in the referenced documentation: pkg/**/Ci*leTest.java and the following worked for me: > mvn clean test -Dtest=org/apache/commons/compress/harmony/unpack200/tests/* [...] [WARNING] Tests run: 168, Failures: 0, Errors: 0, Skipped: 10 Maybe it is just the plugin documentation wrong? On 2024/02/05 15:22:09 "Gary D. Gregory" wrote: [...] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) on project commons-compress: No tests matching pattern "org.apache.commons.compress.harmony.unpack200.tests.*" were executed! (Set -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) -> [Help 1] What am I doing wrong? Does this page not say what I think it's saying? https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html "As of Surefire Plugin 2.19.1, the syntax with fully qualified class names or packages can be used ..." Reproduce me: git clone https://gitbox.apache.org/repos/asf/commons-compress.git cd commons-compress mvn clean test -Dtest=org.apache.commons.compress.harmony.unpack200.tests.* -- - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Can't test a package with Surefire?
That looks like a Windows quoting issue; Windows does not like '.' in parameter values Try mvn clean test -D"test=org.apache.commons.compress.harmony.unpack200.tests.*" On Mon, 5 Feb 2024 at 15:25, Gary D. Gregory wrote: > > Forgot to say: > > Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae) > Maven home: C:\java\apache-maven-3.9.6 > Java version: 1.8.0_382, vendor: Temurin, runtime: C:\Program Files\Eclipse > Adoptium\jdk-8.0.382.5-hotspot\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" > > Gary > > On 2024/02/05 15:22:09 "Gary D. Gregory" wrote: > > Hi All: > > > > mvn clean test -Dtest=org.apache.commons.compress.harmony.unpack200.tests.* > > > > gives me: > > > > [INFO] --- surefire:3.2.5:test (default-test) @ commons-compress --- > > [INFO] > > > > [INFO] BUILD FAILURE > > [INFO] > > > > [INFO] Total time: 40.740 s > > [INFO] Finished at: 2024-02-05T10:18:31-05:00 > > [INFO] > > > > [ERROR] Failed to execute goal > > org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) on > > project commons-compress: No tests matching pattern > > "org.apache.commons.compress.harmony.unpack200.tests.*" were executed! (Set > > -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) -> [Help 1] > > > > What am I doing wrong? > > > > Does this page not say what I think it's saying? > > https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html > > > > "As of Surefire Plugin 2.19.1, the syntax with fully qualified class names > > or packages can be used ..." > > > > Reproduce me: > > > > git clone https://gitbox.apache.org/repos/asf/commons-compress.git > > cd commons-compress > > mvn clean test -Dtest=org.apache.commons.compress.harmony.unpack200.tests.* > > > > TY! > > Gary > > > > > > > > Gary > > > > - > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > > For additional commands, e-mail: users-h...@maven.apache.org > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Can't test a package with Surefire?
Forgot to say: Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae) Maven home: C:\java\apache-maven-3.9.6 Java version: 1.8.0_382, vendor: Temurin, runtime: C:\Program Files\Eclipse Adoptium\jdk-8.0.382.5-hotspot\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" Gary On 2024/02/05 15:22:09 "Gary D. Gregory" wrote: > Hi All: > > mvn clean test -Dtest=org.apache.commons.compress.harmony.unpack200.tests.* > > gives me: > > [INFO] --- surefire:3.2.5:test (default-test) @ commons-compress --- > [INFO] > > [INFO] BUILD FAILURE > [INFO] > > [INFO] Total time: 40.740 s > [INFO] Finished at: 2024-02-05T10:18:31-05:00 > [INFO] > > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) on > project commons-compress: No tests matching pattern > "org.apache.commons.compress.harmony.unpack200.tests.*" were executed! (Set > -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) -> [Help 1] > > What am I doing wrong? > > Does this page not say what I think it's saying? > https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html > > "As of Surefire Plugin 2.19.1, the syntax with fully qualified class names or > packages can be used ..." > > Reproduce me: > > git clone https://gitbox.apache.org/repos/asf/commons-compress.git > cd commons-compress > mvn clean test -Dtest=org.apache.commons.compress.harmony.unpack200.tests.* > > TY! > Gary > > > > Gary > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org