You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/02/27 08:35:30 UTC

[GitHub] [maven-surefire] olamy opened a new pull request #479: test hacking depedencies and build plan to be able to use -T3 or mvnd

olamy opened a new pull request #479:
URL: https://github.com/apache/maven-surefire/pull/479


   - try to include those dependencies to fake the build plan and be sure its are runned last when using -Txx or mvnd
   - try -T3 for Jenkins and gh
   
   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).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] olamy commented on pull request #479: test hacking depedencies and build plan to be able to use -T3 or mvnd

Posted by GitBox <gi...@apache.org>.
olamy commented on pull request #479:
URL: https://github.com/apache/maven-surefire/pull/479#issuecomment-1056003349


   > related issue https://issues.apache.org/jira/browse/SUREFIRE-1956
   
   definitely related
   
   @Tibor17 
   
   just run `mvn clean verify -pl :surefire-its -am` and you will see dependencies are not declared correctly
   
   with master 
   
   ```
   ➜  maven-surefire git:(master) mvn clean verify -pl :surefire-its -am
   [INFO] Scanning for projects...
   [INFO] ------------------------------------------------------------------------
   [INFO] Reactor Build Order:
   [INFO] 
   [INFO] Apache Maven Surefire                                              [pom]
   [INFO] Maven Surefire Integration Tests                                   [jar]
   [INFO] 
   [INFO] -----------------< org.apache.maven.surefire:surefire >-----------------
   [INFO] Building Apache Maven Surefire 3.0.0-M6-SNAPSHOT                   [1/2]
   [INFO] --------------------------------[ pom ]---------------------------------
   ```
   with this branch: 
   
   ```
   ➜  maven-surefire git:(multithread-build-possible) mvn clean verify -pl :surefire-its -am                    
   [INFO] Scanning for projects...
   [INFO] ------------------------------------------------------------------------
   [INFO] Reactor Build Order:
   [INFO] 
   [INFO] Apache Maven Surefire                                              [pom]
   [INFO] Surefire Shared Utils                                              [jar]
   [INFO] SureFire Logger API                                                [jar]
   [INFO] SureFire API                                                       [jar]
   [INFO] Surefire Extensions API                                            [jar]
   [INFO] Surefire Extensions SPI                                            [jar]
   [INFO] SureFire Booter                                                    [jar]
   [INFO] Maven Surefire Common                                              [jar]
   [INFO] Surefire Report Parser                                             [jar]
   [INFO] Maven Surefire Plugin                                     [maven-plugin]
   [INFO] Maven Failsafe Plugin                                     [maven-plugin]
   [INFO] Maven Surefire Report Plugin                              [maven-plugin]
   [INFO] Maven Surefire Integration Tests                                   [jar]
   ```
   it is more correct but still wrong as this should include everything.
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] slawekjaranowski commented on pull request #479: test hacking depedencies and build plan to be able to use -T3 or mvnd

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on pull request #479:
URL: https://github.com/apache/maven-surefire/pull/479#issuecomment-1055921121


   related issue https://issues.apache.org/jira/browse/SUREFIRE-1956


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] olamy commented on a change in pull request #479: test hacking depedencies and build plan to be able to use -T3 or mvnd

Posted by GitBox <gi...@apache.org>.
olamy commented on a change in pull request #479:
URL: https://github.com/apache/maven-surefire/pull/479#discussion_r817414558



##########
File path: surefire-its/pom.xml
##########
@@ -241,6 +262,27 @@
                             </execution>
                         </executions>
                     </plugin>
+                  <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-invoker-plugin</artifactId>
+                    <configuration>
+                      <localRepositoryPath>${settings.localRepository}</localRepositoryPath>
+                      <extraArtifacts>
+                        <extraArtifact>org.apache.maven.plugins:maven-surefire-report-plugin:${project.version}</extraArtifact>
+                        <extraArtifact>org.apache.maven.plugins:maven-surefire-plugin:${project.version}</extraArtifact>
+                        <extraArtifact>org.apache.maven.plugins:maven-failsafe-plugin:${project.version}</extraArtifact>
+                      </extraArtifacts>

