You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by cs...@apache.org on 2024/12/05 16:03:24 UTC

(maven) branch master updated: IT: Streamline ITs more (#1952)

This is an automated email from the ASF dual-hosted git repository.

cstamas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/master by this push:
     new 01e47259d2 IT: Streamline ITs more (#1952)
01e47259d2 is described below

commit 01e47259d28133fff1093b35254ea11fae917f55
Author: Tamas Cservenak <ta...@cservenak.net>
AuthorDate: Thu Dec 5 17:03:20 2024 +0100

    IT: Streamline ITs more (#1952)
    
    Changes:
    * remove unneeded POM cruft
    * remove embedded profile (is default) introduce forked profile
    * CI: drop "embedded" profile use
---
 .github/workflows/maven.yml                 |  2 +-
 its/core-it-suite/pom.xml                   | 29 +++++++----------------------
 its/core-it-support/maven-it-helper/pom.xml |  3 +--
 pom.xml                                     | 28 ----------------------------
 4 files changed, 9 insertions(+), 53 deletions(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 1dfc8e98b3..f00bc6f0c1 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -202,7 +202,7 @@ jobs:
       # Now run tests and ITs using a separate local repo (using the previous filled repo as tail)
       - name: Run integration tests
         shell: bash
-        run: mvn install -e -B -V -Prun-its,embedded -Dmaven.repo.local=$HOME/.m2/repository/local -Dmaven.repo.local.tail=$HOME/.m2/repository/cached
+        run: mvn install -e -B -V -Prun-its -Dmaven.repo.local=$HOME/.m2/repository/local -Dmaven.repo.local.tail=$HOME/.m2/repository/cached
 
       - name: Upload test artifacts
         uses: actions/upload-artifact@v4
diff --git a/its/core-it-suite/pom.xml b/its/core-it-suite/pom.xml
index da0e46e561..87c8a91f5f 100644
--- a/its/core-it-suite/pom.xml
+++ b/its/core-it-suite/pom.xml
@@ -50,7 +50,7 @@ under the License.
 
     mvn clean test -Prun-its -DmavenDistro=<path-to-bin-archive>
 
-  To run the ITs using embedded Maven 3.x, additionally activate the profile "embedded".
+  To run all the ITs using forked Maven, additionally activate the profile "forked".
 
   ITs that don't require to fork Maven can also be run from the IDE using the Maven projects from the workspace if the
   Maven dependencies are added to the test class path.
@@ -62,7 +62,6 @@ under the License.
   -->
 
   <properties>
-    <surefireMemory>-Xmx384m</surefireMemory>
     <!-- The original Maven distribution to test. -->
     <mavenHome>${maven.home}</mavenHome>
     <!-- The (possibly instrumented copy of the) Maven distribution we actually
@@ -512,9 +511,11 @@ under the License.
           </includes>
           <!-- test annotated by @Tag("disabled") will be skipped from executions -->
           <excludedGroups>disabled</excludedGroups>
-          <forkCount>0</forkCount>
-          <reuseForks>true</reuseForks>
           <skip>true</skip>
+          <forkCount>1</forkCount>
+          <reuseForks>true</reuseForks>
+          <!-- NOTE: Maven plugins have access to the system class path, keep it clean -->
+          <useSystemClassLoader>false</useSystemClassLoader>
           <promoteUserPropertiesToSystemProperties>false</promoteUserPropertiesToSystemProperties>
           <systemPropertyVariables>
             <maven.test.tmpdir>${project.build.testOutputDirectory}</maven.test.tmpdir>
@@ -639,31 +640,15 @@ under the License.
       </build>
     </profile>
     <profile>
-      <id>jdk-properties</id>
-      <activation>
-        <jdk>(,1.8)</jdk>
-      </activation>
-      <properties>
-        <surefireMemory>-Xmx384m -XX:MaxPermSize=192m</surefireMemory>
-      </properties>
-    </profile>
-    <profile>
-      <id>embedded</id>
+      <id>forked</id>
       <build>
         <plugins>
           <plugin>
             <artifactId>maven-surefire-plugin</artifactId>
             <configuration>
               <skip>false</skip>
-              <forkCount>1</forkCount>
-              <reuseForks>true</reuseForks>
-              <argLine>${surefireMemory}
-                -Dcom.sun.management.jmxremote=true</argLine>
-              <!-- NOTE: Maven plugins have access to the system class path
-                so keep it clean -->
-              <useSystemClassLoader>false</useSystemClassLoader>
               <systemPropertyVariables>
-                <verifier.forkMode>auto</verifier.forkMode>
+                <verifier.forkMode>forked</verifier.forkMode>
               </systemPropertyVariables>
             </configuration>
           </plugin>
diff --git a/its/core-it-support/maven-it-helper/pom.xml b/its/core-it-support/maven-it-helper/pom.xml
index b3a16bd132..eb11a34c38 100644
--- a/its/core-it-support/maven-it-helper/pom.xml
+++ b/its/core-it-support/maven-it-helper/pom.xml
@@ -34,8 +34,7 @@ under the License.
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-executor</artifactId>
-      <!-- TODO: hack -->
-      <version>4.0.0-rc-2-SNAPSHOT</version>
+      <version>${maven-version}</version>
     </dependency>
 
     <!-- needed for VersionRange and Version -->
diff --git a/pom.xml b/pom.xml
index a8d7205dc9..aff5740daa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1008,39 +1008,11 @@ under the License.</licenseText>
         </plugins>
       </reporting>
     </profile>
-    <profile>
-      <id>maven-repo-local</id>
-      <activation>
-        <property>
-          <name>maven.repo.local</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <configuration>
-              <systemPropertyVariables combine.children="append">
-                <property>
-                  <!-- Pass this through to the tests (if set!) to have them pick the right repository -->
-                  <name>maven.repo.local</name>
-                  <value>${maven.repo.local}</value>
-                </property>
-              </systemPropertyVariables>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
     <profile>
       <id>run-its</id>
       <modules>
         <module>its</module>
       </modules>
-      <properties>
-        <mavenDistro>${session.rootDirectory}/apache-maven/target/apache-maven-${project.version}-bin.zip</mavenDistro>
-      </properties>
     </profile>
   </profiles>
 </project>