[jira] [Commented] (SUREFIRE-2223) Surefire evaluates parameter jvm before skip

2023-12-23 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on SUREFIRE-2223:
--

asfgit merged PR #703:
URL: https://github.com/apache/maven-surefire/pull/703




> Surefire evaluates parameter jvm before skip
> 
>
> Key: SUREFIRE-2223
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2223
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Reporter: shpelda
>Assignee: Michael Osipov
>Priority: Minor
> Fix For: 3.2.4
>
>
> Surefire 3.2.3 execution configured like the one bellow will fail if 
> JAVA_11_HOME is not set.
> It is a regression, 2.17 version did correctly resolved skip(Tests) and 
> later, if enabled, it evaluated jvm.
> {code:java}
> 
>               h2-java11
>               
>                 test
>               
>               
>                 ${JAVA_11_HOME}/bin/java
>                 true
>               
>              
> fails with
> {code}
> Caused by: org.apache.maven.plugin.MojoFailureException: Given path to java 
> executor does not exist "c:\XXX\${JAVA_11_HOME}\bin\java".
>     at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getEffectiveJvm 
> (AbstractSurefireMojo.java:2374)
>     at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute 
> (AbstractSurefireMojo.java:882)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
> (DefaultBuildPluginManager.java:137)
>     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)
> {code:java}
>  {code}
>  



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


[jira] [Commented] (SUREFIRE-2223) Surefire evaluates parameter jvm before skip

2023-12-22 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on SUREFIRE-2223:
--

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

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




> Surefire evaluates parameter jvm before skip
> 
>
> Key: SUREFIRE-2223
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2223
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Reporter: shpelda
>Assignee: Michael Osipov
>Priority: Minor
> Fix For: 3.2.4
>
>
> Surefire 3.2.3 execution configured like the one bellow will fail if 
> JAVA_11_HOME is not set.
> It is a regression, 2.17 version did correctly resolved skip(Tests) and 
> later, if enabled, it evaluated jvm.
> {code:java}
> 
>               h2-java11
>               
>                 test
>               
>               
>                 ${JAVA_11_HOME}/bin/java
>                 true
>               
>              
> fails with
> {code}
> Caused by: org.apache.maven.plugin.MojoFailureException: Given path to java 
> executor does not exist "c:\XXX\${JAVA_11_HOME}\bin\java".
>     at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getEffectiveJvm 
> (AbstractSurefireMojo.java:2374)
>     at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute 
> (AbstractSurefireMojo.java:882)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
> (DefaultBuildPluginManager.java:137)
>     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)
> {code:java}
>  {code}
>  



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


[jira] [Commented] (SUREFIRE-2223) Surefire evaluates parameter jvm before skip

2023-12-22 Thread Michael Osipov (Jira)


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

Michael Osipov commented on SUREFIRE-2223:
--

Here is the method in question:
{code:java}
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
cli = commandLineOptions();
// Stuff that should have been final
setupStuff();
Platform platform = 
PLATFORM.withJdkExecAttributesForTests(getEffectiveJvm());
Thread shutdownThread = new Thread(platform::setShutdownState);
addShutDownHook(shutdownThread);
try {
if (verifyParameters() && !hasExecutedBefore()) {
DefaultScanResult scan = scanForTestClasses();
if (!hasSuiteXmlFiles() && scan.isEmpty()) {
switch (getEffectiveFailIfNoTests()) {
case COULD_NOT_RUN_DEFAULT_TESTS:
throw new MojoFailureException(
"No tests were executed!  (Set 
-DfailIfNoTests=false to ignore this error.)");
case COULD_NOT_RUN_SPECIFIED_TESTS:
throw new MojoFailureException("No tests matching 
pattern \""
+ getSpecificTests().toString()
+ "\" were executed! (Set "
+ "-D" + getPluginName()
+ ".failIfNoSpecifiedTests=false to ignore 
this error.)");
default:
handleSummary(noTestsRun(), null);
return;
}
}
logReportsDirectory();
executeAfterPreconditionsChecked(scan, platform);
}
} finally {
platform.clearShutdownState();
removeShutdownHook(shutdownThread);
}
}
{code}

> Surefire evaluates parameter jvm before skip
> 
>
> Key: SUREFIRE-2223
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2223
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Reporter: shpelda
>Priority: Minor
>
> Surefire 3.2.3 execution configured like the one bellow will fail if 
> JAVA_11_HOME is not set.
> It is a regression, 2.17 version did correctly resolved skip(Tests) and 
> later, if enabled, it evaluated jvm.
> {code:java}
> 
>               h2-java11
>               
>                 test
>               
>               
>                 ${JAVA_11_HOME}/bin/java
>                 true
>               
>              
> fails with
> {code}
> Caused by: org.apache.maven.plugin.MojoFailureException: Given path to java 
> executor does not exist "c:\XXX\${JAVA_11_HOME}\bin\java".
>     at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getEffectiveJvm 
> (AbstractSurefireMojo.java:2374)
>     at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute 
> (AbstractSurefireMojo.java:882)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
> (DefaultBuildPluginManager.java:137)
>     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)
> {code:java}
>  {code}
>  



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


[jira] [Commented] (SUREFIRE-2223) Surefire evaluates parameter jvm before skip

2023-12-22 Thread shpelda (Jira)


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

shpelda commented on SUREFIRE-2223:
---

I do not know, but is introduced by this commit 
feb0efc1c73a009c49f22eb2bc0c923a36d78ab6.

 

> Surefire evaluates parameter jvm before skip
> 
>
> Key: SUREFIRE-2223
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2223
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Reporter: shpelda
>Priority: Minor
>
> Surefire 3.2.3 execution configured like the one bellow will fail if 
> JAVA_11_HOME is not set.
> It is a regression, 2.17 version did correctly resolved skip(Tests) and 
> later, if enabled, it evaluated jvm.
> {code:java}
> 
>               h2-java11
>               
>                 test
>               
>               
>                 ${JAVA_11_HOME}/bin/java
>                 true
>               
>              
> fails with
> {code}
> Caused by: org.apache.maven.plugin.MojoFailureException: Given path to java 
> executor does not exist "c:\XXX\${JAVA_11_HOME}\bin\java".
>     at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getEffectiveJvm 
> (AbstractSurefireMojo.java:2374)
>     at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute 
> (AbstractSurefireMojo.java:882)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
> (DefaultBuildPluginManager.java:137)
>     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)
> {code:java}
>  {code}
>  



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


[jira] [Commented] (SUREFIRE-2223) Surefire evaluates parameter jvm before skip

2023-12-21 Thread Michael Osipov (Jira)


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

Michael Osipov commented on SUREFIRE-2223:
--

Which was the first broken version?

> Surefire evaluates parameter jvm before skip
> 
>
> Key: SUREFIRE-2223
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2223
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Reporter: shpelda
>Priority: Minor
>
> Surefire 3.2.3 execution configured like the one bellow will fail if 
> JAVA_11_HOME is not set.
> It is a regression, 2.17 version did correctly resolved skip(Tests) and 
> later, if enabled, it evaluated jvm.
> {code:java}
> 
>               h2-java11
>               
>                 test
>               
>               
>                 ${JAVA_11_HOME}/bin/java
>                 true
>               
>              {code}
>  



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