[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-04-02 Thread Robert James Oxspring (Jira)


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

Robert James Oxspring commented on SUREFIRE-2033:
-

If the {{junit-platform-runner}} is a compile time dependency of the project, 
it cannot be deleted from the POM.

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-04-02 Thread Robert James Oxspring (Jira)


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

Robert James Oxspring commented on SUREFIRE-2033:
-

Of course my test does not have a `@RunWith` annotation: It's a JUnit 5 test. 
It's a perfectly good JUnit 5 test that used to be run by Surefire 3.0.0-M1, 
3.0.0-M2, 3.0.0-M3, and 3.0.0-M4. The `@RunWith` annotation was never necessary 
before, as Surefire used to run the JUnit 5 test directly using the JUnit 5 
Engine because Surefire, as is stil documented, preferred to use the JUnit 5 
engine if present.

Surefire 3.0.0-M5 regresses because it newly special cases the 
`junit-platform-runner` and so ignores the perfectly good test.

You keep trying to tell me how `junit-platform-runner` should be used, and that 
I should delete it from my project. Again I must point out that this is simply 
not an option: I do understand `junit-platform-runner` well already as my 
project uses it as a compile time dependency which therefore must be present. 
The tests of my project exclusively use JUnit 5 and so we have a 
`junit-jupiter-engine` test dependency, which always used to be a perfectly 
good configuration because Surefire would find multiple engines and pick the 
best available - with JUnit 5 being preferred over all others. As of 3.0.0-M5, 
`junit-platform-runner` is preferred over all others instead, and results in no 
tests being run in the example and in my real project. In both the attached 
example and my real project, this new behaviour is a clear regressive step.

For 3.0.0-M5 to actively change the priorities and actively optimise for users 
who are transitioning from JUnit 4 to 5, at the cost of those that have already 
completed the transition seems crazy to me.

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 

[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-19 Thread Robert James Oxspring (Jira)


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

Robert James Oxspring commented on SUREFIRE-2033:
-

The documentation is also very clear about the precedence algorithm used to 
choose the engine/runner to use:

[https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html]

If nothing is configured, Surefire detects which JUnit version to use by the 
following algorithm:
  # if the JUnit 5 Platform Engine is present in the project
 # use junit-platform
 # if the JUnit version in the project >= 4.7 and the <<>> 
configuration parameter has ANY value
 # use junit47 provider
 # if JUnit >= 4.0 is present
 # use junit4 provider
 # else
 # use junit3.8.1
Prior to M5, surefire worked as documented and actively preferred to use JUnit 
5 if the engine is present. Since M5, switches away from this documented 
behaviour and conditionally prefers to run the older junit-platform-runner, if 
present, effectively preferring JUnit 4.

As discussed previously, we have a business requirement for our product to use 
junit-platform-runner, but tests of our product are using JUnit 5 and have been 
run via the junit-Jupiter-engine for as long as I can remember. You may find 
this a silly requirement, and I’d love to change it, but that is what the 
business requires.

Your main concern seems to be that use of junit-platform-runner is unusual and 
not a recommended configuration. Given this, doesn’t it seem odd that M5 
changes behaviour to actively prefer this unusual unrecommended runner over the 
Junit Jupiter Engine that is also present?

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | 

[jira] [Updated] (SUREFIRE-2036) Regression: 3.0.0-M5 fails with configured JUnit 5 provider

2022-03-09 Thread Robert James Oxspring (Jira)


 [ 
https://issues.apache.org/jira/browse/SUREFIRE-2036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert James Oxspring updated SUREFIRE-2036:

Description: 
SUREFIRE-2033 breaks the automatic configuration of the JUnit 5 provider when 
{{junit-platform-runner}} happens to be in the classpath, but additionally 
manual override of this misconfiguration is broken too and results in a 
{{{}NullPointerException{}}}.

Specifically, using [https://github.com/apache/maven-surefire/pull/485]:
{code:java}
% mvn test -f surefire-its/src/test/resources/surefire-2036 
-Dsurefire.version=3.0.0-M5 -X
...
[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time:  1.022 s
[INFO] Finished at: 2022-03-09T22:18:36Z
[INFO] 
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on 
project surefire-2036: Execution default-test of goal 
org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed.: 
NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on 
project surefire-2036: Execution default-test of goal 
org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:81)
    at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
 (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
(Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
(Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
(Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main 
(Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution 
default-test of goal 
org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed.
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
(DefaultBuildPluginManager.java:148)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:81)
    at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
 (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:62)
    at 

[jira] [Created] (SUREFIRE-2036) Regression: 3.0.0-M5 fails with configured JUnit 5 provider

2022-03-09 Thread Robert James Oxspring (Jira)
Robert James Oxspring created SUREFIRE-2036:
---

 Summary: Regression: 3.0.0-M5 fails with configured JUnit 5 
provider
 Key: SUREFIRE-2036
 URL: https://issues.apache.org/jira/browse/SUREFIRE-2036
 Project: Maven Surefire
  Issue Type: Bug
Reporter: Robert James Oxspring


3.0.0-M5 fails with configured JUnit 5 provider



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-08 Thread Robert James Oxspring (Jira)


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

Robert James Oxspring commented on SUREFIRE-2033:
-

Fix for the NullPointerException: 
https://github.com/apache/maven-surefire/pull/485

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-08 Thread Robert James Oxspring (Jira)


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

Robert James Oxspring commented on SUREFIRE-2033:
-

... and that blows up with a {{NullPointerException}} at the moment. I have a 
fix for that though, will open a PR shortly.

We have a product that works with JUnit tests and needs to run them. Our 
customers use a variety of JUnit 4-5 versions and so we use 
junit-platform-runner to run them. But the tests _of_ our product primarily use 
JUnit 5. We want to upgrade to Surefire 3.0.0-M5 to take advantage of 
SUREFIRE-1797 but are currently blocked because Surefire is chosing the wrong 
runner.

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note 

[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-07 Thread Robert James Oxspring (Jira)


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

Robert James Oxspring commented on SUREFIRE-2033:
-

No, {{junit-platform-runner}} is an intended actual dependency of the project 
and cannot be removed. Prior to M5, this caused Surefire no problem whatsoever.

If there's something that can be added to the pom to force the use of JUnit 5 
then I'd take that as a workaround, but removing dependencies is just not 
possible.

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-07 Thread Robert James Oxspring (Jira)


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

Robert James Oxspring commented on SUREFIRE-2033:
-

What do I have to add to this pom.xml file in order to have JUnit 5 tests run 
again?

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-04 Thread Robert James Oxspring (Jira)


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

Robert James Oxspring commented on SUREFIRE-2033:
-

And yet the result is that in this configuration it fails to run the test at 
all - not via JUnit4 or JUnit 5. This behaviour in M5 is entirely regressive.

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-03 Thread Robert James Oxspring (Jira)


 [ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert James Oxspring updated SUREFIRE-2033:

Description: 
3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
using JUnit 4.

In particular the attached project only has JUnit 5 dependencies:
{code:java}


org.junit.jupiter
junit-jupiter-engine
5.6.2
test


org.junit.platform
junit-platform-runner
1.6.2
test

{code}
and a JUnit 5 test:
{code:java}
package pkg;

import org.junit.jupiter.api.Test;

class JUnit5Test {
@Test
public void test() {

}
}{code}
When the project is run with with older version (as far back as 2.22.0) the 
test is found and run, but 3.0.0-M5 fails to run any test:
{code:java}
% mvn test -Dsurefire.version=2.22.0 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.337 s
[INFO] Finished at: 2022-03-03T09:42:27Z
[INFO]  
{code}
 
{code:java}
% mvn test -Dsurefire.version=3.0.0-M1 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.708 s
[INFO] Finished at: 2022-03-03T09:34:58Z
[INFO]  

% mvn test -Dsurefire.version=3.0.0-M2 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.701 s
[INFO] Finished at: 2022-03-03T09:36:26Z
[INFO] 

% mvn test -Dsurefire.version=3.0.0-M3 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.612 s
[INFO] Finished at: 2022-03-03T09:37:02Z
[INFO] 

% mvn test -Dsurefire.version=3.0.0-M4 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.619 s
[INFO] Finished at: 2022-03-03T09:37:37Z
[INFO] 

% mvn test -Dsurefire.version=3.0.0-M5 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.344 s
[INFO] Finished at: 2022-03-03T09:38:01Z
[INFO] 
{code}
Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}

  was:
3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
using JUnit 4.

In particular the attached project only has JUnit 5 dependencies:
 
{code:java}


org.junit.jupiter
junit-jupiter-engine
5.6.2
test


org.junit.platform
junit-platform-runner
1.6.2
test

{code}
and a JUnit 5 test:
 
{code:java}
package pkg;

import org.junit.jupiter.api.Test;

class JUnit5Test {
@Test
public void test() {

}
}{code}
When the project is run with with older version (as far back as 2.22.0) the 
test is found and run, but 3.0.0-M5 fails to run any test:
{code:java}
% mvn test -Dsurefire.version=2.22.0 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.337 s
[INFO] Finished at: 2022-03-03T09:42:27Z
[INFO]  
{code}
 
{code:java}
% mvn test -Dsurefire.version=3.0.0-M1 | tail

[jira] [Updated] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-03 Thread Robert James Oxspring (Jira)


 [ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert James Oxspring updated SUREFIRE-2033:

Description: 
3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
using JUnit 4.

In particular the attached project only has JUnit 5 dependencies:
 
{code:java}


org.junit.jupiter
junit-jupiter-engine
5.6.2
test


org.junit.platform
junit-platform-runner
1.6.2
test

{code}
and a JUnit 5 test:
 
{code:java}
package pkg;

import org.junit.jupiter.api.Test;

class JUnit5Test {
@Test
public void test() {

}
}{code}
When the project is run with with older version (as far back as 2.22.0) the 
test is found and run, but 3.0.0-M5 fails to run any test:
{code:java}
% mvn test -Dsurefire.version=2.22.0 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.337 s
[INFO] Finished at: 2022-03-03T09:42:27Z
[INFO]  
{code}
 
{code:java}
% mvn test -Dsurefire.version=3.0.0-M1 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.708 s
[INFO] Finished at: 2022-03-03T09:34:58Z
[INFO]  

% mvn test -Dsurefire.version=3.0.0-M2 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.701 s
[INFO] Finished at: 2022-03-03T09:36:26Z
[INFO] 

% mvn test -Dsurefire.version=3.0.0-M3 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.612 s
[INFO] Finished at: 2022-03-03T09:37:02Z
[INFO] 

% mvn test -Dsurefire.version=3.0.0-M4 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.619 s
[INFO] Finished at: 2022-03-03T09:37:37Z
[INFO] 

% mvn test -Dsurefire.version=3.0.0-M5 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.344 s
[INFO] Finished at: 2022-03-03T09:38:01Z
[INFO] 
{code}
Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}

  was:
3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
using JUnit 4.

In particular the attached project only has JUnit 5 dependencies 
(org.junit.jupiter:junit-jupiter-engine, 
org.junit.platform:junit-platform-runner) and a JUnit 5 test (JUnit5Test.java):

 

When the project is run with with older version (as far back as 2.22.0) the 
test is found and run, but 3.0.0-M5 fails to run any test:
{code:java}
% mvn test -Dsurefire.version=2.22.0 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.337 s
[INFO] Finished at: 2022-03-03T09:42:27Z
[INFO]  
{code}
 
{code:java}
% mvn test -Dsurefire.version=3.0.0-M1 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 

[jira] [Updated] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-03 Thread Robert James Oxspring (Jira)


 [ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert James Oxspring updated SUREFIRE-2033:

Description: 
3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
using JUnit 4.

In particular the attached project only has JUnit 5 dependencies 
(org.junit.jupiter:junit-jupiter-engine, 
org.junit.platform:junit-platform-runner) and a JUnit 5 test (JUnit5Test.java):

 

When the project is run with with older version (as far back as 2.22.0) the 
test is found and run, but 3.0.0-M5 fails to run any test:
{code:java}
% mvn test -Dsurefire.version=2.22.0 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.337 s
[INFO] Finished at: 2022-03-03T09:42:27Z
[INFO]  
{code}
 
{code:java}
% mvn test -Dsurefire.version=3.0.0-M1 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.708 s
[INFO] Finished at: 2022-03-03T09:34:58Z
[INFO]  

% mvn test -Dsurefire.version=3.0.0-M2 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.701 s
[INFO] Finished at: 2022-03-03T09:36:26Z
[INFO] 

% mvn test -Dsurefire.version=3.0.0-M3 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.612 s
[INFO] Finished at: 2022-03-03T09:37:02Z
[INFO] 

% mvn test -Dsurefire.version=3.0.0-M4 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.619 s
[INFO] Finished at: 2022-03-03T09:37:37Z
[INFO] 

% mvn test -Dsurefire.version=3.0.0-M5 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.344 s
[INFO] Finished at: 2022-03-03T09:38:01Z
[INFO] 
{code}
Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}

  was:
3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
using JUnit 4.

In particular the attached project only has JUnit 5 dependencies 
(org.junit.jupiter:junit-jupiter-engine, 
org.junit.platform:junit-platform-runner) and a JUnit 5 test (JUnit5Test.java). 
When the project is run with with older version (as far back as 2.22.0) the 
test is found and run, but 3.0.0-M5 fails to run any test:
{code:java}
% mvn test -Dsurefire.version=2.22.0 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.337 s
[INFO] Finished at: 2022-03-03T09:42:27Z
[INFO]  
{code}
 
{code:java}
% mvn test -Dsurefire.version=3.0.0-M1 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.708 s
[INFO] Finished at: 2022-03-03T09:34:58Z
[INFO]  

% mvn test -Dsurefire.version=3.0.0-M2 | tail
[INFO] 

[jira] [Updated] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-03 Thread Robert James Oxspring (Jira)


 [ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert James Oxspring updated SUREFIRE-2033:

Description: 
3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
using JUnit 4.

In particular the attached project only has JUnit 5 dependencies 
(org.junit.jupiter:junit-jupiter-engine, 
org.junit.platform:junit-platform-runner) and a JUnit 5 test (JUnit5Test.java). 
When the project is run with with older version (as far back as 2.22.0) the 
test is found and run, but 3.0.0-M5 fails to run any test:
{code:java}
% mvn test -Dsurefire.version=2.22.0 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.337 s
[INFO] Finished at: 2022-03-03T09:42:27Z
[INFO]  
{code}
 
{code:java}
% mvn test -Dsurefire.version=3.0.0-M1 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.708 s
[INFO] Finished at: 2022-03-03T09:34:58Z
[INFO]  

% mvn test -Dsurefire.version=3.0.0-M2 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.701 s
[INFO] Finished at: 2022-03-03T09:36:26Z
[INFO] 

% mvn test -Dsurefire.version=3.0.0-M3 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.612 s
[INFO] Finished at: 2022-03-03T09:37:02Z
[INFO] 

% mvn test -Dsurefire.version=3.0.0-M4 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.619 s
[INFO] Finished at: 2022-03-03T09:37:37Z
[INFO] 

% mvn test -Dsurefire.version=3.0.0-M5 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.344 s
[INFO] Finished at: 2022-03-03T09:38:01Z
[INFO] 
{code}
Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}

  was:
3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
using JUnit 4.

In particular the attached project only has JUnit 5 dependencies 
(org.junit.jupiter:junit-jupiter-engine, 
org.junit.platform:junit-platform-runner) and a JUnit 5 test (JUnit5Test.java). 
When the project is run with with older version (as far back as 2.22.0) the 
test is found and run, but 3.0.0-M5 fails to run any test:
{code:java}
% mvn test -Dsurefire.version=2.22.0 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.337 s
[INFO] Finished at: 2022-03-03T09:42:27Z
[INFO]  
{code}
 
{code:java}
% mvn test -Dsurefire.version=3.0.0-M1 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.708 s
[INFO] Finished at: 2022-03-03T09:34:58Z
[INFO]  

% mvn test -Dsurefire.version=3.0.0-M2 | tail
[INFO] 

[jira] [Created] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-03 Thread Robert James Oxspring (Jira)
Robert James Oxspring created SUREFIRE-2033:
---

 Summary: Regression: 3.0.0-M5 misidentifies JUnit 5 configuration 
as JUnit 4
 Key: SUREFIRE-2033
 URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
 Project: Maven Surefire
  Issue Type: Bug
  Components: JUnit 5.x support
Affects Versions: 3.0.0-M5
Reporter: Robert James Oxspring
 Attachments: example.zip

3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
using JUnit 4.

In particular the attached project only has JUnit 5 dependencies 
(org.junit.jupiter:junit-jupiter-engine, 
org.junit.platform:junit-platform-runner) and a JUnit 5 test (JUnit5Test.java). 
When the project is run with with older version (as far back as 2.22.0) the 
test is found and run, but 3.0.0-M5 fails to run any test:
{code:java}
% mvn test -Dsurefire.version=2.22.0 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.337 s
[INFO] Finished at: 2022-03-03T09:42:27Z
[INFO]  
{code}
 
{code:java}
% mvn test -Dsurefire.version=3.0.0-M1 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.708 s
[INFO] Finished at: 2022-03-03T09:34:58Z
[INFO]  

% mvn test -Dsurefire.version=3.0.0-M2 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.701 s
[INFO] Finished at: 2022-03-03T09:36:26Z
[INFO] 

% mvn test -Dsurefire.version=3.0.0-M3 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.612 s
[INFO] Finished at: 2022-03-03T09:37:02Z
[INFO] 

% mvn test -Dsurefire.version=3.0.0-M4 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.619 s
[INFO] Finished at: 2022-03-03T09:37:37Z
[INFO] 

% mvn test -Dsurefire.version=3.0.0-M5 | tail
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  1.344 s
[INFO] Finished at: 2022-03-03T09:38:01Z
[INFO] 
{code}
 

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-1963) Detecting multiple test-frameworks

2022-02-24 Thread Robert James Oxspring (Jira)


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

Robert James Oxspring commented on SUREFIRE-1963:
-

Is it really healthy that the default behaviour will be to continue to silently 
skip some tests? That way the problem of "silently skipping" tests by default 
is entirely unresolved by this issue.

Many people won't know of the {{multipleFrameworks}} option, and with this 
default behaviour won't even know if they're suffering from it. I can 
understand that failing their build might be considered harsh and surprising, 
but I'd have thought it should be a warning at a minimum.

> Detecting multiple test-frameworks
> --
>
> Key: SUREFIRE-1963
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1963
> Project: Maven Surefire
>  Issue Type: New Feature
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
>
> When multiple test frameworks are present on project classpath surefire 
> chooses one framework for running test.
> During automatically provider discover some of type test can be *skipped* 
> without any knowledge and information for developer.
> It is danger situation than developer can add *second* test framework to 
> project and in the result some of test will be *skipped silently.*
> We can force usage one or more needed providers by adding those to plugin 
> dependency and we can have control on executing test.
> h3. Proposition
>  - add options {{multipleFrameworks}} *empty* (not set) by default, with 
> possible value *warn* or *fail*
> h3. Scenario 1 - default
> h4. when
>  - {{multipleFrameworks = *empty* - not set}}
>  - many tests framework on classpath
>  - no providers on plugin dependency
> h4. then
>  - current behavior - choose first provider without warning about skipped test
> h3. Scenario 2
> h4. when
>  - {{multipleFrameworks = *warn*}}
>  - many tests framework on classpath
>  - no providers on plugin dependency
> h4. then
>  - print warn about multiple providers
> h3. Scenario 3
> h4. when
>  - {{multipleFrameworks = *fail*}}
>  - many tests framework on classpath
>  - no providers on plugin dependency
> h4. then
>  - print error about multiple providers and break build
> h3. Scenario 4
> h4. when
>  - many tests framework on classpath
>  - selected providers on plugin dependency
> h4. then
>  - ignore {{multipleFrameworks}}
>  - use providers from dependency list, no warning



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Created] (MINVOKER-268) invoker:run skips invocation when the sources are unmodified

2020-08-12 Thread Robert James Oxspring (Jira)
Robert James Oxspring created MINVOKER-268:
--

 Summary: invoker:run skips invocation when the sources are 
unmodified  
 Key: MINVOKER-268
 URL: https://issues.apache.org/jira/browse/MINVOKER-268
 Project: Maven Invoker Plugin
  Issue Type: New Feature
Reporter: Robert James Oxspring


As a user I want to skip repeated invocations of invoker:run goal when the 
sources have not changed so that incremental builds when the test projects are 
unmodified.

My team have been using the Maven Invoker Plugin’s run goal to package some 
sample test projects during pre-integration-test which we then use during 
integration tests. We’re not using it to test a maven plugin but it doesn’t 
feel like we’re straying very far from the intended use case. The approach 
works well but as we add more test projects the time taken for each increases 
as each test project is rebuilt, even when the test project hasn’t changed at 
all. People making changes to unrelated parts of the codebase don’t want to 
rebuild these test samples for every unrelated change they make.

As a result I’m thinking of adding an “updateOnly” (default false) 
configuration option modelled after the Maven Assembly Plugin’s, linked below, 
such that we only rebuild each project if a source file is newer than one of 
the target files. 
[https://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html#updateOnly]

 

Given an invoker:run goal with updateOnly=false (default existing case)

When the goal is repeated

Then the invocation is repeated

 

Given an invoker:run goal with updateOnly=true (new case)

When the goal is repeated

Then the invocation is skipped



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (MASSEMBLY-939) META-INF services aggregating invalidates updateOnly

2020-07-15 Thread Robert James Oxspring (Jira)
Robert James Oxspring created MASSEMBLY-939:
---

 Summary: META-INF services aggregating invalidates updateOnly
 Key: MASSEMBLY-939
 URL: https://issues.apache.org/jira/browse/MASSEMBLY-939
 Project: Maven Assembly Plugin
  Issue Type: Bug
Reporter: Robert James Oxspring


When aggregating META-INF/services/ entries the merged entry effectively has a 
lastModified date of now. Consequently the  logic always sees the 
sources as newer than the destination, and triggers unnecessary overwriting.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MRESOURCES-258) Only overwrite filtered resources when contents differ

2020-07-15 Thread Robert James Oxspring (Jira)


[ 
https://issues.apache.org/jira/browse/MRESOURCES-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17158482#comment-17158482
 ] 

Robert James Oxspring commented on MRESOURCES-258:
--

Note that this is effectively fixed by the commit below, but we need to release 
maven-shared-utils, bump maven-filtering to use that and release, bump 
maven-resources-plugin to use that.

 

https://github.com/apache/maven-shared-utils/commit/e57180309a64758e161513d80f1185e13dc84826

> Only overwrite filtered resources when contents differ
> --
>
> Key: MRESOURCES-258
> URL: https://issues.apache.org/jira/browse/MRESOURCES-258
> Project: Maven Resources Plugin
>  Issue Type: Improvement
>  Components: filtering
>Affects Versions: 3.1.0
>Reporter: Robert James Oxspring
>Priority: Major
>
> When using {{mvn resources:copy-resources}} with filtering enabled, the 
> destination file should only be overwritten if the contents have changed. 
> Given a {{mvn resources:copy-resources}} call with filtering configured
>  When an identical {{mvn resources:copy-resources}} operation is performed
>  Then the destination file should remain unmodified
> Given a {{mvn resources:copy-resources}} call with filtering configured and 
> {{overwrite}} set {{true}}
>  When an identical {{mvn resources:copy-resources}} operation is performed
>  Then the destination file should be overwritten



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MSHARED-884) Only overwrite filtered resources when contents differ

2020-07-15 Thread Robert James Oxspring (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17158481#comment-17158481
 ] 

Robert James Oxspring commented on MSHARED-884:
---

Note that this is fixed in master and just awaiting a release:

https://github.com/apache/maven-shared-utils/commit/e57180309a64758e161513d80f1185e13dc84826

> Only overwrite filtered resources when contents differ
> --
>
> Key: MSHARED-884
> URL: https://issues.apache.org/jira/browse/MSHARED-884
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-filtering
>Reporter: Robert James Oxspring
>Assignee: Olivier Lamy
>Priority: Major
>
> When filtering files with the {{MavenFileFilter.copyFile}} method, the 
> destination file should only be overwritten if the contents have changed. 
> Currently we unconditionally overwrite the contents in this situation, 
> potentially leading to unnecessary downstream work. When the {{overwrite}} 
> parameter is {{true}} then overwriting should overwrite as it does now.
> Given a {{copyFile}} call
>  When an identical {{copyFile}} operation is performed
>  Then the destination file should remain unmodified
> Given a {{copyFile}} call with {{overwrite}} set {{true}}
>  When an identical {{copyFile}} operation is performed
>  Then the destination file should be overwritten
> The [linked pull request|https://github.com/apache/maven-filtering/pull/5] 
> meets these requirements by writing the filtered resource to a temporary file 
> and then comparing the temporary contents to the content of a previously 
> written target file. If the contents match then the temporary file is 
> deleted, otherwise it's renamed over the top of the target file.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (MRESOURCES-258) Only overwrite filtered resources when contents differ

2020-07-15 Thread Robert James Oxspring (Jira)


 [ 
https://issues.apache.org/jira/browse/MRESOURCES-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert James Oxspring updated MRESOURCES-258:
-
Affects Version/s: 3.1.0

> Only overwrite filtered resources when contents differ
> --
>
> Key: MRESOURCES-258
> URL: https://issues.apache.org/jira/browse/MRESOURCES-258
> Project: Maven Resources Plugin
>  Issue Type: Improvement
>  Components: filtering
>Affects Versions: 3.1.0
>Reporter: Robert James Oxspring
>Priority: Major
>
> When using {{mvn resources:copy-resources}} with filtering enabled, the 
> destination file should only be overwritten if the contents have changed. 
> Given a {{mvn resources:copy-resources}} call with filtering configured
>  When an identical {{mvn resources:copy-resources}} operation is performed
>  Then the destination file should remain unmodified
> Given a {{mvn resources:copy-resources}} call with filtering configured and 
> {{overwrite}} set {{true}}
>  When an identical {{mvn resources:copy-resources}} operation is performed
>  Then the destination file should be overwritten



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MSHARED-431) # (Hash-Sign) should trigger quoting in BourneShell.java

2020-05-27 Thread Robert James Oxspring (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17118128#comment-17118128
 ] 

Robert James Oxspring commented on MSHARED-431:
---

Adding {{'#'}} to {{BASH_QUOTING_TRIGGER_CHARS}} is indeed fairly straight 
forward and can be demonstrated with a simple test.

Looking for the specifications of exactly what characters _should_ be quoted I 
noticed 
[this|https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02]
 suggesting that {{'\\'}}, {{'\"'}}, {{'\''}}, {{'\t'}}, {{'\n'}}, {{'˜'}}, 
{{'='}}, {{'%'}} ought to also be added. Any opinions out there as to whether 
we should be adding the entire list vs purposely omitting some/all of these 
additions?

> # (Hash-Sign) should trigger quoting in BourneShell.java
> 
>
> Key: MSHARED-431
> URL: https://issues.apache.org/jira/browse/MSHARED-431
> Project: Maven Shared Components
>  Issue Type: Bug
>  Components: maven-shared-utils
>Affects Versions: maven-shared-utils-0.8
> Environment: Unix (Linux)
>Reporter: Fritz Elfert
>Priority: Major
>
> When trying to use the latest maven-jarsign-plugin using a keystore-password 
> which started with a hash (#), signing failed. After enabling debug output 
> with -X, I got a strange debug message:
> [DEBUG] Option lacks argument
> Since signtool is invoked using /bin/sh -c ..., of course, any # must be 
> quoted, because otherwise it acts as a comment-start and thus effectively 
> cuts-off the rest of the cmdline.
> After single-quoting the password in the pom.xml, the jar signing was ok.
> =>
> Adding '#' to BASH_QUOTING_TRIGGER_CHARS in 
> org.apache.maven.shared.utils.cli.shell.BourneShell.java should fix the 
> problem.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MSHARED-681) Maven-Shared: Java7Support silently fails overwriting symlinks

2020-05-17 Thread Robert James Oxspring (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17109652#comment-17109652
 ] 

Robert James Oxspring commented on MSHARED-681:
---

Updated PR opened, inspired by [~mkarg]'s changes but avoiding recreation of 
identical symlinks and adding a test:

https://github.com/apache/maven-shared-utils/pull/31

> Maven-Shared: Java7Support silently fails overwriting symlinks
> --
>
> Key: MSHARED-681
> URL: https://issues.apache.org/jira/browse/MSHARED-681
> Project: Maven Shared Components
>  Issue Type: Bug
>  Components: maven-shared-utils
>Reporter: Markus Karg
>Priority: Critical
>
> When A is an existing symlink to B, then createSymbolicLink(A,C) does
> neither overwrite A->B by A->C (as expected in analogy to the behavior
> of copy(A,C)) nor does it throw an exception nor does it return A->B to
> indicate the failure, but it actually "silently fails", i. e. it returns
> A->C!
> This certainly is heavily problematic, unsymmetric to what
> copy(File,File) and Files.createSymbolicLink(Path,Path) do, and
> certainly unwanted and buggy behavior.
> The solution is to delete any existing target before creating the
> symlic, hence copying the behavior of copy(File,File).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MSHARED-884) Only overwrite filtered resources when contents differ

2020-04-29 Thread Robert James Oxspring (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17095970#comment-17095970
 ] 

Robert James Oxspring commented on MSHARED-884:
---

I’m not clear what aspect of that 4kloc file is supposed to help here. Can you 
point to something more specific?
Approaches tracking the available properties for substitution must always fail 
since the likes of maven.build.timestamp will always be different. I don’t see 
how tracking the used properties is possible without at least the io of an 
extra read of the source file, to identify the properties that count. The java 
doc fix mojo doesn’t appear to address this does it?

(Happy to take the conversation back to the dev list if preferred)

> Only overwrite filtered resources when contents differ
> --
>
> Key: MSHARED-884
> URL: https://issues.apache.org/jira/browse/MSHARED-884
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-filtering
>Reporter: Robert James Oxspring
>Priority: Major
>
> When filtering files with the {{MavenFileFilter.copyFile}} method, the 
> destination file should only be overwritten if the contents have changed. 
> Currently we unconditionally overwrite the contents in this situation, 
> potentially leading to unnecessary downstream work. When the {{overwrite}} 
> parameter is {{true}} then overwriting should overwrite as it does now.
> Given a {{copyFile}} call
>  When an identical {{copyFile}} operation is performed
>  Then the destination file should remain unmodified
> Given a {{copyFile}} call with {{overwrite}} set {{true}}
>  When an identical {{copyFile}} operation is performed
>  Then the destination file should be overwritten
> The [linked pull request|https://github.com/apache/maven-filtering/pull/5] 
> meets these requirements by writing the filtered resource to a temporary file 
> and then comparing the temporary contents to the content of a previously 
> written target file. If the contents match then the temporary file is 
> deleted, otherwise it's renamed over the top of the target file.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (MRESOURCES-258) Only overwrite filtered resources when contents differ

2020-04-29 Thread Robert James Oxspring (Jira)


 [ 
https://issues.apache.org/jira/browse/MRESOURCES-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert James Oxspring updated MRESOURCES-258:
-
Description: 
When using {{mvn resources:copy-resources}} with filtering enabled, the 
destination file should only be overwritten if the contents have changed. 

Given a {{mvn resources:copy-resources}} call with filtering configured
 When an identical {{mvn resources:copy-resources}} operation is performed
 Then the destination file should remain unmodified

Given a {{mvn resources:copy-resources}} call with filtering configured and 
{{overwrite}} set {{true}}
 When an identical {{mvn resources:copy-resources}} operation is performed
 Then the destination file should be overwritten

  was:
When filtering files with the {{MavenFileFilter.copyFile}} method, the 
destination file should only be overwritten if the contents have changed. 
Currently we unconditionally overwrite the contents in this situation, 
potentially leading to unnecessary downstream work. When the {{overwrite}} 
parameter is {{true}} then overwriting should overwrite as it does now.

Given a {{copyFile}} call
 When an identical filterFile operation is performed
 Then the destination file should remain unmodified

Given a {{copyFile}} call with {{overwrite}} set {{true}}
 When an identical filterFile operation is performed
 Then the destination file should be overwritten


> Only overwrite filtered resources when contents differ
> --
>
> Key: MRESOURCES-258
> URL: https://issues.apache.org/jira/browse/MRESOURCES-258
> Project: Maven Resources Plugin
>  Issue Type: Improvement
>  Components: filtering
>Reporter: Robert James Oxspring
>Priority: Major
>
> When using {{mvn resources:copy-resources}} with filtering enabled, the 
> destination file should only be overwritten if the contents have changed. 
> Given a {{mvn resources:copy-resources}} call with filtering configured
>  When an identical {{mvn resources:copy-resources}} operation is performed
>  Then the destination file should remain unmodified
> Given a {{mvn resources:copy-resources}} call with filtering configured and 
> {{overwrite}} set {{true}}
>  When an identical {{mvn resources:copy-resources}} operation is performed
>  Then the destination file should be overwritten



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (MSHARED-884) Only overwrite filtered resources when contents differ

2020-04-29 Thread Robert James Oxspring (Jira)


 [ 
https://issues.apache.org/jira/browse/MSHARED-884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert James Oxspring updated MSHARED-884:
--
Description: 
When filtering files with the {{MavenFileFilter.copyFile}} method, the 
destination file should only be overwritten if the contents have changed. 
Currently we unconditionally overwrite the contents in this situation, 
potentially leading to unnecessary downstream work. When the {{overwrite}} 
parameter is {{true}} then overwriting should overwrite as it does now.

Given a {{copyFile}} call
 When an identical {{copyFile}} operation is performed
 Then the destination file should remain unmodified

Given a {{copyFile}} call with {{overwrite}} set {{true}}
 When an identical {{copyFile}} operation is performed
 Then the destination file should be overwritten

The [linked pull request|https://github.com/apache/maven-filtering/pull/5] 
meets these requirements by writing the filtered resource to a temporary file 
and then comparing the temporary contents to the content of a previously 
written target file. If the contents match then the temporary file is deleted, 
otherwise it's renamed over the top of the target file.

  was:
When filtering files with the {{MavenFileFilter.copyFile}} method, the 
destination file should only be overwritten if the contents have changed. 
Currently we unconditionally overwrite the contents in this situation, 
potentially leading to unnecessary downstream work. When the {{overwrite}} 
parameter is {{true}} then overwriting should overwrite as it does now.

Given a {{copyFile}} call
When an identical filterFile operation is performed
Then the destination file should remain unmodified

Given a {{copyFile}} call with {{overwrite}} set {{true}}
When an identical filterFile operation is performed
Then the destination file should be overwritten


> Only overwrite filtered resources when contents differ
> --
>
> Key: MSHARED-884
> URL: https://issues.apache.org/jira/browse/MSHARED-884
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-filtering
>Reporter: Robert James Oxspring
>Priority: Major
>
> When filtering files with the {{MavenFileFilter.copyFile}} method, the 
> destination file should only be overwritten if the contents have changed. 
> Currently we unconditionally overwrite the contents in this situation, 
> potentially leading to unnecessary downstream work. When the {{overwrite}} 
> parameter is {{true}} then overwriting should overwrite as it does now.
> Given a {{copyFile}} call
>  When an identical {{copyFile}} operation is performed
>  Then the destination file should remain unmodified
> Given a {{copyFile}} call with {{overwrite}} set {{true}}
>  When an identical {{copyFile}} operation is performed
>  Then the destination file should be overwritten
> The [linked pull request|https://github.com/apache/maven-filtering/pull/5] 
> meets these requirements by writing the filtered resource to a temporary file 
> and then comparing the temporary contents to the content of a previously 
> written target file. If the contents match then the temporary file is 
> deleted, otherwise it's renamed over the top of the target file.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (MSHARED-884) Only overwrite filtered resources when contents differ

2020-04-29 Thread Robert James Oxspring (Jira)
Robert James Oxspring created MSHARED-884:
-

 Summary: Only overwrite filtered resources when contents differ
 Key: MSHARED-884
 URL: https://issues.apache.org/jira/browse/MSHARED-884
 Project: Maven Shared Components
  Issue Type: Improvement
  Components: maven-filtering
Reporter: Robert James Oxspring


When filtering files with the {{MavenFileFilter.copyFile}} method, the 
destination file should only be overwritten if the contents have changed. 
Currently we unconditionally overwrite the contents in this situation, 
potentially leading to unnecessary downstream work. When the {{overwrite}} 
parameter is {{true}} then overwriting should overwrite as it does now.

Given a {{copyFile}} call
When an identical filterFile operation is performed
Then the destination file should remain unmodified

Given a {{copyFile}} call with {{overwrite}} set {{true}}
When an identical filterFile operation is performed
Then the destination file should be overwritten



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (MRESOURCES-258) Only overwrite filtered resources when contents differ

2020-04-29 Thread Robert James Oxspring (Jira)
Robert James Oxspring created MRESOURCES-258:


 Summary: Only overwrite filtered resources when contents differ
 Key: MRESOURCES-258
 URL: https://issues.apache.org/jira/browse/MRESOURCES-258
 Project: Maven Resources Plugin
  Issue Type: Improvement
  Components: filtering
Reporter: Robert James Oxspring


When filtering files with the {{MavenFileFilter.copyFile}} method, the 
destination file should only be overwritten if the contents have changed. 
Currently we unconditionally overwrite the contents in this situation, 
potentially leading to unnecessary downstream work. When the {{overwrite}} 
parameter is {{true}} then overwriting should overwrite as it does now.

Given a {{copyFile}} call
 When an identical filterFile operation is performed
 Then the destination file should remain unmodified

Given a {{copyFile}} call with {{overwrite}} set {{true}}
 When an identical filterFile operation is performed
 Then the destination file should be overwritten



--
This message was sent by Atlassian Jira
(v8.3.4#803005)