This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
The following commit(s) were added to refs/heads/master by this push:
new e881b18b7 [MNG-8123] IT for build cache extension (#342)
e881b18b7 is described below
commit e881b18b7fa9b808019825922d52ce534523cda0
Author: Guillaume Nodet <[email protected]>
AuthorDate: Wed May 22 15:45:02 2024 +0200
[MNG-8123] IT for build cache extension (#342)
---
.../maven/it/MavenITmng8123BuildCacheTest.java | 41 +++++++++++++++++
.../org/apache/maven/it/TestSuiteOrdering.java | 1 +
.../src/test/resources-filtered/bootstrap.txt | 1 +
.../mng-8123-build-cache/.mvn/extensions.xml | 8 ++++
.../test/resources/mng-8123-build-cache/pom.xml | 52 ++++++++++++++++++++++
.../src/main/java/groupId/App.java | 29 ++++++++++++
6 files changed, 132 insertions(+)
diff --git
a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8123BuildCacheTest.java
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8123BuildCacheTest.java
new file mode 100644
index 000000000..dcbaefe54
--- /dev/null
+++
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8123BuildCacheTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.it;
+
+import java.io.File;
+
+import org.apache.maven.shared.verifier.Verifier;
+import org.apache.maven.shared.verifier.util.ResourceExtractor;
+import org.junit.jupiter.api.Test;
+
+public class MavenITmng8123BuildCacheTest extends
AbstractMavenIntegrationTestCase {
+ public MavenITmng8123BuildCacheTest() {
+ super("[3,)");
+ }
+
+ @Test
+ public void testBuildCacheExtension() throws Exception {
+ File testDir = ResourceExtractor.simpleExtractResources(getClass(),
"/mng-8123-build-cache");
+
+ Verifier verifier = newVerifier(testDir.getAbsolutePath());
+ verifier.addCliArgument("install");
+ verifier.execute();
+ verifier.verifyErrorFreeLog();
+ }
+}
diff --git
a/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java
b/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java
index e9523499c..45e97d647 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java
@@ -120,6 +120,7 @@ public class TestSuiteOrdering implements ClassOrderer {
* the tests are to finishing. Newer tests are also more likely to
fail, so this is
* a fail fast technique as well.
*/
+ suite.addTestSuite(MavenITmng8123BuildCacheTest.class);
suite.addTestSuite(MavenITmng8106OverlappingDirectoryRolesTest.class);
suite.addTestSuite(MavenITmng8005IdeWorkspaceReaderUsedTest.class);
suite.addTestSuite(MavenITmng7967ArtifactHandlerLanguageTest.class);
diff --git a/core-it-suite/src/test/resources-filtered/bootstrap.txt
b/core-it-suite/src/test/resources-filtered/bootstrap.txt
index cc445a699..164e5c942 100644
--- a/core-it-suite/src/test/resources-filtered/bootstrap.txt
+++ b/core-it-suite/src/test/resources-filtered/bootstrap.txt
@@ -22,6 +22,7 @@ org.apache.groovy:groovy:4.0.15
org.apache.maven:maven-api-spi:4.0.0-alpha-8
org.apache.maven:maven-api-model:mdo:4.0.0-alpha-8
org.apache.maven.extensions:maven-extensions:pom:41
+org.apache.maven.extensions:maven-build-cache-extension:1.2.0
org.apache.maven.its.plugins.class-loader:dep-c:${project.version}
org.apache.maven.its.plugins:maven-it-plugin-active-collection:${project.version}
org.apache.maven.its.plugins:maven-it-plugin-all:${project.version}
diff --git
a/core-it-suite/src/test/resources/mng-8123-build-cache/.mvn/extensions.xml
b/core-it-suite/src/test/resources/mng-8123-build-cache/.mvn/extensions.xml
new file mode 100644
index 000000000..97a342cde
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-8123-build-cache/.mvn/extensions.xml
@@ -0,0 +1,8 @@
+<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0">
+ <extension>
+ <groupId>org.apache.maven.extensions</groupId>
+ <artifactId>maven-build-cache-extension</artifactId>
+ <version>1.2.0</version>
+ </extension>
+</extensions>
+
diff --git a/core-it-suite/src/test/resources/mng-8123-build-cache/pom.xml
b/core-it-suite/src/test/resources/mng-8123-build-cache/pom.xml
new file mode 100644
index 000000000..f0654fd39
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-8123-build-cache/pom.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>groupId</groupId>
+ <artifactId>artifactId</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <name>artifactId</name>
+ <!-- FIXME change it to the project's website -->
+ <url>http://www.example.com</url>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <maven.compiler.source>1.8</maven.compiler.source>
+ <maven.compiler.target>1.8</maven.compiler.target>
+ </properties>
+
+ <build>
+ <pluginManagement>
+ <!-- lock down plugins versions to avoid using Maven defaults (may be
moved to parent pom) -->
+ <plugins>
+ <!-- clean lifecycle, see
https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle
-->
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>3.3.2</version>
+ </plugin>
+ <!-- default lifecycle, jar packaging: see
https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging
-->
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.3.0</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.10.1</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.3.0</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>3.0.1</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>3.0.0</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
diff --git
a/core-it-suite/src/test/resources/mng-8123-build-cache/src/main/java/groupId/App.java
b/core-it-suite/src/test/resources/mng-8123-build-cache/src/main/java/groupId/App.java
new file mode 100644
index 000000000..824b85577
--- /dev/null
+++
b/core-it-suite/src/test/resources/mng-8123-build-cache/src/main/java/groupId/App.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package groupId;
+
+/**
+ * Hello world!
+ *
+ */
+public class App {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
+ }
+}