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

sor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-jlink-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 31f1610  [MJLINK-9] Add test for multi-module reactor project (#11)
31f1610 is described below

commit 31f1610b87728664437d24bfa8db01023be2d316
Author: Benjamin Marwell <bmarw...@gmail.com>
AuthorDate: Sat Oct 31 14:14:07 2020 +0100

    [MJLINK-9] Add test for multi-module reactor project (#11)
    
    Main/parent pomIncludes refined for reactor modules (as already present)
---
 pom.xml                                            |  4 +-
 src/it/projects/MJLINK-9_reactor/api/pom.xml       | 42 ++++++++++++
 .../java/com/reactor/project/api/Currency.java     | 46 +++++++++++++
 .../main/java/com/reactor/project/api/Money.java   | 56 ++++++++++++++++
 .../api/src/main/java/module-info.java             | 23 +++++++
 src/it/projects/MJLINK-9_reactor/app/pom.xml       | 76 ++++++++++++++++++++++
 .../src/main/java/com/reactor/project/app/App.java | 36 ++++++++++
 .../app/src/main/java/module-info.java             | 25 +++++++
 .../projects/MJLINK-9_reactor/invoker.properties   | 18 +++++
 src/it/projects/MJLINK-9_reactor/pom.xml           | 70 ++++++++++++++++++++
 src/it/projects/MJLINK-9_reactor/verify.groovy     | 35 ++++++++++
 11 files changed, 428 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 2714d01..b4e3053 100644
--- a/pom.xml
+++ b/pom.xml
@@ -250,10 +250,8 @@
               
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
               <projectsDirectory>src/it/projects</projectsDirectory>
               <pomIncludes>
-                <pomInclude>**/pom.xml</pomInclude>
-                <!--
+                <pomInclude>*/pom.xml</pomInclude>
                 <pomInclude>cli-options/**/pom.xml</pomInclude>
-                -->
               </pomIncludes>
               <pomExcludes>
                 <!--
diff --git a/src/it/projects/MJLINK-9_reactor/api/pom.xml 
b/src/it/projects/MJLINK-9_reactor/api/pom.xml
new file mode 100644
index 0000000..ddbf8f9
--- /dev/null
+++ b/src/it/projects/MJLINK-9_reactor/api/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<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>
+
+  <parent>
+    <groupId>org.apache.maven.plugins</groupId>
+    <artifactId>maven-jlink-plugin-mjlink-9</artifactId>
+    <version>96.0</version>
+    <relativePath>../pom.xml</relativePath>
+  </parent>
+
+
+  <artifactId>maven-jlink-plugin-mjlink-9-api</artifactId>
+
+  <packaging>jar</packaging>
+  <name>mjlink-9-api</name>
+  <url>https://maven.apache.org</url>
+
+  <description>mjlink-9-api</description>
+
+</project>
diff --git 
a/src/it/projects/MJLINK-9_reactor/api/src/main/java/com/reactor/project/api/Currency.java
 
b/src/it/projects/MJLINK-9_reactor/api/src/main/java/com/reactor/project/api/Currency.java
new file mode 100644
index 0000000..c1e651a
--- /dev/null
+++ 
b/src/it/projects/MJLINK-9_reactor/api/src/main/java/com/reactor/project/api/Currency.java
@@ -0,0 +1,46 @@
+/*
+ * 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 com.reactor.project.api;
+
+import java.util.StringJoiner;
+
+public class Currency
+{
+
+  String value;
+
+  public Currency ( String value )
+  {
+    this.value = value;
+  }
+
+  public String getValue ()
+  {
+    return this.value;
+  }
+
+  @Override
+  public String toString ()
+  {
+    return new StringJoiner(", ", Currency.class.getSimpleName() + "[", "]")
+        .add("value='" + value + "'")
+        .toString();
+  }
+}
diff --git 
a/src/it/projects/MJLINK-9_reactor/api/src/main/java/com/reactor/project/api/Money.java
 
b/src/it/projects/MJLINK-9_reactor/api/src/main/java/com/reactor/project/api/Money.java
new file mode 100644
index 0000000..efcb4cb
--- /dev/null
+++ 
b/src/it/projects/MJLINK-9_reactor/api/src/main/java/com/reactor/project/api/Money.java
@@ -0,0 +1,56 @@
+/*
+ * 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 com.reactor.project.api;
+
+import java.math.BigDecimal;
+import java.util.StringJoiner;
+
+public class Money
+{
+
+  private final Currency currency;
+
+  private final BigDecimal amount;
+
+  public Money ( Currency currency, BigDecimal amount )
+  {
+    this.currency = currency;
+    this.amount = amount;
+  }
+
+  public Currency getCurrencyType ()
+  {
+    return currency;
+  }
+
+  public BigDecimal getAmount ()
+  {
+    return amount;
+  }
+
+  @Override
+  public String toString ()
+  {
+    return new StringJoiner(", ", Money.class.getSimpleName() + "[", "]")
+        .add("currency=" + currency)
+        .add("amount=" + amount)
+        .toString();
+  }
+}
diff --git 
a/src/it/projects/MJLINK-9_reactor/api/src/main/java/module-info.java 
b/src/it/projects/MJLINK-9_reactor/api/src/main/java/module-info.java
new file mode 100644
index 0000000..545f384
--- /dev/null
+++ b/src/it/projects/MJLINK-9_reactor/api/src/main/java/module-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+module com.reactor.project.api {
+  requires java.base;
+  exports com.reactor.project.api;
+}
diff --git a/src/it/projects/MJLINK-9_reactor/app/pom.xml 
b/src/it/projects/MJLINK-9_reactor/app/pom.xml
new file mode 100644
index 0000000..fedba21
--- /dev/null
+++ b/src/it/projects/MJLINK-9_reactor/app/pom.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<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>
+
+  <parent>
+    <groupId>org.apache.maven.plugins</groupId>
+    <artifactId>maven-jlink-plugin-mjlink-9</artifactId>
+    <version>96.0</version>
+    <relativePath>../pom.xml</relativePath>
+  </parent>
+
+  <artifactId>maven-jlink-plugin-mjlink-9-app</artifactId>
+  <packaging>jar</packaging>
+  <name>mjlink-9-app</name>
+  <url>https://maven.apache.org</url>
+
+  <description>mjlink-9-app</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-jlink-plugin-mjlink-9-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <classifier>orig</classifier>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jlink-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>create-bundle</id>
+            <goals>
+              <goal>jlink</goal>
+            </goals>
+            <phase>package</phase>
+            <configuration>
+              
<launcher>reactorapp=com.reactor.project.app/com.reactor.project.app.App</launcher>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git 
a/src/it/projects/MJLINK-9_reactor/app/src/main/java/com/reactor/project/app/App.java
 
b/src/it/projects/MJLINK-9_reactor/app/src/main/java/com/reactor/project/app/App.java
new file mode 100644
index 0000000..2c597a3
--- /dev/null
+++ 
b/src/it/projects/MJLINK-9_reactor/app/src/main/java/com/reactor/project/app/App.java
@@ -0,0 +1,36 @@
+/*
+ * 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 com.reactor.project.app;
+
+import com.reactor.project.api.Currency;
+import com.reactor.project.api.Money;
+
+import java.math.BigDecimal;
+
+public class App
+{
+
+  public static void main ( String[] args )
+  {
+    Money money = new Money(new Currency("Euro"), BigDecimal.ZERO);
+
+    System.out.println("Money: [" + money + "]");
+  }
+}
diff --git 
a/src/it/projects/MJLINK-9_reactor/app/src/main/java/module-info.java 
b/src/it/projects/MJLINK-9_reactor/app/src/main/java/module-info.java
new file mode 100644
index 0000000..fcb32b1
--- /dev/null
+++ b/src/it/projects/MJLINK-9_reactor/app/src/main/java/module-info.java
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+
+module com.reactor.project.app {
+  requires java.base;
+  requires com.reactor.project.api;
+
+  exports com.reactor.project.app;
+}
diff --git a/src/it/projects/MJLINK-9_reactor/invoker.properties 
b/src/it/projects/MJLINK-9_reactor/invoker.properties
new file mode 100644
index 0000000..8948d9b
--- /dev/null
+++ b/src/it/projects/MJLINK-9_reactor/invoker.properties
@@ -0,0 +1,18 @@
+# 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.
+invoker.java.version = 1.9+
+invoker.goals = clean package
diff --git a/src/it/projects/MJLINK-9_reactor/pom.xml 
b/src/it/projects/MJLINK-9_reactor/pom.xml
new file mode 100644
index 0000000..97e2921
--- /dev/null
+++ b/src/it/projects/MJLINK-9_reactor/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<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>org.apache.maven.plugins</groupId>
+  <artifactId>maven-jlink-plugin-mjlink-9</artifactId>
+  <version>96.0</version>
+  <packaging>pom</packaging>
+  <name>Maven</name>
+  <url>https://maven.apache.org</url>
+
+  <description>Test JLink create a image from a reactor project.</description>
+
+  <properties>
+    <maven.compiler.release>9</maven.compiler.release>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <modules>
+    <module>api</module>
+    <module>app</module>
+  </modules>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.8.0</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jlink-plugin</artifactId>
+          <version>@project.version@</version>
+          <extensions>true</extensions>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <release>9</release>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/src/it/projects/MJLINK-9_reactor/verify.groovy 
b/src/it/projects/MJLINK-9_reactor/verify.groovy
new file mode 100644
index 0000000..a2e0c8e
--- /dev/null
+++ b/src/it/projects/MJLINK-9_reactor/verify.groovy
@@ -0,0 +1,35 @@
+
+/*
+ * 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.
+ */
+
+import java.io.*
+import java.util.*
+import java.util.jar.*
+import org.codehaus.plexus.util.*
+
+File target = new File( basedir, "app/target" );
+assert target.isDirectory()
+
+File jarArtifact = new File( target, 
"maven-jlink-plugin-mjlink-9-app-96.0-orig.jar" );
+assert jarArtifact.isFile()
+
+File artifact = new File( target, "maven-jlink-plugin-mjlink-9-app-96.0.zip" );
+assert artifact.isFile()
+
+// optional: check if it contains a launcher script

Reply via email to