Skip to content

Commit 06045e0

Browse files
gnodetclaude
andcommitted
[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 17 remaining modules. Only org.apache.maven.api.* packages are public API. All implementation packages use qualified exports restricted to internal consumers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4bffb2a commit 06045e0

53 files changed

Lines changed: 829 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/maven-api-annotations/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,8 @@
3030
<name>Maven 4 API :: Meta annotations</name>
3131
<description>Maven 4 API - Java meta annotations.</description>
3232

33+
<properties>
34+
<javaModuleName>org.apache.maven.api.annotations</javaModuleName>
35+
</properties>
36+
3337
</project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
module org.apache.maven.api.annotations {
21+
exports org.apache.maven.api.annotations;
22+
}

api/maven-api-cli/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
<name>Maven 4 API :: CLI</name>
3131
<description>Maven 4 API - CLI.</description>
3232

33+
<properties>
34+
<javaModuleName>org.apache.maven.api.cli</javaModuleName>
35+
</properties>
36+
3337
<dependencies>
3438
<dependency>
3539
<groupId>org.apache.maven</groupId>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
module org.apache.maven.api.cli {
21+
requires transitive org.apache.maven.api;
22+
requires transitive org.apache.maven.api.annotations;
23+
requires transitive org.apache.maven.api.xml;
24+
25+
exports org.apache.maven.api.cli;
26+
exports org.apache.maven.api.cli.cisupport;
27+
exports org.apache.maven.api.cli.extensions;
28+
exports org.apache.maven.api.cli.logging;
29+
exports org.apache.maven.api.cli.mvn;
30+
exports org.apache.maven.api.cli.mvnenc;
31+
exports org.apache.maven.api.cli.mvnsh;
32+
exports org.apache.maven.api.cli.mvnup;
33+
}

api/maven-api-core/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
<name>Maven 4 API :: Core</name>
3131
<description>Maven 4 API - Maven Core API</description>
3232

33+
<properties>
34+
<javaModuleName>org.apache.maven.api</javaModuleName>
35+
</properties>
36+
3337
<dependencies>
3438
<dependency>
3539
<groupId>org.apache.maven</groupId>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
module org.apache.maven.api {
21+
requires transitive org.apache.maven.api.annotations;
22+
requires transitive org.apache.maven.api.di;
23+
requires transitive org.apache.maven.api.model;
24+
requires transitive org.apache.maven.api.settings;
25+
requires transitive org.apache.maven.api.toolchain;
26+
requires transitive org.apache.maven.api.plugin.descriptor;
27+
requires transitive org.apache.maven.api.xml;
28+
requires java.compiler;
29+
30+
exports org.apache.maven.api;
31+
exports org.apache.maven.api.cache;
32+
exports org.apache.maven.api.feature;
33+
exports org.apache.maven.api.plugin;
34+
exports org.apache.maven.api.plugin.annotations;
35+
exports org.apache.maven.api.services;
36+
exports org.apache.maven.api.services.xml;
37+
}

api/maven-api-di/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<description>Maven 4 API - Dependency Injection</description>
3232

3333
<properties>
34+
<javaModuleName>org.apache.maven.api.di</javaModuleName>
3435
<maven.compiler.proc>none</maven.compiler.proc>
3536
</properties>
3637
</project>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
module org.apache.maven.api.di {
21+
exports org.apache.maven.api.di;
22+
exports org.apache.maven.di.tool;
23+
24+
requires java.compiler;
25+
26+
provides javax.annotation.processing.Processor with
27+
org.apache.maven.di.tool.DiIndexProcessor;
28+
}

api/maven-api-metadata/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ under the License.
3131
<name>Maven 4 API :: Repository Metadata</name>
3232
<description>Maven 4 API - Immutable Repository Metadata model.</description>
3333

34+
<properties>
35+
<javaModuleName>org.apache.maven.api.metadata</javaModuleName>
36+
</properties>
37+
3438
<dependencies>
3539
<dependency>
3640
<groupId>org.apache.maven</groupId>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
module org.apache.maven.api.metadata {
21+
requires transitive org.apache.maven.api.annotations;
22+
23+
exports org.apache.maven.api.metadata;
24+
}

0 commit comments

Comments
 (0)