Review comment:
       correct.
   Ideally I'd like to run those IT tests with an empty repo.
   So still a bit of work but on it ;) 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #479: test hacking depedencies and build plan to be able to use -T3 or mvnd

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #479:
URL: https://github.com/apache/maven-surefire/pull/479#issuecomment-1055780469


   @olamy 
   This does not make sense.
   First of all the Maven should have very stable **Resolver** avoiding file locking in the Maven local repo. I used ParallelParameterized tests, I can do it again, but due to the Maven 3.2.x locks artifacts, ParallelParameterized won't be used.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] olamy commented on a change in pull request #479: test hacking depedencies and build plan to be able to use -T3 or mvnd

Posted by GitBox <gi...@apache.org>.
olamy commented on a change in pull request #479:
URL: https://github.com/apache/maven-surefire/pull/479#discussion_r835816817



##########
File path: surefire-its/pom.xml
##########
@@ -78,6 +78,57 @@
             <artifactId>commons-lang3</artifactId>
             <scope>test</scope>
         </dependency>
+        <!-- those dependencies are here to fake the build plan calculation
+        and being able to use -Txx or mvnd and have a faster multithread build
+        -->
+        <dependency>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>${project.version}</version>
+          <scope>compile</scope>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-failsafe-plugin</artifactId>
+          <version>${project.version}</version>
+          <scope>compile</scope>
+        </dependency>
+      <dependency>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <version>${project.version}</version>
+        <scope>compile</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.surefire</groupId>
+        <artifactId>surefire-junit-platform</artifactId>
+        <version>${project.version}</version>
+        <scope>compile</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.surefire</groupId>
+        <artifactId>surefire-junit48</artifactId>
+        <version>${project.version}</version>
+        <scope>compile</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.surefire</groupId>
+        <artifactId>suerfire-junit4</artifactId>

Review comment:
       oops




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] slawekjaranowski commented on pull request #479: test hacking depedencies and build plan to be able to use -T3 or mvnd

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on pull request #479:
URL: https://github.com/apache/maven-surefire/pull/479#issuecomment-1079719229


   From other side we don't have many boost by building project modules by many thread, at the end we land in `surefire-its` which consumes all time.
   
   I thinking to use Verifier in embedded mode for it tests like in Maven core its.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] olamy commented on pull request #479: test hacking depedencies and build plan to be able to use -T3 or mvnd

Posted by GitBox <gi...@apache.org>.
olamy commented on pull request #479:
URL: https://github.com/apache/maven-surefire/pull/479#issuecomment-1055863568


   > @olamy This does not make sense. First of all the Maven should have very stable **Resolver** avoiding file locking in the Maven local repo. I used ParallelParameterized tests, I can do it again, but due to the Maven 3.2.x locks artifacts, ParallelParameterized won't be used.
   
   There is nothing to do with Resolver or whatever.
   As explained in the description the goal is to be able to use `mvn -Tx` or `mvnd` to have a faster build (some modules can definitely be build in parallel). But doing that `surefire-its` is build from the start as it doesn't have any dependencies declared to the modules it will test! Which definitely doesn't reflect what the module needs to be build first. 
   As far I can tell the surefire-its test modules which test the maven-surefire-plugin and maven-failsafe-plugin definitely depends on the plugins to be build first.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] olamy edited a comment on pull request #479: test hacking depedencies and build plan to be able to use -T3 or mvnd

Posted by GitBox <gi...@apache.org>.
olamy edited a comment on pull request #479:
URL: https://github.com/apache/maven-surefire/pull/479#issuecomment-1055863568


   > @olamy This does not make sense. First of all the Maven should have very stable **Resolver** avoiding file locking in the Maven local repo. I used ParallelParameterized tests, I can do it again, but due to the Maven 3.2.x locks artifacts, ParallelParameterized won't be used.
   
   Dear @Tibor17 
   There is nothing to do with Resolver or whatever.
   As explained in the description the goal is to be able to use `mvn -Tx` or `mvnd` to have a faster build (some modules can definitely be build in parallel). But doing that `surefire-its` is build from the start as it doesn't have any dependencies declared to the modules it will test! Which definitely doesn't reflect what the module needs to be build first. 
   As far I can tell the surefire-its test modules which test the maven-surefire-plugin and maven-failsafe-plugin definitely depends on the plugins to be build first.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] slawekjaranowski commented on a change in pull request #479: test hacking depedencies and build plan to be able to use -T3 or mvnd

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on a change in pull request #479:
URL: https://github.com/apache/maven-surefire/pull/479#discussion_r817394759



