diff --git a/README.adoc b/README.adoc index c13dbbc5..abec9b2e 100755 --- a/README.adoc +++ b/README.adoc @@ -388,7 +388,13 @@ Examples requiring specific JDK versions may need `fork` and `executable` config Examples requiring specific JDK versions may need `fork` and `executable` configuration with environment-specific paths. Resource handling:: -Examples with non-.class resources (like xref:jigsaw-examples/example_resources/README.adoc#maven-4-migration[example_resources]) need `maven-resources-plugin` configuration to copy resources from the modular source directories (`src//main`) to the target classes directories, as the hybrid compilation approach only packages compiled `.class` files by default. +Examples with non-.class resources (like xref:jigsaw-examples/example_resources/README.adoc#maven-4-migration[example_resources]) need resources copied from the modular source directories (`src//main/resources`) to the target classes directories (`target/classes//`). ++ +With https://github.com/apache/maven/pull/11505[Maven Core PR #11505], this happens automatically - the resources plugin discovers resources from the modular layout and copies them to the correct location. ++ +Special case: xref:jigsaw-examples/example_addExports_manifest/README.adoc#sec:maven-4-migration[example_addExports_manifest] requires a custom `MANIFEST.MF` in `src/modmain/main/resources/META-INF/`. +This example uses real source directories (not symlinks) because the `MANIFEST.MF` must be copied alongside the Java sources. +See the example's README for detailed migration notes. Multiple module versions:: Examples requiring multiple versions of the same module (like xref:jigsaw-examples/example_layer-modules-module-resolution/README.adoc#maven-4-migration[example_layer-modules-module-resolution]) cannot use the standard Module Source Hierarchy approach, as the `` element expects one source location per module name. diff --git a/jigsaw-examples/example_addExports_manifest/README.adoc b/jigsaw-examples/example_addExports_manifest/README.adoc index 798f4447..e336adb7 100644 --- a/jigsaw-examples/example_addExports_manifest/README.adoc +++ b/jigsaw-examples/example_addExports_manifest/README.adoc @@ -84,3 +84,53 @@ include::run-result/run.txt[] ---- include::m4/run-result/run.txt[] ---- + +=== Maven 4 Migration Notes + +This example requires special handling for Maven 4 migration due to the `MANIFEST.MF` file that must be included in the JAR. + +==== Directory Structure + +Unlike most other examples that use symlinks from `m4/src//main/java` to the original sources, this example uses a real directory structure for `modmain`: + +[source] +---- +m4/src/modmain/main/ +├── java/ +│ ├── module-info.java +│ └── pkgmain/ +│ └── Main.java +└── resources/ + └── META-INF/ + └── MANIFEST.MF +---- + +The `moda` module still uses a symlink since it doesn't require resources. + +==== MANIFEST.MF Content + +The `MANIFEST.MF` contains custom entries that are merged with the JAR tool's default manifest: + +[source] +---- +Add-Exports: java.base/jdk.internal.misc moda/pkgainternal +Main-Class: pkgmain.Main +---- + +[NOTE] +==== +The standard `Manifest-Version` and `Created-By` entries are omitted from the source `MANIFEST.MF` because they are automatically added by the JAR tool. +Including them would cause duplicate entry warnings. +==== + +==== Required Maven PRs + +This example depends on two Maven improvements: + +. https://github.com/apache/maven/pull/11505[Maven Core PR #11505]: Automatic module-aware resource handling +** Automatically discovers resources from `src//main/resources` +** Copies them to `target/classes//` + +. https://github.com/apache/maven-jar-plugin/pull/508[JAR Plugin PR #508]: Automatic JAR-per-module creation +** Creates individual JARs for each module (e.g., `modmain-1.0-SNAPSHOT.jar`) +** Reads `Main-Class` from the module's `MANIFEST.MF` in `target/classes//META-INF/` diff --git a/jigsaw-examples/example_addExports_manifest/m4/pom.xml b/jigsaw-examples/example_addExports_manifest/m4/pom.xml index 7d7ebe77..95392f26 100644 --- a/jigsaw-examples/example_addExports_manifest/m4/pom.xml +++ b/jigsaw-examples/example_addExports_manifest/m4/pom.xml @@ -26,6 +26,11 @@ + + org.apache.maven.plugins + maven-resources-plugin + 3.3.1 + org.apache.maven.plugins maven-compiler-plugin @@ -46,40 +51,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - moda - package - - jar - - - ${project.build.outputDirectory}/moda - moda - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - src/modmain/main/java/META-INF/MANIFEST.MF - - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_addExports_manifest/m4/run.sh b/jigsaw-examples/example_addExports_manifest/m4/run.sh index 7698bdbb..7c0ffb89 100755 --- a/jigsaw-examples/example_addExports_manifest/m4/run.sh +++ b/jigsaw-examples/example_addExports_manifest/m4/run.sh @@ -30,4 +30,4 @@ mkdir -p run-result "${JAVA11_HOME}/bin/java" ${JAVA_OPTIONS} \ --add-modules moda \ --module-path target \ - -jar target/example_addExports_manifest-m4-1.0-SNAPSHOT-modmain.jar 2>&1 | normalize | tee -a run-result/run.txt | myecho + -jar target/modmain-1.0-SNAPSHOT.jar 2>&1 | normalize | tee -a run-result/run.txt | myecho diff --git a/jigsaw-examples/example_addExports_manifest/m4/src/modmain/main/java b/jigsaw-examples/example_addExports_manifest/m4/src/modmain/main/java deleted file mode 120000 index 7f171e2b..00000000 --- a/jigsaw-examples/example_addExports_manifest/m4/src/modmain/main/java +++ /dev/null @@ -1 +0,0 @@ -../../../../src/modmain \ No newline at end of file diff --git a/jigsaw-examples/example_addExports_manifest/m4/src/modmain/main/java/module-info.java b/jigsaw-examples/example_addExports_manifest/m4/src/modmain/main/java/module-info.java new file mode 100644 index 00000000..5d5a5304 --- /dev/null +++ b/jigsaw-examples/example_addExports_manifest/m4/src/modmain/main/java/module-info.java @@ -0,0 +1,3 @@ +open module modmain { // allow reflective access, currently used in the example_jerry-mouse + requires moda; +} diff --git a/jigsaw-examples/example_addExports_manifest/m4/src/modmain/main/java/pkgmain/Main.java b/jigsaw-examples/example_addExports_manifest/m4/src/modmain/main/java/pkgmain/Main.java new file mode 100644 index 00000000..91e4dd5b --- /dev/null +++ b/jigsaw-examples/example_addExports_manifest/m4/src/modmain/main/java/pkgmain/Main.java @@ -0,0 +1,24 @@ +package pkgmain; + +import jdk.internal.misc.SharedSecrets; + +/** + * This class cannot be compiled in Eclipse as compiler options --add-exports are needed. + * See compile.sh for details. + * + * But if compilation has taken place outside Eclipse with the script, + * the modular JARs can be found in .../mlib + * + * The Eclipse launch files takes the compiled code from there and can be run in Eclipse. + */ + +public class Main { + public static void main(String[] args) { + // Compiler and also Runtime option needed: --add-exports java.base/jdk.internal.misc=modmain + SharedSecrets secrets = new SharedSecrets(); + System.out.println("Do you want to know a secret: " + secrets.getClass().getName()); + + // Compiler and also Runtime option needed: --add-exports moda/pkgainternal=modmain + System.out.println(new pkgainternal.A().doIt()); + } +} diff --git a/jigsaw-examples/example_addExports_manifest/m4/src/modmain/main/resources/META-INF/MANIFEST.MF b/jigsaw-examples/example_addExports_manifest/m4/src/modmain/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 00000000..7af2751d --- /dev/null +++ b/jigsaw-examples/example_addExports_manifest/m4/src/modmain/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,2 @@ +Add-Exports: java.base/jdk.internal.misc moda/pkgainternal +Main-Class: pkgmain.Main diff --git a/jigsaw-examples/example_addReads_addExports/m4/pom.xml b/jigsaw-examples/example_addReads_addExports/m4/pom.xml index 3354f696..ccbdec4b 100644 --- a/jigsaw-examples/example_addReads_addExports/m4/pom.xml +++ b/jigsaw-examples/example_addReads_addExports/m4/pom.xml @@ -49,48 +49,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - - modc - package - - jar - - - ${project.build.outputDirectory}/modc - modc - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_addReads_addExports_reflection/m4/pom.xml b/jigsaw-examples/example_addReads_addExports_reflection/m4/pom.xml index 2ca8cfd0..ce3e6439 100644 --- a/jigsaw-examples/example_addReads_addExports_reflection/m4/pom.xml +++ b/jigsaw-examples/example_addReads_addExports_reflection/m4/pom.xml @@ -42,37 +42,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_annotations/m4/pom.xml b/jigsaw-examples/example_annotations/m4/pom.xml index e93ccb15..8ec27c9c 100644 --- a/jigsaw-examples/example_annotations/m4/pom.xml +++ b/jigsaw-examples/example_annotations/m4/pom.xml @@ -36,48 +36,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - mod.annotations - package - - jar - - - ${project.build.outputDirectory}/mod.annotations - mod.annotations - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_automatic-module-logging/m4/pom.xml b/jigsaw-examples/example_automatic-module-logging/m4/pom.xml index e1557968..0f346c02 100644 --- a/jigsaw-examples/example_automatic-module-logging/m4/pom.xml +++ b/jigsaw-examples/example_automatic-module-logging/m4/pom.xml @@ -64,26 +64,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_derived_private-package-protected/m4/pom.xml b/jigsaw-examples/example_derived_private-package-protected/m4/pom.xml index 41cfd0ea..c04b3730 100644 --- a/jigsaw-examples/example_derived_private-package-protected/m4/pom.xml +++ b/jigsaw-examples/example_derived_private-package-protected/m4/pom.xml @@ -33,37 +33,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_exceptions/m4/pom.xml b/jigsaw-examples/example_exceptions/m4/pom.xml index cdf26390..bd91a0af 100644 --- a/jigsaw-examples/example_exceptions/m4/pom.xml +++ b/jigsaw-examples/example_exceptions/m4/pom.xml @@ -33,37 +33,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_hiddenmain/m4/pom.xml b/jigsaw-examples/example_hiddenmain/m4/pom.xml index d9b9f804..2ee857bb 100644 --- a/jigsaw-examples/example_hiddenmain/m4/pom.xml +++ b/jigsaw-examples/example_hiddenmain/m4/pom.xml @@ -30,26 +30,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_interface-callback/m4/pom.xml b/jigsaw-examples/example_interface-callback/m4/pom.xml index 568dc640..b0711f96 100644 --- a/jigsaw-examples/example_interface-callback/m4/pom.xml +++ b/jigsaw-examples/example_interface-callback/m4/pom.xml @@ -36,48 +36,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modcallbackhandler - package - - jar - - - ${project.build.outputDirectory}/modcallbackhandler - modcallbackhandler - - - - modcallee - package - - jar - - - ${project.build.outputDirectory}/modcallee - modcallee - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_jerrymouse/m4/pom.xml b/jigsaw-examples/example_jerrymouse/m4/pom.xml index e7a2f449..92cf8d75 100644 --- a/jigsaw-examples/example_jerrymouse/m4/pom.xml +++ b/jigsaw-examples/example_jerrymouse/m4/pom.xml @@ -64,26 +64,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modstarter - package - - jar - - - ${project.build.outputDirectory}/modstarter - modstarter - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_layer-hierarchy/m4/pom.xml b/jigsaw-examples/example_layer-hierarchy/m4/pom.xml index c8d515b6..ef26a10e 100644 --- a/jigsaw-examples/example_layer-hierarchy/m4/pom.xml +++ b/jigsaw-examples/example_layer-hierarchy/m4/pom.xml @@ -110,147 +110,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - mod.layer - package - - jar - - - ${project.build.outputDirectory}/mod.layer - mod.layer - - - - mod.main - package - - jar - - - ${project.build.outputDirectory}/mod.main - mod.main - - - - mod.u_bottom_middle_top - package - - jar - - - ${project.build.outputDirectory}/mod.u_bottom_middle_top - mod.u_bottom_middle_top - - - - mod.y_bottom - package - - jar - - - ${project.build.outputDirectory}/mod.y_bottom - mod.y_bottom - - - - mod.y_middle - package - - jar - - - ${project.build.outputDirectory}/mod.y_middle - mod.y_middle - - - - mod.y_top - package - - jar - - - ${project.build.outputDirectory}/mod.y_top - mod.y_top - - - - mod.z_bottom - package - - jar - - - ${project.build.outputDirectory}/mod.z_bottom - mod.z_bottom - - - - mod.z_middle - package - - jar - - - ${project.build.outputDirectory}/mod.z_middle - mod.z_middle - - - - mod.z_top - package - - jar - - - ${project.build.outputDirectory}/mod.z_top - mod.z_top - - - - mod.zreverse_bottom - package - - jar - - - ${project.build.outputDirectory}/mod.zreverse_bottom - mod.zreverse_bottom - - - - mod.zreverse_middle - package - - jar - - - ${project.build.outputDirectory}/mod.zreverse_middle - mod.zreverse_middle - - - - mod.zreverse_top - package - - jar - - - ${project.build.outputDirectory}/mod.zreverse_top - mod.zreverse_top - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_layer-modules-all-in-boot-layer/m4/pom.xml b/jigsaw-examples/example_layer-modules-all-in-boot-layer/m4/pom.xml index 8316aba6..e00ca4c0 100644 --- a/jigsaw-examples/example_layer-modules-all-in-boot-layer/m4/pom.xml +++ b/jigsaw-examples/example_layer-modules-all-in-boot-layer/m4/pom.xml @@ -46,59 +46,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modbar - package - - jar - - - ${project.build.outputDirectory}/modbar - modbar - - - - modcommon - package - - jar - - - ${project.build.outputDirectory}/modcommon - modcommon - - - - modfoo - package - - jar - - - ${project.build.outputDirectory}/modfoo - modfoo - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_layer-modules-grouped-in-hierarchy/m4/pom.xml b/jigsaw-examples/example_layer-modules-grouped-in-hierarchy/m4/pom.xml index 6ed82a1a..1dfa6b28 100644 --- a/jigsaw-examples/example_layer-modules-grouped-in-hierarchy/m4/pom.xml +++ b/jigsaw-examples/example_layer-modules-grouped-in-hierarchy/m4/pom.xml @@ -35,37 +35,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modcommon - package - - jar - - - ${project.build.outputDirectory}/modcommon - modcommon - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_layer-modules-module-resolution/m4/compile.sh b/jigsaw-examples/example_layer-modules-module-resolution/m4/compile.sh index 17bf2665..84ea0729 100755 --- a/jigsaw-examples/example_layer-modules-module-resolution/m4/compile.sh +++ b/jigsaw-examples/example_layer-modules-module-resolution/m4/compile.sh @@ -40,14 +40,14 @@ echo "Copying JARs to layer-specific directories..." # Copy foo layer modules (modfoo, modversion1) to foomlib/ for mod in modfoo modversion1; do - echo "cp target/example_layer-modules-module-resolution-m4-1.0-${mod}.jar foomlib/${mod}.jar" - cp "target/example_layer-modules-module-resolution-m4-1.0-${mod}.jar" "foomlib/${mod}.jar" + echo "cp target/${mod}-1.0.jar foomlib/${mod}.jar" + cp "target/${mod}-1.0.jar" "foomlib/${mod}.jar" done # Copy bar layer modules (modbar, modversion2) to barmlib/ for mod in modbar modversion2; do - echo "cp target/example_layer-modules-module-resolution-m4-1.0-${mod}.jar barmlib/${mod}.jar" - cp "target/example_layer-modules-module-resolution-m4-1.0-${mod}.jar" "barmlib/${mod}.jar" + echo "cp target/${mod}-1.0.jar barmlib/${mod}.jar" + cp "target/${mod}-1.0.jar" "barmlib/${mod}.jar" done # Compile second version of modcommon from src2 (version 2.0) diff --git a/jigsaw-examples/example_layer-modules-module-resolution/m4/pom.xml b/jigsaw-examples/example_layer-modules-module-resolution/m4/pom.xml index 38f735af..956be5b5 100644 --- a/jigsaw-examples/example_layer-modules-module-resolution/m4/pom.xml +++ b/jigsaw-examples/example_layer-modules-module-resolution/m4/pom.xml @@ -45,81 +45,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modbar - package - - jar - - - ${project.build.outputDirectory}/modbar - modbar - - - - modcommon - package - - jar - - - ${project.build.outputDirectory}/modcommon - modcommon - - - - modfoo - package - - jar - - - ${project.build.outputDirectory}/modfoo - modfoo - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - - modversion1 - package - - jar - - - ${project.build.outputDirectory}/modversion1 - modversion1 - - - - modversion2 - package - - jar - - - ${project.build.outputDirectory}/modversion2 - modversion2 - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_naming-modules/m4/pom.xml b/jigsaw-examples/example_naming-modules/m4/pom.xml index 5e7d8cda..d7b04885 100644 --- a/jigsaw-examples/example_naming-modules/m4/pom.xml +++ b/jigsaw-examples/example_naming-modules/m4/pom.xml @@ -50,81 +50,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - java.whatever - package - - jar - - - ${project.build.outputDirectory}/java.whatever - java.whatever - - - - jdk.whatever - package - - jar - - - ${project.build.outputDirectory}/jdk.whatever - jdk.whatever - - - - mod.client - package - - jar - - - ${project.build.outputDirectory}/mod.client - mod.client - - - - mod_client - package - - jar - - - ${project.build.outputDirectory}/mod_client - mod_client - - - - modjava - package - - jar - - - ${project.build.outputDirectory}/modjava - modjava - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_naming-modules/m4/run.sh b/jigsaw-examples/example_naming-modules/m4/run.sh index 60dc2368..587e1c87 100755 --- a/jigsaw-examples/example_naming-modules/m4/run.sh +++ b/jigsaw-examples/example_naming-modules/m4/run.sh @@ -25,11 +25,12 @@ do echo "JAR-file: ${JAR} in ${dir}" # get name of JAR-file - # For target/ JARs (Phase 2): extract classifier after last hyphen before .jar + # For target/ JARs (Phase 2): extract module name before version # For amlib JARs: use the whole basename if [[ "${dir}" == "target" ]]; then - # Extract classifier from pattern: artifactId-version-classifier.jar - MOD="$(basename "${JAR}" .jar | sed 's/.*-\([^-]*\)$/\1/')" + # Extract module name from pattern: modulename-version.jar + # Remove .jar extension, then remove -version suffix (version is last hyphen-separated part) + MOD="$(basename "${JAR}" .jar | sed 's/-[0-9][0-9.]*$//')" else MOD="$(basename "${JAR}" | sed s/'.jar'//g | sed s/'-'/'.'/g | cut -d '.' -f 1-2)" fi diff --git a/jigsaw-examples/example_patch/m4/pom.xml b/jigsaw-examples/example_patch/m4/pom.xml index 250f6437..478e0aee 100644 --- a/jigsaw-examples/example_patch/m4/pom.xml +++ b/jigsaw-examples/example_patch/m4/pom.xml @@ -36,37 +36,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_reflection/m4/pom.xml b/jigsaw-examples/example_reflection/m4/pom.xml index ff15d978..9fd37b8e 100644 --- a/jigsaw-examples/example_reflection/m4/pom.xml +++ b/jigsaw-examples/example_reflection/m4/pom.xml @@ -33,37 +33,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_requires-static/m4/pom.xml b/jigsaw-examples/example_requires-static/m4/pom.xml index ecfb5173..7b7d6143 100644 --- a/jigsaw-examples/example_requires-static/m4/pom.xml +++ b/jigsaw-examples/example_requires-static/m4/pom.xml @@ -37,48 +37,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - - modc - package - - jar - - - ${project.build.outputDirectory}/modc - modc - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_requires_exports-to/m4/pom.xml b/jigsaw-examples/example_requires_exports-to/m4/pom.xml index 349aa072..6522cc97 100644 --- a/jigsaw-examples/example_requires_exports-to/m4/pom.xml +++ b/jigsaw-examples/example_requires_exports-to/m4/pom.xml @@ -39,59 +39,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modb1 - package - - jar - - - ${project.build.outputDirectory}/modb1 - modb1 - - - - modb2 - package - - jar - - - ${project.build.outputDirectory}/modb2 - modb2 - - - - modc - package - - jar - - - ${project.build.outputDirectory}/modc - modc - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_requires_exports/m4/pom.xml b/jigsaw-examples/example_requires_exports/m4/pom.xml index d1392389..51e473a4 100644 --- a/jigsaw-examples/example_requires_exports/m4/pom.xml +++ b/jigsaw-examples/example_requires_exports/m4/pom.xml @@ -36,48 +36,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - - modc - package - - jar - - - ${project.build.outputDirectory}/modc - modc - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_requires_exports_requires-transitive_exports-to/m4/pom.xml b/jigsaw-examples/example_requires_exports_requires-transitive_exports-to/m4/pom.xml index a5e09781..04bd18d3 100644 --- a/jigsaw-examples/example_requires_exports_requires-transitive_exports-to/m4/pom.xml +++ b/jigsaw-examples/example_requires_exports_requires-transitive_exports-to/m4/pom.xml @@ -45,81 +45,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - moda - package - - jar - - - ${project.build.outputDirectory}/moda - moda - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - - modc - package - - jar - - - ${project.build.outputDirectory}/modc - modc - - - - modfacade - package - - jar - - - ${project.build.outputDirectory}/modfacade - modfacade - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - - modmainbehindfacade - package - - jar - - - ${project.build.outputDirectory}/modmainbehindfacade - modmainbehindfacade - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_resolved-modules/m4/compile.sh b/jigsaw-examples/example_resolved-modules/m4/compile.sh index 13ffd537..eedb9be3 100755 --- a/jigsaw-examples/example_resolved-modules/m4/compile.sh +++ b/jigsaw-examples/example_resolved-modules/m4/compile.sh @@ -35,7 +35,7 @@ mvn clean package echo echo "Copying JARs to mlib with simple names..." for mod in moda modb modc; do - echo "cp target/example_resolved-modules-m4-1.0-SNAPSHOT-${mod}.jar mlib/${mod}.jar" - cp "target/example_resolved-modules-m4-1.0-SNAPSHOT-${mod}.jar" "mlib/${mod}.jar" + echo "cp target/${mod}-1.0-SNAPSHOT.jar mlib/${mod}.jar" + cp "target/${mod}-1.0-SNAPSHOT.jar" "mlib/${mod}.jar" done diff --git a/jigsaw-examples/example_resolved-modules/m4/pom.xml b/jigsaw-examples/example_resolved-modules/m4/pom.xml index 81bda7ce..e7c8edc2 100644 --- a/jigsaw-examples/example_resolved-modules/m4/pom.xml +++ b/jigsaw-examples/example_resolved-modules/m4/pom.xml @@ -36,48 +36,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - moda - package - - jar - - - ${project.build.outputDirectory}/moda - moda - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - - modc - package - - jar - - - ${project.build.outputDirectory}/modc - modc - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_resources/m4/pom.xml b/jigsaw-examples/example_resources/m4/pom.xml index 23b4567a..8addf214 100644 --- a/jigsaw-examples/example_resources/m4/pom.xml +++ b/jigsaw-examples/example_resources/m4/pom.xml @@ -74,48 +74,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - - modc - package - - jar - - - ${project.build.outputDirectory}/modc - modc - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_splitpackage/m4/pom.xml b/jigsaw-examples/example_splitpackage/m4/pom.xml index f6a12faa..48661fa8 100644 --- a/jigsaw-examples/example_splitpackage/m4/pom.xml +++ b/jigsaw-examples/example_splitpackage/m4/pom.xml @@ -37,48 +37,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modmainbar - package - - jar - - - ${project.build.outputDirectory}/modmainbar - modmainbar - - - - modsplitbar1 - package - - jar - - - ${project.build.outputDirectory}/modsplitbar1 - modsplitbar1 - - - - modsplitbar2 - package - - jar - - - ${project.build.outputDirectory}/modsplitbar2 - modsplitbar2 - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_splitpackage_automatic-modules/m4/pom.xml b/jigsaw-examples/example_splitpackage_automatic-modules/m4/pom.xml index a98c7ad8..b7a780af 100644 --- a/jigsaw-examples/example_splitpackage_automatic-modules/m4/pom.xml +++ b/jigsaw-examples/example_splitpackage_automatic-modules/m4/pom.xml @@ -37,26 +37,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_unnamed-module-reflection-illegal-access/m4/pom.xml b/jigsaw-examples/example_unnamed-module-reflection-illegal-access/m4/pom.xml index d82d78cd..e02ea088 100644 --- a/jigsaw-examples/example_unnamed-module-reflection-illegal-access/m4/pom.xml +++ b/jigsaw-examples/example_unnamed-module-reflection-illegal-access/m4/pom.xml @@ -34,37 +34,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - - modc - package - - jar - - - ${project.build.outputDirectory}/modc - modc - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_unnamed-module_access-from-explicit-module-reflection/m4/pom.xml b/jigsaw-examples/example_unnamed-module_access-from-explicit-module-reflection/m4/pom.xml index f3cfea58..06b58909 100644 --- a/jigsaw-examples/example_unnamed-module_access-from-explicit-module-reflection/m4/pom.xml +++ b/jigsaw-examples/example_unnamed-module_access-from-explicit-module-reflection/m4/pom.xml @@ -42,37 +42,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_unnamed-module_access-from-explicit-module/m4/pom.xml b/jigsaw-examples/example_unnamed-module_access-from-explicit-module/m4/pom.xml index 0b77fc67..af12891b 100644 --- a/jigsaw-examples/example_unnamed-module_access-from-explicit-module/m4/pom.xml +++ b/jigsaw-examples/example_unnamed-module_access-from-explicit-module/m4/pom.xml @@ -41,37 +41,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_unnamed-module_accessing-module-path/m4/pom.xml b/jigsaw-examples/example_unnamed-module_accessing-module-path/m4/pom.xml index a2424b7b..1bff1ac4 100644 --- a/jigsaw-examples/example_unnamed-module_accessing-module-path/m4/pom.xml +++ b/jigsaw-examples/example_unnamed-module_accessing-module-path/m4/pom.xml @@ -31,26 +31,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modb - package - - jar - - - ${project.build.outputDirectory}/modb - modb - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_uses-provides/m4/pom.xml b/jigsaw-examples/example_uses-provides/m4/pom.xml index 9a9151d4..0dc7cfc7 100644 --- a/jigsaw-examples/example_uses-provides/m4/pom.xml +++ b/jigsaw-examples/example_uses-provides/m4/pom.xml @@ -39,59 +39,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - - modservice.impl.com - package - - jar - - - ${project.build.outputDirectory}/modservice.impl.com - modservice.impl.com - - - - modservice.impl.net - package - - jar - - - ${project.build.outputDirectory}/modservice.impl.net - modservice.impl.net - - - - modservicedefinition - package - - jar - - - ${project.build.outputDirectory}/modservicedefinition - modservicedefinition - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_uses-provides_uses-in-client/m4/pom.xml b/jigsaw-examples/example_uses-provides_uses-in-client/m4/pom.xml index bad3ec84..cb09d8ed 100644 --- a/jigsaw-examples/example_uses-provides_uses-in-client/m4/pom.xml +++ b/jigsaw-examples/example_uses-provides_uses-in-client/m4/pom.xml @@ -39,59 +39,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - - modservice.impl.com - package - - jar - - - ${project.build.outputDirectory}/modservice.impl.com - modservice.impl.com - - - - modservice.impl.net - package - - jar - - - ${project.build.outputDirectory}/modservice.impl.net - modservice.impl.net - - - - modservicedefinition - package - - jar - - - ${project.build.outputDirectory}/modservicedefinition - modservicedefinition - - - + 4.0.0-beta-2-PR508-SNAPSHOT diff --git a/jigsaw-examples/example_version/m4/pom.xml b/jigsaw-examples/example_version/m4/pom.xml index c50331dd..7510c03e 100644 --- a/jigsaw-examples/example_version/m4/pom.xml +++ b/jigsaw-examples/example_version/m4/pom.xml @@ -30,26 +30,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 - - - - default-jar - none - - - - modmain - package - - jar - - - ${project.build.outputDirectory}/modmain - modmain - - - + 4.0.0-beta-2-PR508-SNAPSHOT