You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2017/09/07 18:51:23 UTC
svn commit: r1807631 [1/2] - in /maven/plugins/trunk/maven-jmod-plugin: ./
src/it/base-config-cmds/ src/it/base-config-cmds/src/
src/it/base-config-cmds/src/main/ src/it/base-config-cmds/src/main/cmds/
src/it/base-config-cmds/src/main/configs/ src/it/b...
Author: khmarbaise
Date: Thu Sep 7 18:51:21 2017
New Revision: 1807631
URL: http://svn.apache.org/viewvc?rev=1807631&view=rev
Log:
Improved integration test README.md
Added several integration tests for different kind of configurations.
Added:
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/invoker.properties
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/pom.xml
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/cmds/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/cmds/first.sh
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/configs/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/configs/config.test
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/java/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/java/module-info.java
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/java/myproject/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/java/myproject/HelloWorld.java
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/verify.groovy
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/invoker.properties
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/pom.xml
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/cmds/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/cmds/first.sh
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/configs/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/configs/config.test
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/headerfiles/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/headerfiles/first.h
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/java/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/java/module-info.java
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/java/myproject/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/java/myproject/HelloWorld.java
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/verify.groovy
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/invoker.properties
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/pom.xml
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/java/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/java/module-info.java
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/java/myproject/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/java/myproject/HelloWorld.java
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/legalnotices/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/legalnotices/first.md
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/verify.groovy
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/invoker.properties
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/pom.xml
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/java/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/java/module-info.java
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/java/myproject/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/java/myproject/HelloWorld.java
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/libs/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/libs/first.so
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/verify.groovy
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/invoker.properties
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/pom.xml
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/configs/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/configs/config.test
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/java/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/java/module-info.java
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/java/myproject/
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/java/myproject/HelloWorld.java
maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/verify.groovy
maven/plugins/trunk/maven-jmod-plugin/src/it/base-it/verify.groovy
- copied, changed from r1807630, maven/plugins/trunk/maven-jmod-plugin/src/it/base-it/verify.bsh
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/invoker.properties
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/pom.xml
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/another-directory/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/another-directory/non-default-first.sh
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/another-sub-directory/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/another-sub-directory/non-default-sub-first.sh
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/cmds/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/cmds/first.sh
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/java/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/java/module-info.java
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/java/myproject/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/java/myproject/HelloWorld.java
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/verify.groovy
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/invoker.properties
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/pom.xml
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/src/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/src/main/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/src/main/cmds/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/src/main/cmds/first.sh
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/src/main/configs/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/src/main/configs/config.test
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/src/main/headerfiles/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/src/main/headerfiles/first.h
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/src/main/java/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/src/main/java/module-info.java
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/src/main/java/myproject/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/src/main/java/myproject/HelloWorld.java
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/src/main/non-headerfiles/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/src/main/non-headerfiles/non-first.h
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/verify.groovy
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-legalnotices/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-legalnotices/invoker.properties
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-legalnotices/pom.xml
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-legalnotices/src/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-legalnotices/src/main/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-legalnotices/src/main/java/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-legalnotices/src/main/java/module-info.java
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-legalnotices/src/main/java/myproject/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-legalnotices/src/main/java/myproject/HelloWorld.java
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-legalnotices/src/main/legalnotices/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-legalnotices/src/main/legalnotices/first.md
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-legalnotices/src/main/non-legalnotices/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-legalnotices/src/main/non-legalnotices/non-first.md
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-legalnotices/verify.groovy
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-libs/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-libs/invoker.properties
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-libs/pom.xml
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-libs/src/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-libs/src/main/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-libs/src/main/java/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-libs/src/main/java/module-info.java
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-libs/src/main/java/myproject/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-libs/src/main/java/myproject/HelloWorld.java
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-libs/src/main/libs/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-libs/src/main/libs/first.so
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-libs/src/main/non-libs/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-libs/src/main/non-libs/non-first.so
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-libs/verify.groovy
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/invoker.properties
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/pom.xml
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/src/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/src/main/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/src/main/another-directory/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/src/main/another-directory/config.test
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/src/main/another-sub-directory/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/src/main/another-sub-directory/config-sub.test
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/src/main/configs/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/src/main/configs/default-config.test
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/src/main/java/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/src/main/java/module-info.java
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/src/main/java/myproject/
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/src/main/java/myproject/HelloWorld.java
maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config/verify.groovy
Removed:
maven/plugins/trunk/maven-jmod-plugin/src/it/base-it/verify.bsh
Modified:
maven/plugins/trunk/maven-jmod-plugin/README.md
maven/plugins/trunk/maven-jmod-plugin/src/it/base-it/pom.xml
Modified: maven/plugins/trunk/maven-jmod-plugin/README.md
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/README.md?rev=1807631&r1=1807630&r2=1807631&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/README.md (original)
+++ maven/plugins/trunk/maven-jmod-plugin/README.md Thu Sep 7 18:51:21 2017
@@ -1,8 +1,12 @@
# How to run Integration Tests with JDK 9
-If you like to run the integration tests of the Maven JMod Plugin you have to start
-the Maven process like the following:
+If you running your Maven installation with a different JDK than JDK 9 you have give
+the JDK 9 path via the command line:
+
```
mvn clean verify -Prun-its -Dinvoker.javaHome=JDK9JAVAHOME
```
-You have to give the home location for JDK 9 via parameter.
+
+The reason behind this is simply cause Maven JMod Plugin will call `jmod` tool
+of the JDK which is needed to be found. Otherwise none of the
+integration tests can work.
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/invoker.properties?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/invoker.properties (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/invoker.properties Thu Sep 7 18:51:21 2017
@@ -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.
+invoker.goals = clean package
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/pom.xml?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/pom.xml (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/pom.xml Thu Sep 7 18:51:21 2017
@@ -0,0 +1,60 @@
+<?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-jmod-plugin-base-config-cmds</artifactId>
+ <version>99.0</version>
+ <name>Maven</name>
+ <packaging>jmod</packaging>
+ <url>http://maven.apache.org</url>
+ <description>Test jmod file creation with cmds direcotry by using default configuration.</description>
+ <properties>
+ <maven.compiler.source>1.9</maven.compiler.source>
+ <maven.compiler.target>1.9</maven.compiler.target>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.7.0</version>
+ <configuration>
+ <target>1.9</target>
+ <source>1.9</source>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jmod-plugin</artifactId>
+ <version>@project.version@</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/cmds/first.sh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/cmds/first.sh?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/cmds/first.sh (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/cmds/first.sh Thu Sep 7 18:51:21 2017
@@ -0,0 +1 @@
+This first.sh should be located into bin directory into the resulting jmod file.
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/configs/config.test
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/configs/config.test?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/configs/config.test (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/configs/config.test Thu Sep 7 18:51:21 2017
@@ -0,0 +1,2 @@
+Test configuration file which should be located in config/config.test in
+resulting jmod file.
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/java/module-info.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/java/module-info.java?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/java/module-info.java (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/java/module-info.java Thu Sep 7 18:51:21 2017
@@ -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 org.apache.maven.plugins.jmod.it.first {
+ requires java.base;
+ exports myproject;
+}
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/java/myproject/HelloWorld.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/java/myproject/HelloWorld.java?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/java/myproject/HelloWorld.java (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/src/main/java/myproject/HelloWorld.java Thu Sep 7 18:51:21 2017
@@ -0,0 +1,36 @@
+package myproject;
+
+/*
+ * 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.
+ */
+
+/**
+ * The classic Hello World App.
+ */
+public class HelloWorld {
+
+ /**
+ * Main method.
+ *
+ * @param args Not used
+ */
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World from JDK 9" );
+ }
+}
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/verify.groovy?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/verify.groovy (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-cmds/verify.groovy Thu Sep 7 18:51:21 2017
@@ -0,0 +1,87 @@
+
+/*
+ * 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.*;
+
+boolean result = true;
+
+try
+{
+ File target = new File( basedir, "target" );
+ if ( !target.exists() || !target.isDirectory() )
+ {
+ System.err.println( "target file is missing or not a directory." );
+ return false;
+ }
+
+ File artifact = new File( target, "jmods/maven-jmod-plugin-base-config-cmds.jmod" );
+ if ( !artifact.exists() || artifact.isDirectory() )
+ {
+ System.err.println( "target file is missing or a directory." );
+ return false;
+ }
+
+ String[] artifactNames = [
+ "bin/first.sh",
+ "conf/config.test",
+ "classes/module-info.class",
+ "classes/myproject/HelloWorld.class",
+ ]
+
+ Set contents = new HashSet();
+
+ JarFile jar = new JarFile( artifact );
+ Enumeration jarEntries = jar.entries();
+ while ( jarEntries.hasMoreElements() )
+ {
+ JarEntry entry = (JarEntry) jarEntries.nextElement();
+ if ( !entry.isDirectory() )
+ {
+ // Only compare files
+ contents.add( entry.getName() );
+ }
+ }
+
+ if ( artifactNames.length != contents.size() )
+ {
+ System.err.println( "jar content size is different from the expected content size" );
+ return false;
+ }
+ for ( int i = 0; i < artifactNames.length; i++ )
+ {
+ String artifactName = artifactNames[i];
+ if ( !contents.contains( artifactName ) )
+ {
+ System.err.println( "Artifact[" + artifactName + "] not found in jar archive" );
+ return false;
+ }
+ }
+
+}
+catch( Throwable e )
+{
+ e.printStackTrace();
+ result = false;
+}
+
+return result;
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/invoker.properties?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/invoker.properties (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/invoker.properties Thu Sep 7 18:51:21 2017
@@ -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.
+invoker.goals = clean package
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/pom.xml?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/pom.xml (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/pom.xml Thu Sep 7 18:51:21 2017
@@ -0,0 +1,60 @@
+<?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-jmod-plugin-base-config-headerfiles</artifactId>
+ <version>99.0</version>
+ <name>Maven</name>
+ <packaging>jmod</packaging>
+ <url>http://maven.apache.org</url>
+ <description>Test jmod file creation with include direcotry by using default configuration.</description>
+ <properties>
+ <maven.compiler.source>1.9</maven.compiler.source>
+ <maven.compiler.target>1.9</maven.compiler.target>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.7.0</version>
+ <configuration>
+ <target>1.9</target>
+ <source>1.9</source>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jmod-plugin</artifactId>
+ <version>@project.version@</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/cmds/first.sh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/cmds/first.sh?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/cmds/first.sh (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/cmds/first.sh Thu Sep 7 18:51:21 2017
@@ -0,0 +1 @@
+This first.sh should be located into bin directory into the resulting jmod file.
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/configs/config.test
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/configs/config.test?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/configs/config.test (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/configs/config.test Thu Sep 7 18:51:21 2017
@@ -0,0 +1,2 @@
+Test configuration file which should be located in config/config.test in
+resulting jmod file.
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/headerfiles/first.h
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/headerfiles/first.h?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/headerfiles/first.h (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/headerfiles/first.h Thu Sep 7 18:51:21 2017
@@ -0,0 +1,2 @@
+Test header file which should be located in include/first.h in
+resulting jmod file.
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/java/module-info.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/java/module-info.java?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/java/module-info.java (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/java/module-info.java Thu Sep 7 18:51:21 2017
@@ -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 org.apache.maven.plugins.jmod.it.first {
+ requires java.base;
+ exports myproject;
+}
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/java/myproject/HelloWorld.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/java/myproject/HelloWorld.java?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/java/myproject/HelloWorld.java (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/src/main/java/myproject/HelloWorld.java Thu Sep 7 18:51:21 2017
@@ -0,0 +1,36 @@
+package myproject;
+
+/*
+ * 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.
+ */
+
+/**
+ * The classic Hello World App.
+ */
+public class HelloWorld {
+
+ /**
+ * Main method.
+ *
+ * @param args Not used
+ */
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World from JDK 9" );
+ }
+}
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/verify.groovy?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/verify.groovy (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-headerfiles/verify.groovy Thu Sep 7 18:51:21 2017
@@ -0,0 +1,88 @@
+
+/*
+ * 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.*;
+
+boolean result = true;
+
+try
+{
+ File target = new File( basedir, "target" );
+ if ( !target.exists() || !target.isDirectory() )
+ {
+ System.err.println( "target file is missing or not a directory." );
+ return false;
+ }
+
+ File artifact = new File( target, "jmods/maven-jmod-plugin-base-config-headerfiles.jmod" );
+ if ( !artifact.exists() || artifact.isDirectory() )
+ {
+ System.err.println( "target file is missing or a directory." );
+ return false;
+ }
+
+ String[] artifactNames = [
+ "include/first.h",
+ "bin/first.sh",
+ "conf/config.test",
+ "classes/module-info.class",
+ "classes/myproject/HelloWorld.class",
+ ]
+
+ Set contents = new HashSet();
+
+ JarFile jar = new JarFile( artifact );
+ Enumeration jarEntries = jar.entries();
+ while ( jarEntries.hasMoreElements() )
+ {
+ JarEntry entry = (JarEntry) jarEntries.nextElement();
+ if ( !entry.isDirectory() )
+ {
+ // Only compare files
+ contents.add( entry.getName() );
+ }
+ }
+
+ if ( artifactNames.length != contents.size() )
+ {
+ System.err.println( "jar content size is different from the expected content size" );
+ return false;
+ }
+ for ( int i = 0; i < artifactNames.length; i++ )
+ {
+ String artifactName = artifactNames[i];
+ if ( !contents.contains( artifactName ) )
+ {
+ System.err.println( "Artifact[" + artifactName + "] not found in jar archive" );
+ return false;
+ }
+ }
+
+}
+catch( Throwable e )
+{
+ e.printStackTrace();
+ result = false;
+}
+
+return result;
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/invoker.properties?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/invoker.properties (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/invoker.properties Thu Sep 7 18:51:21 2017
@@ -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.
+invoker.goals = clean package
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/pom.xml?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/pom.xml (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/pom.xml Thu Sep 7 18:51:21 2017
@@ -0,0 +1,60 @@
+<?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-jmod-plugin-base-config-legalnotices</artifactId>
+ <version>99.0</version>
+ <name>Maven</name>
+ <packaging>jmod</packaging>
+ <url>http://maven.apache.org</url>
+ <description>Test jmod file creation with legal direcotry by using default configuration.</description>
+ <properties>
+ <maven.compiler.source>1.9</maven.compiler.source>
+ <maven.compiler.target>1.9</maven.compiler.target>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.7.0</version>
+ <configuration>
+ <target>1.9</target>
+ <source>1.9</source>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jmod-plugin</artifactId>
+ <version>@project.version@</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/java/module-info.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/java/module-info.java?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/java/module-info.java (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/java/module-info.java Thu Sep 7 18:51:21 2017
@@ -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 org.apache.maven.plugins.jmod.it.first {
+ requires java.base;
+ exports myproject;
+}
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/java/myproject/HelloWorld.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/java/myproject/HelloWorld.java?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/java/myproject/HelloWorld.java (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/java/myproject/HelloWorld.java Thu Sep 7 18:51:21 2017
@@ -0,0 +1,36 @@
+package myproject;
+
+/*
+ * 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.
+ */
+
+/**
+ * The classic Hello World App.
+ */
+public class HelloWorld {
+
+ /**
+ * Main method.
+ *
+ * @param args Not used
+ */
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World from JDK 9" );
+ }
+}
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/legalnotices/first.md
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/legalnotices/first.md?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/legalnotices/first.md (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/src/main/legalnotices/first.md Thu Sep 7 18:51:21 2017
@@ -0,0 +1,2 @@
+Test legal notices file which will stay in legal/first.md in
+resulting jmod file.
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/verify.groovy?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/verify.groovy (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-legalnotices/verify.groovy Thu Sep 7 18:51:21 2017
@@ -0,0 +1,86 @@
+
+/*
+ * 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.*;
+
+boolean result = true;
+
+try
+{
+ File target = new File( basedir, "target" );
+ if ( !target.exists() || !target.isDirectory() )
+ {
+ System.err.println( "target file is missing or not a directory." );
+ return false;
+ }
+
+ File artifact = new File( target, "jmods/maven-jmod-plugin-base-config-legalnotices.jmod" );
+ if ( !artifact.exists() || artifact.isDirectory() )
+ {
+ System.err.println( "target file is missing or a directory." );
+ return false;
+ }
+
+ String[] artifactNames = [
+ "legal/first.md",
+ "classes/module-info.class",
+ "classes/myproject/HelloWorld.class",
+ ]
+
+ Set contents = new HashSet();
+
+ JarFile jar = new JarFile( artifact );
+ Enumeration jarEntries = jar.entries();
+ while ( jarEntries.hasMoreElements() )
+ {
+ JarEntry entry = (JarEntry) jarEntries.nextElement();
+ if ( !entry.isDirectory() )
+ {
+ // Only compare files
+ contents.add( entry.getName() );
+ }
+ }
+
+ if ( artifactNames.length != contents.size() )
+ {
+ System.err.println( "jar content size is different from the expected content size" );
+ return false;
+ }
+ for ( int i = 0; i < artifactNames.length; i++ )
+ {
+ String artifactName = artifactNames[i];
+ if ( !contents.contains( artifactName ) )
+ {
+ System.err.println( "Artifact[" + artifactName + "] not found in jar archive" );
+ return false;
+ }
+ }
+
+}
+catch( Throwable e )
+{
+ e.printStackTrace();
+ result = false;
+}
+
+return result;
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/invoker.properties?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/invoker.properties (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/invoker.properties Thu Sep 7 18:51:21 2017
@@ -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.
+invoker.goals = clean package
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/pom.xml?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/pom.xml (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/pom.xml Thu Sep 7 18:51:21 2017
@@ -0,0 +1,60 @@
+<?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-jmod-plugin-base-config-libs</artifactId>
+ <version>99.0</version>
+ <name>Maven</name>
+ <packaging>jmod</packaging>
+ <url>http://maven.apache.org</url>
+ <description>Test jmod file creation with libs direcotry by using default configuration.</description>
+ <properties>
+ <maven.compiler.source>1.9</maven.compiler.source>
+ <maven.compiler.target>1.9</maven.compiler.target>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.7.0</version>
+ <configuration>
+ <target>1.9</target>
+ <source>1.9</source>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jmod-plugin</artifactId>
+ <version>@project.version@</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/java/module-info.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/java/module-info.java?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/java/module-info.java (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/java/module-info.java Thu Sep 7 18:51:21 2017
@@ -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 org.apache.maven.plugins.jmod.it.first {
+ requires java.base;
+ exports myproject;
+}
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/java/myproject/HelloWorld.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/java/myproject/HelloWorld.java?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/java/myproject/HelloWorld.java (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/java/myproject/HelloWorld.java Thu Sep 7 18:51:21 2017
@@ -0,0 +1,36 @@
+package myproject;
+
+/*
+ * 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.
+ */
+
+/**
+ * The classic Hello World App.
+ */
+public class HelloWorld {
+
+ /**
+ * Main method.
+ *
+ * @param args Not used
+ */
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World from JDK 9" );
+ }
+}
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/libs/first.so
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/libs/first.so?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/libs/first.so (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/src/main/libs/first.so Thu Sep 7 18:51:21 2017
@@ -0,0 +1,2 @@
+Test native librariy file which will stay in lib/first.so in
+resulting jmod file.
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/verify.groovy?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/verify.groovy (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config-libs/verify.groovy Thu Sep 7 18:51:21 2017
@@ -0,0 +1,86 @@
+
+/*
+ * 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.*;
+
+boolean result = true;
+
+try
+{
+ File target = new File( basedir, "target" );
+ if ( !target.exists() || !target.isDirectory() )
+ {
+ System.err.println( "target file is missing or not a directory." );
+ return false;
+ }
+
+ File artifact = new File( target, "jmods/maven-jmod-plugin-base-config-libs.jmod" );
+ if ( !artifact.exists() || artifact.isDirectory() )
+ {
+ System.err.println( "target file is missing or a directory." );
+ return false;
+ }
+
+ String[] artifactNames = [
+ "lib/first.so",
+ "classes/module-info.class",
+ "classes/myproject/HelloWorld.class",
+ ]
+
+ Set contents = new HashSet();
+
+ JarFile jar = new JarFile( artifact );
+ Enumeration jarEntries = jar.entries();
+ while ( jarEntries.hasMoreElements() )
+ {
+ JarEntry entry = (JarEntry) jarEntries.nextElement();
+ if ( !entry.isDirectory() )
+ {
+ // Only compare files
+ contents.add( entry.getName() );
+ }
+ }
+
+ if ( artifactNames.length != contents.size() )
+ {
+ System.err.println( "jar content size is different from the expected content size" );
+ return false;
+ }
+ for ( int i = 0; i < artifactNames.length; i++ )
+ {
+ String artifactName = artifactNames[i];
+ if ( !contents.contains( artifactName ) )
+ {
+ System.err.println( "Artifact[" + artifactName + "] not found in jar archive" );
+ return false;
+ }
+ }
+
+}
+catch( Throwable e )
+{
+ e.printStackTrace();
+ result = false;
+}
+
+return result;
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/invoker.properties?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/invoker.properties (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/invoker.properties Thu Sep 7 18:51:21 2017
@@ -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.
+invoker.goals = clean package
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/pom.xml?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/pom.xml (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/pom.xml Thu Sep 7 18:51:21 2017
@@ -0,0 +1,60 @@
+<?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-jmod-plugin-base-config</artifactId>
+ <version>99.0</version>
+ <name>Maven</name>
+ <packaging>jmod</packaging>
+ <url>http://maven.apache.org</url>
+ <description>Test jmod file creation with config directory by using default configuration.</description>
+ <properties>
+ <maven.compiler.source>1.9</maven.compiler.source>
+ <maven.compiler.target>1.9</maven.compiler.target>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.7.0</version>
+ <configuration>
+ <target>1.9</target>
+ <source>1.9</source>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jmod-plugin</artifactId>
+ <version>@project.version@</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/configs/config.test
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/configs/config.test?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/configs/config.test (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/configs/config.test Thu Sep 7 18:51:21 2017
@@ -0,0 +1,2 @@
+Test configuration file which should be located in config/config.test in
+resulting jmod file.
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/java/module-info.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/java/module-info.java?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/java/module-info.java (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/java/module-info.java Thu Sep 7 18:51:21 2017
@@ -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 org.apache.maven.plugins.jmod.it.first {
+ requires java.base;
+ exports myproject;
+}
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/java/myproject/HelloWorld.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/java/myproject/HelloWorld.java?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/java/myproject/HelloWorld.java (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/src/main/java/myproject/HelloWorld.java Thu Sep 7 18:51:21 2017
@@ -0,0 +1,36 @@
+package myproject;
+
+/*
+ * 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.
+ */
+
+/**
+ * The classic Hello World App.
+ */
+public class HelloWorld {
+
+ /**
+ * Main method.
+ *
+ * @param args Not used
+ */
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World from JDK 9" );
+ }
+}
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/verify.groovy?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/verify.groovy (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-config/verify.groovy Thu Sep 7 18:51:21 2017
@@ -0,0 +1,86 @@
+
+/*
+ * 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.*;
+
+boolean result = true;
+
+try
+{
+ File target = new File( basedir, "target" );
+ if ( !target.exists() || !target.isDirectory() )
+ {
+ System.err.println( "target file is missing or not a directory." );
+ return false;
+ }
+
+ File artifact = new File( target, "jmods/maven-jmod-plugin-base-config.jmod" );
+ if ( !artifact.exists() || artifact.isDirectory() )
+ {
+ System.err.println( "target file is missing or a directory." );
+ return false;
+ }
+
+ String[] artifactNames = [
+ "conf/config.test",
+ "classes/module-info.class",
+ "classes/myproject/HelloWorld.class",
+ ]
+
+ Set contents = new HashSet();
+
+ JarFile jar = new JarFile( artifact );
+ Enumeration jarEntries = jar.entries();
+ while ( jarEntries.hasMoreElements() )
+ {
+ JarEntry entry = (JarEntry) jarEntries.nextElement();
+ if ( !entry.isDirectory() )
+ {
+ // Only compare files
+ contents.add( entry.getName() );
+ }
+ }
+
+ if ( artifactNames.length != contents.size() )
+ {
+ System.err.println( "jar content size is different from the expected content size" );
+ return false;
+ }
+ for ( int i = 0; i < artifactNames.length; i++ )
+ {
+ String artifactName = artifactNames[i];
+ if ( !contents.contains( artifactName ) )
+ {
+ System.err.println( "Artifact[" + artifactName + "] not found in jar archive" );
+ return false;
+ }
+ }
+
+}
+catch( Throwable e )
+{
+ e.printStackTrace();
+ result = false;
+}
+
+return result;
Modified: maven/plugins/trunk/maven-jmod-plugin/src/it/base-it/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-it/pom.xml?rev=1807631&r1=1807630&r2=1807631&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-it/pom.xml (original)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-it/pom.xml Thu Sep 7 18:51:21 2017
@@ -23,7 +23,7 @@
>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jmod-plugin-test-project-001</artifactId>
+ <artifactId>maven-jmod-plugin-base-it</artifactId>
<version>99.0</version>
<name>Maven</name>
<packaging>jmod</packaging>
Copied: maven/plugins/trunk/maven-jmod-plugin/src/it/base-it/verify.groovy (from r1807630, maven/plugins/trunk/maven-jmod-plugin/src/it/base-it/verify.bsh)
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/base-it/verify.groovy?p2=maven/plugins/trunk/maven-jmod-plugin/src/it/base-it/verify.groovy&p1=maven/plugins/trunk/maven-jmod-plugin/src/it/base-it/verify.bsh&r1=1807630&r2=1807631&rev=1807631&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/base-it/verify.bsh (original)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/base-it/verify.groovy Thu Sep 7 18:51:21 2017
@@ -34,17 +34,17 @@ try
return false;
}
- File artifact = new File( target, "jmods/maven-jmod-plugin-test-project-001.jmod" );
+ File artifact = new File( target, "jmods/maven-jmod-plugin-base-it.jmod" );
if ( !artifact.exists() || artifact.isDirectory() )
{
System.err.println( "target file is missing or a directory." );
return false;
}
- String[] artifactNames = new String[] {
+ String[] artifactNames = [
"classes/module-info.class",
"classes/myproject/HelloWorld.class",
- };
+ ]
Set contents = new HashSet();
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/invoker.properties?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/invoker.properties (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/invoker.properties Thu Sep 7 18:51:21 2017
@@ -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.
+invoker.goals = clean package
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/pom.xml?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/pom.xml (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/pom.xml Thu Sep 7 18:51:21 2017
@@ -0,0 +1,66 @@
+<?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-jmod-plugin-non-default-config-cmds</artifactId>
+ <version>99.0</version>
+ <name>Maven</name>
+ <packaging>jmod</packaging>
+ <url>http://maven.apache.org</url>
+ <description>Test jmod file creation with non default directoies by using non default configuration.</description>
+ <properties>
+ <maven.compiler.source>1.9</maven.compiler.source>
+ <maven.compiler.target>1.9</maven.compiler.target>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.7.0</version>
+ <configuration>
+ <target>1.9</target>
+ <source>1.9</source>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jmod-plugin</artifactId>
+ <version>@project.version@</version>
+ <extensions>true</extensions>
+ <configuration>
+ <cmds>
+ <cmd>src/main/another-directory</cmd>
+ <cmd>src/main/another-sub-directory</cmd>
+ </cmds>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/another-directory/non-default-first.sh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/another-directory/non-default-first.sh?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/another-directory/non-default-first.sh (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/another-directory/non-default-first.sh Thu Sep 7 18:51:21 2017
@@ -0,0 +1 @@
+This non-default-first.sh should be located into bin directory into the resulting jmod file.
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/another-sub-directory/non-default-sub-first.sh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/another-sub-directory/non-default-sub-first.sh?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/another-sub-directory/non-default-sub-first.sh (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/another-sub-directory/non-default-sub-first.sh Thu Sep 7 18:51:21 2017
@@ -0,0 +1 @@
+This non-default-sub-first.sh should be located into bin directory into the resulting jmod file.
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/cmds/first.sh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/cmds/first.sh?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/cmds/first.sh (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/cmds/first.sh Thu Sep 7 18:51:21 2017
@@ -0,0 +1 @@
+This first.sh should never be located into bin directory into the resulting jmod file based on the non default configuration.
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/java/module-info.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/java/module-info.java?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/java/module-info.java (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/java/module-info.java Thu Sep 7 18:51:21 2017
@@ -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 org.apache.maven.plugins.jmod.it.first {
+ requires java.base;
+ exports myproject;
+}
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/java/myproject/HelloWorld.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/java/myproject/HelloWorld.java?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/java/myproject/HelloWorld.java (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/src/main/java/myproject/HelloWorld.java Thu Sep 7 18:51:21 2017
@@ -0,0 +1,36 @@
+package myproject;
+
+/*
+ * 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.
+ */
+
+/**
+ * The classic Hello World App.
+ */
+public class HelloWorld {
+
+ /**
+ * Main method.
+ *
+ * @param args Not used
+ */
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World from JDK 9" );
+ }
+}
\ No newline at end of file
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/verify.groovy?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/verify.groovy (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-cmds/verify.groovy Thu Sep 7 18:51:21 2017
@@ -0,0 +1,87 @@
+
+/*
+ * 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.*;
+
+boolean result = true;
+
+try
+{
+ File target = new File( basedir, "target" );
+ if ( !target.exists() || !target.isDirectory() )
+ {
+ System.err.println( "target file is missing or not a directory." );
+ return false;
+ }
+
+ File artifact = new File( target, "jmods/maven-jmod-plugin-non-default-config-cmds.jmod" );
+ if ( !artifact.exists() || artifact.isDirectory() )
+ {
+ System.err.println( "target file is missing or a directory." );
+ return false;
+ }
+
+ String[] artifactNames = [
+ "bin/non-default-first.sh",
+ "bin/non-default-sub-first.sh",
+ "classes/module-info.class",
+ "classes/myproject/HelloWorld.class",
+ ]
+
+ Set contents = new HashSet();
+
+ JarFile jar = new JarFile( artifact );
+ Enumeration jarEntries = jar.entries();
+ while ( jarEntries.hasMoreElements() )
+ {
+ JarEntry entry = (JarEntry) jarEntries.nextElement();
+ if ( !entry.isDirectory() )
+ {
+ // Only compare files
+ contents.add( entry.getName() );
+ }
+ }
+
+ if ( artifactNames.length != contents.size() )
+ {
+ System.err.println( "jar content size is different from the expected content size" );
+ return false;
+ }
+ for ( int i = 0; i < artifactNames.length; i++ )
+ {
+ String artifactName = artifactNames[i];
+ if ( !contents.contains( artifactName ) )
+ {
+ System.err.println( "Artifact[" + artifactName + "] not found in jar archive" );
+ return false;
+ }
+ }
+
+}
+catch( Throwable e )
+{
+ e.printStackTrace();
+ result = false;
+}
+
+return result;
Added: maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/invoker.properties?rev=1807631&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/invoker.properties (added)
+++ maven/plugins/trunk/maven-jmod-plugin/src/it/non-default-config-headerfiles/invoker.properties Thu Sep 7 18:51:21 2017
@@ -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.
+invoker.goals = clean package