##########
File path: surefire-its/pom.xml
##########
@@ -241,6 +262,27 @@
                             </execution>
                         </executions>
                     </plugin>
+                  <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-invoker-plugin</artifactId>
+                    <configuration>
+                      <localRepositoryPath>${settings.localRepository}</localRepositoryPath>
+                      <extraArtifacts>
+                        <extraArtifact>org.apache.maven.plugins:maven-surefire-report-plugin:${project.version}</extraArtifact>
+                        <extraArtifact>org.apache.maven.plugins:maven-surefire-plugin:${project.version}</extraArtifact>
+                        <extraArtifact>org.apache.maven.plugins:maven-failsafe-plugin:${project.version}</extraArtifact>
+                      </extraArtifacts>

Review comment:
       invoker:install also install all project dependencies with transitive with scope compile + runtime to local-repo, 
   so we can skip extraArtifacts if change scope to runtime of those




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] olamy commented on pull request #479: test hacking depedencies and build plan to be able to use -T3 or mvnd

Posted by GitBox <gi...@apache.org>.
olamy commented on pull request #479:
URL: https://github.com/apache/maven-surefire/pull/479#issuecomment-1079781861


   > From other side we don't have many boost by building project modules by many thread, at the end we land in `surefire-its` which consumes all time.
   > 
   > I thinking to use Verifier in embedded mode for it tests like in Maven core its.
   
   agree but it's still something to fix as currently you could run its without running the rest of dependencies first.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] slawekjaranowski commented on a change in pull request #479: test hacking depedencies and build plan to be able to use -T3 or mvnd

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on a change in pull request #479:
URL: https://github.com/apache/maven-surefire/pull/479#discussion_r835776475



##########
File path: surefire-its/pom.xml
##########
@@ -78,6 +78,57 @@
             <artifactId>commons-lang3</artifactId>
             <scope>test</scope>
         </dependency>
+        <!-- those dependencies are here to fake the build plan calculation
+        and being able to use -Txx or mvnd and have a faster multithread build
+        -->
+        <dependency>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>${project.version}</version>
+          <scope>compile</scope>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-failsafe-plugin</artifactId>
+          <version>${project.version}</version>
+          <scope>compile</scope>
+        </dependency>
+      <dependency>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <version>${project.version}</version>
+        <scope>compile</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.surefire</groupId>
+        <artifactId>surefire-junit-platform</artifactId>
+        <version>${project.version}</version>
+        <scope>compile</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.surefire</groupId>
+        <artifactId>surefire-junit48</artifactId>
+        <version>${project.version}</version>
+        <scope>compile</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.surefire</groupId>
+        <artifactId>suerfire-junit4</artifactId>

Review comment:
       Misspell - there is: `surefire-junit4` 

##########
File path: surefire-its/pom.xml
##########
@@ -78,6 +78,57 @@
             <artifactId>commons-lang3</artifactId>
             <scope>test</scope>
         </dependency>
+        <!-- those dependencies are here to fake the build plan calculation
+        and being able to use -Txx or mvnd and have a faster multithread build
+        -->
+        <dependency>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>${project.version}</version>
+          <scope>compile</scope>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-failsafe-plugin</artifactId>
+          <version>${project.version}</version>
+          <scope>compile</scope>
+        </dependency>
+      <dependency>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <version>${project.version}</version>
+        <scope>compile</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.surefire</groupId>
+        <artifactId>surefire-junit-platform</artifactId>
+        <version>${project.version}</version>
+        <scope>compile</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.surefire</groupId>
+        <artifactId>surefire-junit48</artifactId>

Review comment:
       There is no such artifact in project.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org