You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2021/02/18 07:50:46 UTC

[GitHub] [james-project] chibenwa edited a comment on pull request #298: JAMES-3500 Do not run previous stages upon tests

chibenwa edited a comment on pull request #298:
URL: https://github.com/apache/james-project/pull/298#issuecomment-781128816


   I have been experimenting a bit:
   
   ```
       <profiles>
           <profile>
               <id>ci-test</id>
               <build>
                   <plugins>
                       <plugin>
                           <groupId>com.github.ekryd.sortpom</groupId>
                           <artifactId>sortpom-maven-plugin</artifactId>
                           <configuration>
                               <skip>true</skip>
                           </configuration>
                       </plugin>
                       <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-enforcer-plugin</artifactId>
                           <configuration>
                               <skip>true</skip>
                           </configuration>
                       </plugin>
                       <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-jar-plugin</artifactId>
                           <configuration>
                               <skip>true</skip>
                           </configuration>
                       </plugin>
                       <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-source-plugin</artifactId>
                           <configuration>
                               <skip>true</skip>
                           </configuration>
                       </plugin>
                       <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-checkstyle-plugin</artifactId>
                           <configuration>
                               <skip>true</skip>
                           </configuration>
                       </plugin>
                       <plugin>
                           <groupId>pl.project13.maven</groupId>
                           <artifactId>git-commit-id-plugin</artifactId>
                           <configuration>
                               <skip>true</skip>
                           </configuration>
                       </plugin>
                       <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-project-info-reports-plugin</artifactId>
                           <configuration>
                               <skip>true</skip>
                           </configuration>
                       </plugin>
                       <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-remote-resources-plugin</artifactId>
                           <configuration>
                               <skip>true</skip>
                           </configuration>
                       </plugin>
                       <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-resources-plugin</artifactId>
                           <configuration>
                               <skip>true</skip>
                           </configuration>
                       </plugin>
                   </plugins>
               </build>
           </profile>
       </profiles>
   ```
     
     Then...
     
   ```
   benwa@horizon ..ents/apache/james-project/testing/base (git)-[JAMES-3410-delete-sharing-fix] % mvn test -P ci-test
   OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
   [INFO] Scanning for projects...
   [INFO] 
   [INFO] -------------------< org.apache.james:testing-base >--------------------
   [INFO] Building Apache James :: Testing :: Base 3.6.0-SNAPSHOT
   [INFO] --------------------------------[ jar ]---------------------------------
   [INFO] 
   [INFO] --- sortpom-maven-plugin:2.12.0:verify (strict-pom-ordering) @ testing-base ---
   [INFO] Skipping Sortpom
   [INFO] 
   [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) @ testing-base ---
   [INFO] Skipping Rule Enforcement.
   [INFO] 
   [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ testing-base ---
   [INFO] Skipping Rule Enforcement.
   [INFO] 
   [INFO] --- git-commit-id-plugin:3.0.1:revision (get-the-git-infos) @ testing-base ---
   [INFO] 
   [INFO] --- maven-remote-resources-plugin:1.6.0:process (process-resource-bundles) @ testing-base ---
   [INFO] Skipping remote resources execution.
   [INFO] 
   [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ testing-base ---
   [INFO] Skipping the execution.
   [INFO] 
   [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ testing-base ---
   [INFO] Nothing to compile - all classes are up to date
   [INFO] 
   [INFO] --- maven-checkstyle-plugin:3.1.0:check (default) @ testing-base ---
   [INFO] 
   [INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ testing-base ---
   [INFO] Not copying test resources
   [INFO] 
   [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ testing-base ---
   [INFO] No sources to compile
   [INFO] 
   [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ testing-base ---
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  2.299 s
   [INFO] Finished at: 2021-02-18T14:45:16+07:00
   [INFO] ------------------------------------------------------------------------
   mvn test -P ci-test  13,62s user 0,54s system 391% cpu 3,619 total
   ```
   
   Compared to the default:
   
   ```
   % mvn test           
   OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
   [INFO] Scanning for projects...
   [INFO] 
   [INFO] -------------------< org.apache.james:testing-base >--------------------
   [INFO] Building Apache James :: Testing :: Base 3.6.0-SNAPSHOT
   [INFO] --------------------------------[ jar ]---------------------------------
   [INFO] 
   [INFO] --- sortpom-maven-plugin:2.12.0:verify (strict-pom-ordering) @ testing-base ---
   [INFO] Verifying file /home/benwa/Documents/apache/james-project/testing/base/pom.xml
   [INFO] 
   [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) @ testing-base ---
   [INFO] 
   [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ testing-base ---
   [INFO] 
   [INFO] --- git-commit-id-plugin:3.0.1:revision (get-the-git-infos) @ testing-base ---
   [INFO] 
   [INFO] --- maven-remote-resources-plugin:1.6.0:process (process-resource-bundles) @ testing-base ---
   [INFO] Preparing remote bundle org.apache:apache-jar-resource-bundle:1.4
   [INFO] Copying 3 resources from 1 bundle.
   [INFO] 
   [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ testing-base ---
   [INFO] Using 'UTF-8' encoding to copy filtered resources.
   [INFO] Copying 2 resources
   [INFO] Copying 3 resources
   [INFO] 
   [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ testing-base ---
   [INFO] Nothing to compile - all classes are up to date
   [INFO] 
   [INFO] --- maven-checkstyle-plugin:3.1.0:check (default) @ testing-base ---
   [INFO] 
   [INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ testing-base ---
   [INFO] Using 'UTF-8' encoding to copy filtered resources.
   [INFO] skip non existing resourceDirectory /home/benwa/Documents/apache/james-project/testing/base/src/test/resources
   [INFO] Copying 3 resources
   [INFO] 
   [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ testing-base ---
   [INFO] No sources to compile
   [INFO] 
   [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ testing-base ---
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  3.371 s
   [INFO] Finished at: 2021-02-18T14:48:14+07:00
   [INFO] ------------------------------------------------------------------------
   mvn test  16,92s user 0,56s system 390% cpu 4,480 total
   ```
   
   And to the above proposal:
   
   ```
   % mvn surefire:test  
   OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
   [INFO] Scanning for projects...
   [INFO] 
   [INFO] -------------------< org.apache.james:testing-base >--------------------
   [INFO] Building Apache James :: Testing :: Base 3.6.0-SNAPSHOT
   [INFO] --------------------------------[ jar ]---------------------------------
   [INFO] 
   [INFO] --- maven-surefire-plugin:2.22.2:test (default-cli) @ testing-base ---
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  0.742 s
   [INFO] Finished at: 2021-02-18T14:48:52+07:00
   [INFO] ------------------------------------------------------------------------
   mvn surefire:test  5,80s user 0,22s system 346% cpu 1,741 total
   ```
   
   I do not think we can yield similar build time enhancements with just skipping plugins execution.
   
   Did you had something else in mind?


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org