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

sjaranowski pushed a commit to branch install-optional
in repository https://gitbox.apache.org/repos/asf/maven-invoker-plugin.git

commit fdcb7dab4279d5e5756db11bbcf1d1cfaea76b7f
Author: Slawomir Jaranowski <[email protected]>
AuthorDate: Tue Mar 7 23:29:36 2023 +0100

    Add optional dependency for install ITs
---
 src/it/staging-dependencies/pom.xml                |  6 +++++
 src/it/staging-dependencies/verify.bsh             |  5 +++-
 src/it/staging-reactor/mod1/pom.xml                |  8 +++++-
 src/it/staging-reactor/{ => mod3}/pom.xml          | 29 ++++++++++++++--------
 .../mod3/src/main/resources/main.properties        | 17 +++++++++++++
 src/it/staging-reactor/pom.xml                     |  1 +
 src/it/staging-reactor/verify.bsh                  |  3 +++
 7 files changed, 56 insertions(+), 13 deletions(-)

diff --git a/src/it/staging-dependencies/pom.xml 
b/src/it/staging-dependencies/pom.xml
index 31cca75..72e92ce 100644
--- a/src/it/staging-dependencies/pom.xml
+++ b/src/it/staging-dependencies/pom.xml
@@ -68,6 +68,12 @@ under the License.
       <version>1.7.36</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <version>1.7.36</version>
+      <optional>true</optional>
+    </dependency>
   </dependencies>
 
   <repositories>
diff --git a/src/it/staging-dependencies/verify.bsh 
b/src/it/staging-dependencies/verify.bsh
index 7e43c8b..5a1fb4b 100644
--- a/src/it/staging-dependencies/verify.bsh
+++ b/src/it/staging-dependencies/verify.bsh
@@ -57,7 +57,10 @@ try
             "org/apache/maven/its/dep/2.0/dep-2.0.jar",
             "org/apache/maven/its/dep/maven-metadata-local.xml",
             
"test/staging-dependencies/1.0-SNAPSHOT/staging-dependencies-1.0-SNAPSHOT.jar",
-            
"test/staging-dependencies/1.0-SNAPSHOT/staging-dependencies-1.0-SNAPSHOT.pom"
+            
"test/staging-dependencies/1.0-SNAPSHOT/staging-dependencies-1.0-SNAPSHOT.pom",
+            "org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.pom",
+            "org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar",
+            "org/slf4j/slf4j-parent/1.7.36/slf4j-parent-1.7.36.pom"
       };
     for ( String file : files )
     {
diff --git a/src/it/staging-reactor/mod1/pom.xml 
b/src/it/staging-reactor/mod1/pom.xml
index fad9dc4..e1cb6a6 100644
--- a/src/it/staging-reactor/mod1/pom.xml
+++ b/src/it/staging-reactor/mod1/pom.xml
@@ -29,7 +29,7 @@ under the License.
     <relativePath>../mod1-parent</relativePath>
   </parent>
 
-    <artifactId>mod1</artifactId>
+  <artifactId>mod1</artifactId>
   <version>1.0-SNAPSHOT</version>
   <packaging>jar</packaging>
 
@@ -47,6 +47,12 @@ under the License.
       <artifactId>mod2</artifactId>
       <version>1.0-SNAPSHOT</version>
     </dependency>
+    <dependency>
+      <groupId>test</groupId>
+      <artifactId>mod3</artifactId>
+      <version>1.0-SNAPSHOT</version>
+      <optional>true</optional>
+    </dependency>
   </dependencies>
 
   <build>
diff --git a/src/it/staging-reactor/pom.xml 
b/src/it/staging-reactor/mod3/pom.xml
similarity index 74%
copy from src/it/staging-reactor/pom.xml
copy to src/it/staging-reactor/mod3/pom.xml
index ae0a279..13f90a1 100644
--- a/src/it/staging-reactor/pom.xml
+++ b/src/it/staging-reactor/mod3/pom.xml
@@ -22,20 +22,20 @@ under the License.
 <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/maven-v4_0_0.xsd";>
   <modelVersion>4.0.0</modelVersion>
 
-  <groupId>test</groupId>
-  <artifactId>mod2-parent</artifactId>
+  <parent>
+    <groupId>test</groupId>
+    <artifactId>mod2-parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>mod3</artifactId>
   <version>1.0-SNAPSHOT</version>
-  <packaging>pom</packaging>
+  <packaging>jar</packaging>
 
   <description>
     Test to check for proper staging during a multi module build, i.e. 
artifacts from the reactor need to be considered.
   </description>
 
-  <modules>
-    <module>mod1</module>
-    <module>mod2</module>
-  </modules>
-
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
   </properties>
@@ -43,9 +43,16 @@ under the License.
   <build>
     <plugins>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-site-plugin</artifactId>
-        <version>@sitePluginVersion@</version>
+        <artifactId>maven-source-plugin</artifactId>
+        <version>@sourcePluginVersion@</version>
+        <executions>
+          <execution>
+            <id>attach-resources</id>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
       </plugin>
     </plugins>
   </build>
diff --git a/src/it/staging-reactor/mod3/src/main/resources/main.properties 
b/src/it/staging-reactor/mod3/src/main/resources/main.properties
new file mode 100644
index 0000000..00ae6c0
--- /dev/null
+++ b/src/it/staging-reactor/mod3/src/main/resources/main.properties
@@ -0,0 +1,17 @@
+# 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.
+
diff --git a/src/it/staging-reactor/pom.xml b/src/it/staging-reactor/pom.xml
index ae0a279..62ae2f3 100644
--- a/src/it/staging-reactor/pom.xml
+++ b/src/it/staging-reactor/pom.xml
@@ -34,6 +34,7 @@ under the License.
   <modules>
     <module>mod1</module>
     <module>mod2</module>
+    <module>mod3</module>
   </modules>
 
   <properties>
diff --git a/src/it/staging-reactor/verify.bsh 
b/src/it/staging-reactor/verify.bsh
index 9a684fc..bc88213 100644
--- a/src/it/staging-reactor/verify.bsh
+++ b/src/it/staging-reactor/verify.bsh
@@ -44,6 +44,9 @@ try
             "test/mod2/1.0-SNAPSHOT/maven-metadata-local.xml",
             "test/mod2/1.0-SNAPSHOT/mod2-1.0-SNAPSHOT.pom",
             "test/mod2/1.0-SNAPSHOT/mod2-1.0-SNAPSHOT.jar",
+            "test/mod3/1.0-SNAPSHOT/maven-metadata-local.xml",
+            "test/mod3/1.0-SNAPSHOT/mod3-1.0-SNAPSHOT.pom",
+            "test/mod3/1.0-SNAPSHOT/mod3-1.0-SNAPSHOT.jar",
             "test/mod2-parent/maven-metadata-local.xml",
             "test/mod2-parent/1.0-SNAPSHOT/maven-metadata-local.xml",
             "test/mod2-parent/1.0-SNAPSHOT/mod2-parent-1.0-SNAPSHOT.pom",

Reply via email to