This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch plume-football in repository https://gitbox.apache.org/repos/asf/maven.git
commit d5630968d54ee0180a8036f8c0549f1f0213f60a Author: Guillaume Nodet <[email protected]> AuthorDate: Wed May 20 15:45:57 2026 +0200 [MNG-11642] Add JPMS module support to Maven 4 Add explicit module-info.java to 17 modules (11 API, 6 impl) and Automatic-Module-Name manifest entries to all 34 remaining modules. API modules get full module descriptors with proper requires transitive, exports, uses, and provides directives. Impl modules that don't depend on compat (split-package) modules also get module-info.java. The remaining modules (maven-core, maven-cli, maven-executor, maven-testing, and all 13 compat modules) get Automatic-Module-Name only, since split packages between compat modules prevent them from becoming named modules. Co-Authored-By: Claude Opus 4.6 <[email protected]> --- api/maven-api-annotations/pom.xml | 4 ++ .../src/main/java/module-info.java | 22 +++++++ api/maven-api-cli/pom.xml | 4 ++ api/maven-api-cli/src/main/java/module-info.java | 33 +++++++++++ api/maven-api-core/pom.xml | 4 ++ api/maven-api-core/src/main/java/module-info.java | 37 ++++++++++++ api/maven-api-di/pom.xml | 1 + api/maven-api-di/src/main/java/module-info.java | 28 +++++++++ api/maven-api-metadata/pom.xml | 4 ++ .../src/main/java/module-info.java | 24 ++++++++ api/maven-api-model/pom.xml | 4 ++ api/maven-api-model/src/main/java/module-info.java | 27 +++++++++ api/maven-api-plugin/pom.xml | 4 ++ .../src/main/java/module-info.java | 26 +++++++++ api/maven-api-settings/pom.xml | 4 ++ .../src/main/java/module-info.java | 25 ++++++++ api/maven-api-spi/pom.xml | 4 ++ api/maven-api-spi/src/main/java/module-info.java | 26 +++++++++ api/maven-api-toolchain/pom.xml | 4 ++ .../src/main/java/module-info.java | 25 ++++++++ api/maven-api-xml/pom.xml | 4 ++ api/maven-api-xml/src/main/java/module-info.java | 27 +++++++++ compat/maven-artifact/pom.xml | 4 ++ compat/maven-builder-support/pom.xml | 4 ++ compat/maven-compat/pom.xml | 4 ++ compat/maven-embedder/pom.xml | 4 ++ compat/maven-model-builder/pom.xml | 1 + compat/maven-model/pom.xml | 1 + compat/maven-plugin-api/pom.xml | 4 ++ compat/maven-repository-metadata/pom.xml | 4 ++ compat/maven-resolver-provider/pom.xml | 4 ++ compat/maven-settings-builder/pom.xml | 4 ++ compat/maven-settings/pom.xml | 4 ++ compat/maven-toolchain-builder/pom.xml | 4 ++ compat/maven-toolchain-model/pom.xml | 4 ++ impl/maven-cli/pom.xml | 4 ++ impl/maven-core/pom.xml | 4 ++ impl/maven-di/pom.xml | 4 ++ impl/maven-di/src/main/java/module-info.java | 26 +++++++++ impl/maven-executor/pom.xml | 1 + impl/maven-impl/pom.xml | 2 + impl/maven-impl/src/main/java/module-info.java | 68 ++++++++++++++++++++++ impl/maven-jline/pom.xml | 4 ++ impl/maven-jline/src/main/java/module-info.java | 35 +++++++++++ impl/maven-logging/pom.xml | 4 ++ impl/maven-logging/src/main/java/module-info.java | 30 ++++++++++ impl/maven-support/pom.xml | 12 ++++ impl/maven-support/src/main/java/module-info.java | 37 ++++++++++++ impl/maven-testing/pom.xml | 4 ++ impl/maven-xml/pom.xml | 4 ++ impl/maven-xml/src/main/java/module-info.java | 32 ++++++++++ pom.xml | 11 ++++ 52 files changed, 669 insertions(+) diff --git a/api/maven-api-annotations/pom.xml b/api/maven-api-annotations/pom.xml index 350873e35a..c159bcfce7 100644 --- a/api/maven-api-annotations/pom.xml +++ b/api/maven-api-annotations/pom.xml @@ -30,4 +30,8 @@ <name>Maven 4 API :: Meta annotations</name> <description>Maven 4 API - Java meta annotations.</description> + <properties> + <javaModuleName>org.apache.maven.api.annotations</javaModuleName> + </properties> + </project> diff --git a/api/maven-api-annotations/src/main/java/module-info.java b/api/maven-api-annotations/src/main/java/module-info.java new file mode 100644 index 0000000000..1dff7e2f53 --- /dev/null +++ b/api/maven-api-annotations/src/main/java/module-info.java @@ -0,0 +1,22 @@ +/* + * 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.api.annotations { + exports org.apache.maven.api.annotations; +} diff --git a/api/maven-api-cli/pom.xml b/api/maven-api-cli/pom.xml index 6ed5c71eff..52ead51c6b 100644 --- a/api/maven-api-cli/pom.xml +++ b/api/maven-api-cli/pom.xml @@ -30,6 +30,10 @@ <name>Maven 4 API :: CLI</name> <description>Maven 4 API - CLI.</description> + <properties> + <javaModuleName>org.apache.maven.api.cli</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/api/maven-api-cli/src/main/java/module-info.java b/api/maven-api-cli/src/main/java/module-info.java new file mode 100644 index 0000000000..2beed2fa19 --- /dev/null +++ b/api/maven-api-cli/src/main/java/module-info.java @@ -0,0 +1,33 @@ +/* + * 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.api.cli { + requires transitive org.apache.maven.api; + requires transitive org.apache.maven.api.annotations; + requires transitive org.apache.maven.api.xml; + + exports org.apache.maven.api.cli; + exports org.apache.maven.api.cli.cisupport; + exports org.apache.maven.api.cli.extensions; + exports org.apache.maven.api.cli.logging; + exports org.apache.maven.api.cli.mvn; + exports org.apache.maven.api.cli.mvnenc; + exports org.apache.maven.api.cli.mvnsh; + exports org.apache.maven.api.cli.mvnup; +} diff --git a/api/maven-api-core/pom.xml b/api/maven-api-core/pom.xml index 339ea83192..281711d96d 100644 --- a/api/maven-api-core/pom.xml +++ b/api/maven-api-core/pom.xml @@ -30,6 +30,10 @@ <name>Maven 4 API :: Core</name> <description>Maven 4 API - Maven Core API</description> + <properties> + <javaModuleName>org.apache.maven.api</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/api/maven-api-core/src/main/java/module-info.java b/api/maven-api-core/src/main/java/module-info.java new file mode 100644 index 0000000000..7cbfb5792d --- /dev/null +++ b/api/maven-api-core/src/main/java/module-info.java @@ -0,0 +1,37 @@ +/* + * 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.api { + requires transitive org.apache.maven.api.annotations; + requires transitive org.apache.maven.api.di; + requires transitive org.apache.maven.api.model; + requires transitive org.apache.maven.api.settings; + requires transitive org.apache.maven.api.toolchain; + requires transitive org.apache.maven.api.plugin.descriptor; + requires transitive org.apache.maven.api.xml; + requires java.compiler; + + exports org.apache.maven.api; + exports org.apache.maven.api.cache; + exports org.apache.maven.api.feature; + exports org.apache.maven.api.plugin; + exports org.apache.maven.api.plugin.annotations; + exports org.apache.maven.api.services; + exports org.apache.maven.api.services.xml; +} diff --git a/api/maven-api-di/pom.xml b/api/maven-api-di/pom.xml index d2341a7a42..0563481fc7 100644 --- a/api/maven-api-di/pom.xml +++ b/api/maven-api-di/pom.xml @@ -31,6 +31,7 @@ <description>Maven 4 API - Dependency Injection</description> <properties> + <javaModuleName>org.apache.maven.api.di</javaModuleName> <maven.compiler.proc>none</maven.compiler.proc> </properties> </project> diff --git a/api/maven-api-di/src/main/java/module-info.java b/api/maven-api-di/src/main/java/module-info.java new file mode 100644 index 0000000000..8e64185ddd --- /dev/null +++ b/api/maven-api-di/src/main/java/module-info.java @@ -0,0 +1,28 @@ +/* + * 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.api.di { + exports org.apache.maven.api.di; + exports org.apache.maven.di.tool; + + requires java.compiler; + + provides javax.annotation.processing.Processor with + org.apache.maven.di.tool.DiIndexProcessor; +} diff --git a/api/maven-api-metadata/pom.xml b/api/maven-api-metadata/pom.xml index 311aad02c4..5765faca73 100644 --- a/api/maven-api-metadata/pom.xml +++ b/api/maven-api-metadata/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven 4 API :: Repository Metadata</name> <description>Maven 4 API - Immutable Repository Metadata model.</description> + <properties> + <javaModuleName>org.apache.maven.api.metadata</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/api/maven-api-metadata/src/main/java/module-info.java b/api/maven-api-metadata/src/main/java/module-info.java new file mode 100644 index 0000000000..03b2b27505 --- /dev/null +++ b/api/maven-api-metadata/src/main/java/module-info.java @@ -0,0 +1,24 @@ +/* + * 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.api.metadata { + requires transitive org.apache.maven.api.annotations; + + exports org.apache.maven.api.metadata; +} diff --git a/api/maven-api-model/pom.xml b/api/maven-api-model/pom.xml index 8294a3e887..df3f468a59 100644 --- a/api/maven-api-model/pom.xml +++ b/api/maven-api-model/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven 4 API :: Model</name> <description>Maven 4 API - Immutable Model for Maven POM (Project Object Model).</description> + <properties> + <javaModuleName>org.apache.maven.api.model</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/api/maven-api-model/src/main/java/module-info.java b/api/maven-api-model/src/main/java/module-info.java new file mode 100644 index 0000000000..9ba77847d0 --- /dev/null +++ b/api/maven-api-model/src/main/java/module-info.java @@ -0,0 +1,27 @@ +/* + * 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.api.model { + requires transitive org.apache.maven.api.annotations; + requires transitive org.apache.maven.api.xml; + + exports org.apache.maven.api.model; + + uses org.apache.maven.api.model.ModelObjectProcessor; +} diff --git a/api/maven-api-plugin/pom.xml b/api/maven-api-plugin/pom.xml index 2e9c1706ed..4170823896 100644 --- a/api/maven-api-plugin/pom.xml +++ b/api/maven-api-plugin/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven 4 API :: Plugin</name> <description>Maven 4 API - Immutable Plugin model.</description> + <properties> + <javaModuleName>org.apache.maven.api.plugin.descriptor</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/api/maven-api-plugin/src/main/java/module-info.java b/api/maven-api-plugin/src/main/java/module-info.java new file mode 100644 index 0000000000..48005b3f0d --- /dev/null +++ b/api/maven-api-plugin/src/main/java/module-info.java @@ -0,0 +1,26 @@ +/* + * 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.api.plugin.descriptor { + requires transitive org.apache.maven.api.annotations; + requires transitive org.apache.maven.api.xml; + + exports org.apache.maven.api.plugin.descriptor; + exports org.apache.maven.api.plugin.descriptor.lifecycle; +} diff --git a/api/maven-api-settings/pom.xml b/api/maven-api-settings/pom.xml index a73c2ce1de..bd3ea6ac3a 100644 --- a/api/maven-api-settings/pom.xml +++ b/api/maven-api-settings/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven 4 API :: Settings</name> <description>Maven 4 API - Immutable Settings model.</description> + <properties> + <javaModuleName>org.apache.maven.api.settings</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/api/maven-api-settings/src/main/java/module-info.java b/api/maven-api-settings/src/main/java/module-info.java new file mode 100644 index 0000000000..9dd502ffbe --- /dev/null +++ b/api/maven-api-settings/src/main/java/module-info.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +module org.apache.maven.api.settings { + requires transitive org.apache.maven.api.annotations; + requires transitive org.apache.maven.api.xml; + + exports org.apache.maven.api.settings; +} diff --git a/api/maven-api-spi/pom.xml b/api/maven-api-spi/pom.xml index 19c06b04a2..f0ffef1999 100644 --- a/api/maven-api-spi/pom.xml +++ b/api/maven-api-spi/pom.xml @@ -30,6 +30,10 @@ <name>Maven 4 API :: SPI</name> <description>Maven 4 API - Maven SPI.</description> + <properties> + <javaModuleName>org.apache.maven.api.spi</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/api/maven-api-spi/src/main/java/module-info.java b/api/maven-api-spi/src/main/java/module-info.java new file mode 100644 index 0000000000..f8c6107344 --- /dev/null +++ b/api/maven-api-spi/src/main/java/module-info.java @@ -0,0 +1,26 @@ +/* + * 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.api.spi { + requires transitive org.apache.maven.api; + requires transitive org.apache.maven.api.di; + requires transitive org.apache.maven.api.model; + + exports org.apache.maven.api.spi; +} diff --git a/api/maven-api-toolchain/pom.xml b/api/maven-api-toolchain/pom.xml index 64d53566d3..6bbedbbe20 100644 --- a/api/maven-api-toolchain/pom.xml +++ b/api/maven-api-toolchain/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven 4 API :: Toolchain</name> <description>Maven 4 API - Immutable Toolchain model.</description> + <properties> + <javaModuleName>org.apache.maven.api.toolchain</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/api/maven-api-toolchain/src/main/java/module-info.java b/api/maven-api-toolchain/src/main/java/module-info.java new file mode 100644 index 0000000000..911607a763 --- /dev/null +++ b/api/maven-api-toolchain/src/main/java/module-info.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +module org.apache.maven.api.toolchain { + requires transitive org.apache.maven.api.annotations; + requires transitive org.apache.maven.api.xml; + + exports org.apache.maven.api.toolchain; +} diff --git a/api/maven-api-xml/pom.xml b/api/maven-api-xml/pom.xml index 4842b6541f..3b2d741e0b 100644 --- a/api/maven-api-xml/pom.xml +++ b/api/maven-api-xml/pom.xml @@ -30,6 +30,10 @@ <name>Maven 4 API :: XML</name> <description>Maven 4 API - Immutable XML.</description> + <properties> + <javaModuleName>org.apache.maven.api.xml</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/api/maven-api-xml/src/main/java/module-info.java b/api/maven-api-xml/src/main/java/module-info.java new file mode 100644 index 0000000000..d75dfdae10 --- /dev/null +++ b/api/maven-api-xml/src/main/java/module-info.java @@ -0,0 +1,27 @@ +/* + * 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.api.xml { + requires transitive org.apache.maven.api.annotations; + requires transitive java.xml; + + exports org.apache.maven.api.xml; + + uses org.apache.maven.api.xml.XmlService; +} diff --git a/compat/maven-artifact/pom.xml b/compat/maven-artifact/pom.xml index 42d5bf80f5..3ca31d04aa 100644 --- a/compat/maven-artifact/pom.xml +++ b/compat/maven-artifact/pom.xml @@ -30,6 +30,10 @@ under the License. <name>Maven Artifact</name> + <properties> + <javaModuleName>org.apache.maven.artifact</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.junit.jupiter</groupId> diff --git a/compat/maven-builder-support/pom.xml b/compat/maven-builder-support/pom.xml index 2f4b6bd61a..211248dad2 100644 --- a/compat/maven-builder-support/pom.xml +++ b/compat/maven-builder-support/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven Builder Support (deprecated)</name> <description>Support for descriptor builders (model, setting, toolchains)</description> + <properties> + <javaModuleName>org.apache.maven.builder.support</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/compat/maven-compat/pom.xml b/compat/maven-compat/pom.xml index 3d3fcdee23..2a799fe1b7 100644 --- a/compat/maven-compat/pom.xml +++ b/compat/maven-compat/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven Compat (deprecated)</name> <description>Deprecated Maven2 classes maintained as compatibility layer.</description> + <properties> + <javaModuleName>org.apache.maven.compat</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/compat/maven-embedder/pom.xml b/compat/maven-embedder/pom.xml index 2df8588ec1..ad29e3d66c 100644 --- a/compat/maven-embedder/pom.xml +++ b/compat/maven-embedder/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven Embedder (deprecated)</name> <description>Maven embeddable component, with CLI and logging support.</description> + <properties> + <javaModuleName>org.apache.maven.embedder</javaModuleName> + </properties> + <dependencies> <!-- Maven4 API --> <dependency> diff --git a/compat/maven-model-builder/pom.xml b/compat/maven-model-builder/pom.xml index 79ebf1b143..69ccf9c978 100644 --- a/compat/maven-model-builder/pom.xml +++ b/compat/maven-model-builder/pom.xml @@ -32,6 +32,7 @@ under the License. <description>The effective model builder, with inheritance, profile activation, interpolation, ...</description> <properties> + <javaModuleName>org.apache.maven.model.builder</javaModuleName> <!-- in: DefaultModelValidator, DefaultModelBuilder --> <checkstyle.violation.ignore>FileLength</checkstyle.violation.ignore> </properties> diff --git a/compat/maven-model/pom.xml b/compat/maven-model/pom.xml index fc1eecff4b..1c30e94f51 100644 --- a/compat/maven-model/pom.xml +++ b/compat/maven-model/pom.xml @@ -32,6 +32,7 @@ under the License. <description>Model for Maven POM (Project Object Model)</description> <properties> + <javaModuleName>org.apache.maven.model</javaModuleName> <!-- in: ModelMerger --> <checkstyle.violation.ignore>FileLength</checkstyle.violation.ignore> </properties> diff --git a/compat/maven-plugin-api/pom.xml b/compat/maven-plugin-api/pom.xml index 6bd39596de..2ff8e07407 100644 --- a/compat/maven-plugin-api/pom.xml +++ b/compat/maven-plugin-api/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven 3 Plugin API</name> <description>The API for Maven 3 plugins - Mojos - development.</description> + <properties> + <javaModuleName>org.apache.maven.plugin</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/compat/maven-repository-metadata/pom.xml b/compat/maven-repository-metadata/pom.xml index 3a6151f4b9..141ecc23e4 100644 --- a/compat/maven-repository-metadata/pom.xml +++ b/compat/maven-repository-metadata/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven Repository Metadata Model</name> <description>Per-directory local and remote repository metadata.</description> + <properties> + <javaModuleName>org.apache.maven.repository.metadata</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/compat/maven-resolver-provider/pom.xml b/compat/maven-resolver-provider/pom.xml index 79c7507bec..bcf4064bb3 100644 --- a/compat/maven-resolver-provider/pom.xml +++ b/compat/maven-resolver-provider/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven Artifact Resolver Provider (deprecated)</name> <description>Components completing Maven Resolver for utilizing Maven POM and repository metadata.</description> + <properties> + <javaModuleName>org.apache.maven.resolver.provider</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/compat/maven-settings-builder/pom.xml b/compat/maven-settings-builder/pom.xml index 24e62ee656..4726ccdd84 100644 --- a/compat/maven-settings-builder/pom.xml +++ b/compat/maven-settings-builder/pom.xml @@ -37,6 +37,10 @@ under the License. </contributor> </contributors> + <properties> + <javaModuleName>org.apache.maven.settings.builder</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.codehaus.plexus</groupId> diff --git a/compat/maven-settings/pom.xml b/compat/maven-settings/pom.xml index 6aaa0e4e42..b426391104 100644 --- a/compat/maven-settings/pom.xml +++ b/compat/maven-settings/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven Settings</name> <description>Maven Settings model.</description> + <properties> + <javaModuleName>org.apache.maven.settings</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/compat/maven-toolchain-builder/pom.xml b/compat/maven-toolchain-builder/pom.xml index e5e8916c90..91b4d1d05e 100644 --- a/compat/maven-toolchain-builder/pom.xml +++ b/compat/maven-toolchain-builder/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven Toolchain Builder (deprecated)</name> <description>The effective toolchain builder.</description> + <properties> + <javaModuleName>org.apache.maven.toolchain.builder</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/compat/maven-toolchain-model/pom.xml b/compat/maven-toolchain-model/pom.xml index 218bdbed07..567fb55912 100644 --- a/compat/maven-toolchain-model/pom.xml +++ b/compat/maven-toolchain-model/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven Toolchain Model</name> <description>Maven Toolchain model.</description> + <properties> + <javaModuleName>org.apache.maven.toolchain.model</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/impl/maven-cli/pom.xml b/impl/maven-cli/pom.xml index a369ffd663..0d144e890b 100644 --- a/impl/maven-cli/pom.xml +++ b/impl/maven-cli/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven 4 CLI</name> <description>Maven 4 CLI component, with CLI and logging support.</description> + <properties> + <javaModuleName>org.apache.maven.cling</javaModuleName> + </properties> + <dependencies> <!-- Maven4 API --> <dependency> diff --git a/impl/maven-core/pom.xml b/impl/maven-core/pom.xml index 07ffa6662b..bc26d63395 100644 --- a/impl/maven-core/pom.xml +++ b/impl/maven-core/pom.xml @@ -31,6 +31,10 @@ under the License. <name>Maven 4 Core</name> <description>Maven Core classes.</description> + <properties> + <javaModuleName>org.apache.maven.core</javaModuleName> + </properties> + <dependencies> <!-- Maven4 API --> <dependency> diff --git a/impl/maven-di/pom.xml b/impl/maven-di/pom.xml index 4068da194b..759bc07b27 100644 --- a/impl/maven-di/pom.xml +++ b/impl/maven-di/pom.xml @@ -30,6 +30,10 @@ under the License. <name>Maven 4 Dependency Injection</name> <description>Provides the implementation for the Dependency Injection mechanism in Maven</description> + <properties> + <javaModuleName>org.apache.maven.di</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/impl/maven-di/src/main/java/module-info.java b/impl/maven-di/src/main/java/module-info.java new file mode 100644 index 0000000000..d6a13c87db --- /dev/null +++ b/impl/maven-di/src/main/java/module-info.java @@ -0,0 +1,26 @@ +/* + * 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.di { + requires transitive org.apache.maven.api.di; + requires org.apache.maven.api.annotations; + + exports org.apache.maven.di; + exports org.apache.maven.di.impl; +} diff --git a/impl/maven-executor/pom.xml b/impl/maven-executor/pom.xml index c4712962ce..421c7c86f6 100644 --- a/impl/maven-executor/pom.xml +++ b/impl/maven-executor/pom.xml @@ -32,6 +32,7 @@ under the License. <description>Maven 4 Executor, for executing Maven 3/4.</description> <properties> + <javaModuleName>org.apache.maven.executor</javaModuleName> <maven3version>3.9.14</maven3version> <maven4version>${project.version}</maven4version> <testTmpDir>${project.build.directory}/tmp</testTmpDir> diff --git a/impl/maven-impl/pom.xml b/impl/maven-impl/pom.xml index e2005c800e..c67e09a47f 100644 --- a/impl/maven-impl/pom.xml +++ b/impl/maven-impl/pom.xml @@ -31,6 +31,7 @@ under the License. <description>Provides the implementation classes for the Maven API</description> <properties> + <javaModuleName>org.apache.maven.impl</javaModuleName> <!-- in: DefaultModelValidator, DefaultModelBuilder --> <checkstyle.violation.ignore>FileLength</checkstyle.violation.ignore> </properties> @@ -178,6 +179,7 @@ under the License. <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> + <useModulePath>false</useModulePath> <systemPropertyVariables> <localRepository>${settings.localRepository}</localRepository> </systemPropertyVariables> diff --git a/impl/maven-impl/src/main/java/module-info.java b/impl/maven-impl/src/main/java/module-info.java new file mode 100644 index 0000000000..435ea97740 --- /dev/null +++ b/impl/maven-impl/src/main/java/module-info.java @@ -0,0 +1,68 @@ +/* + * 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. + */ + +open module org.apache.maven.impl { + requires transitive org.apache.maven.api; + requires transitive org.apache.maven.api.spi; + requires org.apache.maven.api.metadata; + requires org.apache.maven.api.xml; + requires org.apache.maven.api.di; + requires org.apache.maven.api.annotations; + requires org.apache.maven.di; + requires org.apache.maven.support; + requires org.apache.maven.internal.xml; + requires org.apache.maven.resolver; + requires org.apache.maven.resolver.spi; + requires org.apache.maven.resolver.util; + requires org.apache.maven.resolver.impl; + requires org.apache.maven.resolver.named.locks; + requires org.apache.maven.resolver.connector.basic; + requires com.ctc.wstx; + requires org.codehaus.stax2; + requires org.slf4j; + requires plexus.sec.dispatcher; + requires java.xml; + + exports org.apache.maven.api.services.model; + exports org.apache.maven.impl; + exports org.apache.maven.impl.cache; + exports org.apache.maven.impl.di; + exports org.apache.maven.impl.model; + exports org.apache.maven.impl.model.profile; + exports org.apache.maven.impl.model.reflection; + exports org.apache.maven.impl.model.rootlocator; + exports org.apache.maven.impl.resolver; + exports org.apache.maven.impl.resolver.artifact; + exports org.apache.maven.impl.resolver.relocation; + exports org.apache.maven.impl.resolver.scopes; + exports org.apache.maven.impl.resolver.type; + exports org.apache.maven.impl.resolver.validator; + exports org.apache.maven.impl.standalone; + exports org.apache.maven.impl.util; + + uses org.apache.maven.api.services.model.RootDetector; + + provides org.apache.maven.api.model.ModelObjectProcessor with + org.apache.maven.impl.model.DefaultModelObjectPool; + provides org.apache.maven.api.services.model.RootDetector with + org.apache.maven.impl.model.rootlocator.DotMvnRootDetector, + org.apache.maven.impl.model.rootlocator.PomXmlRootDetector; + provides org.apache.maven.api.services.model.RootLocator with + org.apache.maven.impl.model.rootlocator.DefaultRootLocator; +} diff --git a/impl/maven-jline/pom.xml b/impl/maven-jline/pom.xml index 9ec3e9ae0c..197905ba11 100644 --- a/impl/maven-jline/pom.xml +++ b/impl/maven-jline/pom.xml @@ -30,6 +30,10 @@ under the License. <name>Maven 4 JLine integration</name> <description>Provides the JLine integration in Maven</description> + <properties> + <javaModuleName>org.apache.maven.jline</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/impl/maven-jline/src/main/java/module-info.java b/impl/maven-jline/src/main/java/module-info.java new file mode 100644 index 0000000000..7e372813bb --- /dev/null +++ b/impl/maven-jline/src/main/java/module-info.java @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +module org.apache.maven.jline { + requires org.apache.maven.api; + requires org.apache.maven.api.di; + requires org.apache.maven.api.annotations; + requires org.jline.reader; + requires org.jline.style; + requires org.jline.builtins; + requires org.jline.console; + requires org.jline.console.ui; + requires org.jline.terminal; + requires org.jline.terminal.jni; + requires static org.jline.terminal.ffm; + requires org.jline.jansi.core; + + exports org.apache.maven.jline; +} diff --git a/impl/maven-logging/pom.xml b/impl/maven-logging/pom.xml index 6f89f2bdbd..1b689acbc8 100644 --- a/impl/maven-logging/pom.xml +++ b/impl/maven-logging/pom.xml @@ -30,6 +30,10 @@ under the License. <name>Maven 4 Logging</name> <description>Provides the Maven Logging infrastructure</description> + <properties> + <javaModuleName>org.apache.maven.logging</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/impl/maven-logging/src/main/java/module-info.java b/impl/maven-logging/src/main/java/module-info.java new file mode 100644 index 0000000000..6baecd7e36 --- /dev/null +++ b/impl/maven-logging/src/main/java/module-info.java @@ -0,0 +1,30 @@ +/* + * 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.logging { + requires org.apache.maven.api; + requires org.apache.maven.jline; + requires org.slf4j; + + exports org.apache.maven.logging.api; + exports org.apache.maven.slf4j; + + provides org.slf4j.spi.SLF4JServiceProvider with + org.apache.maven.slf4j.MavenServiceProvider; +} diff --git a/impl/maven-support/pom.xml b/impl/maven-support/pom.xml index 65f1eb0a7c..1d732e8449 100644 --- a/impl/maven-support/pom.xml +++ b/impl/maven-support/pom.xml @@ -30,6 +30,10 @@ under the License. <name>Maven 4 Model Support</name> <description>Provides the Maven 4 Model Support</description> + <properties> + <javaModuleName>org.apache.maven.support</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> @@ -55,6 +59,14 @@ under the License. <groupId>org.apache.maven</groupId> <artifactId>maven-xml</artifactId> </dependency> + <dependency> + <groupId>com.fasterxml.woodstox</groupId> + <artifactId>woodstox-core</artifactId> + </dependency> + <dependency> + <groupId>org.codehaus.woodstox</groupId> + <artifactId>stax2-api</artifactId> + </dependency> <dependency> <groupId>org.junit.jupiter</groupId> diff --git a/impl/maven-support/src/main/java/module-info.java b/impl/maven-support/src/main/java/module-info.java new file mode 100644 index 0000000000..60eb75c4ae --- /dev/null +++ b/impl/maven-support/src/main/java/module-info.java @@ -0,0 +1,37 @@ +/* + * 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.support { + requires transitive org.apache.maven.api.model; + requires transitive org.apache.maven.api.settings; + requires transitive org.apache.maven.api.toolchain; + requires transitive org.apache.maven.api.metadata; + requires transitive org.apache.maven.api.plugin.descriptor; + requires transitive org.apache.maven.internal.xml; + requires java.xml; + requires com.ctc.wstx; + requires org.codehaus.stax2; + + exports org.apache.maven.model.v4; + exports org.apache.maven.settings.v4; + exports org.apache.maven.toolchain.v4; + exports org.apache.maven.metadata.v4; + exports org.apache.maven.plugin.descriptor.io; + exports org.apache.maven.plugin.lifecycle.io; +} diff --git a/impl/maven-testing/pom.xml b/impl/maven-testing/pom.xml index 4683a05adf..76438a593e 100644 --- a/impl/maven-testing/pom.xml +++ b/impl/maven-testing/pom.xml @@ -30,6 +30,10 @@ under the License. <name>Maven Plugin Testing Mechanism</name> <description>The Maven Plugin Testing Harness provides mechanisms to manage tests on Mojo.</description> + <properties> + <javaModuleName>org.apache.maven.testing</javaModuleName> + </properties> + <dependencies> <!-- maven --> <dependency> diff --git a/impl/maven-xml/pom.xml b/impl/maven-xml/pom.xml index fce318be3d..30021874c3 100644 --- a/impl/maven-xml/pom.xml +++ b/impl/maven-xml/pom.xml @@ -30,6 +30,10 @@ under the License. <name>Maven 4 XML Implementation</name> <description>Provides the implementation classes for the Maven XML</description> + <properties> + <javaModuleName>org.apache.maven.internal.xml</javaModuleName> + </properties> + <dependencies> <dependency> <groupId>org.apache.maven</groupId> diff --git a/impl/maven-xml/src/main/java/module-info.java b/impl/maven-xml/src/main/java/module-info.java new file mode 100644 index 0000000000..aae140dfbc --- /dev/null +++ b/impl/maven-xml/src/main/java/module-info.java @@ -0,0 +1,32 @@ +/* + * 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.internal.xml { + requires transitive org.apache.maven.api.xml; + requires java.xml; + requires com.ctc.wstx; + requires org.codehaus.stax2; + requires static org.eclipse.sisu.plexus; + requires static plexus.xml; + + exports org.apache.maven.internal.xml; + + provides org.apache.maven.api.xml.XmlService with + org.apache.maven.internal.xml.DefaultXmlService; +} diff --git a/pom.xml b/pom.xml index 08260706e3..ce9451fcf4 100644 --- a/pom.xml +++ b/pom.xml @@ -804,6 +804,17 @@ under the License. </dependency> </dependencies> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <configuration> + <archive> + <manifestEntries> + <Automatic-Module-Name>${javaModuleName}</Automatic-Module-Name> + </manifestEntries> + </archive> + </configuration> + </plugin> <plugin> <groupId>org.apache.rat</groupId> <artifactId>apache-rat-plugin</artifactId>
