From 656bc2ae9e4d248ec9fa21f4dcbe1ae5a0f10b8d Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Tue, 4 Mar 2025 11:06:37 +0100 Subject: [PATCH 1/2] Add javadoc for all o.a.m.api packages --- .../api/cli/extensions/package-info.java | 34 ++++++++++++++ .../maven/api/cli/logging/package-info.java | 34 ++++++++++++++ .../maven/api/cli/mvn/package-info.java | 38 ++++++++++++++++ .../maven/api/cli/mvnenc/package-info.java | 37 ++++++++++++++++ .../maven/api/cli/mvnsh/package-info.java | 39 ++++++++++++++++ .../apache/maven/api/cli/package-info.java | 44 +++++++++++++++++++ .../maven/api/feature/package-info.java | 27 ++++++++++++ .../org/apache/maven/api/package-info.java | 18 +++++++- .../api/plugin/annotations/package-info.java | 20 ++++++++- .../apache/maven/api/plugin/package-info.java | 20 ++++++++- .../maven/api/services/package-info.java | 27 ++++++++++++ .../maven/api/services/xml/package-info.java | 27 ++++++++++++ .../maven/api/metadata/package-info.java | 20 ++++++++- .../apache/maven/api/model/package-info.java | 20 ++++++++- .../api/plugin/annotations/package-info.java | 27 ++++++++++++ .../descriptor/lifecycle/package-info.java | 25 ++++++++++- .../api/plugin/descriptor/package-info.java | 26 ++++++++++- api/maven-api-settings/pom.xml | 27 ++++++++++++ .../maven/api/settings/package-info.java | 27 ++++++++++++ .../apache/maven/api/spi/package-info.java | 27 ++++++++++++ api/maven-api-toolchain/pom.xml | 28 ++++++++++++ .../maven/api/toolchain/package-info.java | 9 ++++ .../apache/maven/api/xml/package-info.java | 26 ++++++++++- 23 files changed, 616 insertions(+), 11 deletions(-) create mode 100644 api/maven-api-cli/src/main/java/org/apache/maven/api/cli/extensions/package-info.java create mode 100644 api/maven-api-cli/src/main/java/org/apache/maven/api/cli/logging/package-info.java create mode 100644 api/maven-api-cli/src/main/java/org/apache/maven/api/cli/mvn/package-info.java create mode 100644 api/maven-api-cli/src/main/java/org/apache/maven/api/cli/mvnenc/package-info.java create mode 100644 api/maven-api-cli/src/main/java/org/apache/maven/api/cli/mvnsh/package-info.java create mode 100644 api/maven-api-cli/src/main/java/org/apache/maven/api/cli/package-info.java create mode 100644 api/maven-api-core/src/main/java/org/apache/maven/api/feature/package-info.java create mode 100644 api/maven-api-core/src/main/java/org/apache/maven/api/services/package-info.java create mode 100644 api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/package-info.java create mode 100644 api/maven-api-plugin/src/main/java/org/apache/maven/api/plugin/annotations/package-info.java create mode 100644 api/maven-api-settings/src/main/java/org/apache/maven/api/settings/package-info.java create mode 100644 api/maven-api-spi/src/main/java/org/apache/maven/api/spi/package-info.java create mode 100644 api/maven-api-toolchain/src/main/java/org/apache/maven/api/toolchain/package-info.java diff --git a/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/extensions/package-info.java b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/extensions/package-info.java new file mode 100644 index 000000000000..7b4aafe562cf --- /dev/null +++ b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/extensions/package-info.java @@ -0,0 +1,34 @@ +/* + * 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. + */ + +/** + * Provides support for Maven core extensions configuration and management. + * Core extensions can be configured through {@code .mvn/extensions.xml} in the project + * base directory to enhance Maven's capabilities during build execution. + * + *

This package contains classes for:

+ * + * + * @since 4.0.0 + */ +package org.apache.maven.api.cli.extensions; diff --git a/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/logging/package-info.java b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/logging/package-info.java new file mode 100644 index 000000000000..e2db461d8836 --- /dev/null +++ b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/logging/package-info.java @@ -0,0 +1,34 @@ +/* + * 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. + */ + +/** + * Provides early-stage logging capabilities for Maven CLI operations. + * These logging facilities are used during Maven startup before the full logging + * system is initialized. + * + *

This package includes:

+ * + * + * @since 4.0.0 + */ +package org.apache.maven.api.cli.logging; diff --git a/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/mvn/package-info.java b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/mvn/package-info.java new file mode 100644 index 000000000000..dd191227d125 --- /dev/null +++ b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/mvn/package-info.java @@ -0,0 +1,38 @@ +/* + * 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. + */ + +/** + * Provides the API for the Maven build tool ({@code mvn}). + * + *

This package contains interfaces and classes specific to the main Maven build + * tool, which is responsible for project build lifecycle execution and dependency management.

+ * + *

Key features include:

+ * + * + * @see org.apache.maven.api.cli.Tools#MVN_CMD + * @see org.apache.maven.api.cli.Tools#MVN_NAME + * @since 4.0.0 + */ +package org.apache.maven.api.cli.mvn; diff --git a/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/mvnenc/package-info.java b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/mvnenc/package-info.java new file mode 100644 index 000000000000..992b6aa38a55 --- /dev/null +++ b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/mvnenc/package-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. + */ + +/** + * Provides the API for the Maven Password Encryption tool ({@code mvnenc}). + * + *

This package contains interfaces and classes for the password encryption tool, + * which helps secure sensitive information in Maven settings and configuration files.

+ * + *

Key features include:

+ * + * + * @see org.apache.maven.api.cli.Tools#MVNENC_CMD + * @see org.apache.maven.api.cli.Tools#MVNENC_NAME + * @since 4.0.0 + */ +package org.apache.maven.api.cli.mvnenc; diff --git a/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/mvnsh/package-info.java b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/mvnsh/package-info.java new file mode 100644 index 000000000000..571925645555 --- /dev/null +++ b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/mvnsh/package-info.java @@ -0,0 +1,39 @@ +/* + * 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. + */ + +/** + * Provides the API for the Maven Shell tool ({@code mvnsh}). + * + *

This package contains interfaces and classes for the interactive Maven shell, + * which provides a command-line interface for executing Maven commands and + * managing build environments.

+ * + *

Key features include:

+ * + * + * @see org.apache.maven.api.cli.Tools#MVNSHELL_CMD + * @see org.apache.maven.api.cli.Tools#MVNSHELL_NAME + * @since 4.0.0 + */ +package org.apache.maven.api.cli.mvnsh; diff --git a/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/package-info.java b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/package-info.java new file mode 100644 index 000000000000..c94bbe0a1006 --- /dev/null +++ b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/package-info.java @@ -0,0 +1,44 @@ +/* + * 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. + */ + +/** + * Provides the API for Maven's command-line interface and tools. + * + *

This package contains interfaces and classes for:

+ * + * + *

The main components are:

+ * + * + *

Core extensions can be configured through {@code .mvn/extensions.xml} in the project base directory + * to enhance Maven's capabilities during build execution.

+ * + * @since 4.0.0 + */ +package org.apache.maven.api.cli; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/feature/package-info.java b/api/maven-api-core/src/main/java/org/apache/maven/api/feature/package-info.java new file mode 100644 index 000000000000..b56f01bbd565 --- /dev/null +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/feature/package-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. + */ + +/** + * Provides feature flag management and configuration capabilities for Maven core functionality. + * This package allows for controlled enablement and management of Maven features across + * different execution contexts and environments. + * + * @since 4.0.0 + */ +package org.apache.maven.api.feature; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/package-info.java b/api/maven-api-core/src/main/java/org/apache/maven/api/package-info.java index 8addcd57cae5..5e00209eeae6 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/package-info.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/package-info.java @@ -20,6 +20,21 @@ /** *

Maven Core API

* + *

Session

+ * + *

The {@link org.apache.maven.api.Session} interface is the main entry point for Maven operations. + * It maintains the state of a Maven execution and provides access to all core services and components. + * Sessions are thread-safe and can be obtained in session-scoped components using the + * {@link org.apache.maven.api.di.SessionScoped} annotation.

+ * + *

Key capabilities provided through the Session include:

+ * + * *

Dependency management

* *

{@link org.apache.maven.api.ArtifactCoordinates} instances are used to locate artifacts in a repository. @@ -30,7 +45,8 @@ * They are created when resolving an {@code ArtifactCoordinates}. Resolving is the process * that selects a particular version and downloads the artifact in the local repository. * There are two sub-interfaces, {@link org.apache.maven.api.DownloadedArtifact} which is used when - * an artifact has been resolved

+ * an artifact has been resolved and {@link org.apache.maven.api.ProducedArtifact} which is used when + * an artifact is being produced by a project.

* *

{@link org.apache.maven.api.DependencyCoordinates} instances are used to express a dependency. * They are a {@code ArtifactCoordinates} completed with information about how the artifact will be used: diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/package-info.java b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/package-info.java index 5a4ed7d59d4b..14d2c7a2ef1c 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/package-info.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/package-info.java @@ -1,4 +1,22 @@ -// CHECKSTYLE_OFF: RegexpHeader +/* + * 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. + */ + /** * Maven Plugin Annotations. */ diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/package-info.java b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/package-info.java index 1aaa794cbd1a..1bed56a81bfe 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/package-info.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/package-info.java @@ -1,4 +1,22 @@ -// CHECKSTYLE_OFF: RegexpHeader +/* + * 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. + */ + /** * Maven Plugin API. */ diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/package-info.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/package-info.java new file mode 100644 index 000000000000..228ba1c49076 --- /dev/null +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/package-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. + */ + +/** + * Defines core service interfaces that provide essential Maven functionality such as + * artifact resolution, dependency management, and build execution. These services + * form the backbone of Maven's extensible architecture. + * + * @since 4.0.0 + */ +package org.apache.maven.api.services; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/package-info.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/package-info.java new file mode 100644 index 000000000000..f3aea327ef20 --- /dev/null +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/package-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. + */ + +/** + * Provides XML-specific services for reading and writing Maven's configuration files + * and descriptors. These services handle XML parsing, transformation, and serialization + * while maintaining Maven's model integrity. + * + * @since 4.0.0 + */ +package org.apache.maven.api.services.xml; diff --git a/api/maven-api-metadata/src/main/java/org/apache/maven/api/metadata/package-info.java b/api/maven-api-metadata/src/main/java/org/apache/maven/api/metadata/package-info.java index 68e28d951cf6..b53290b18c2a 100644 --- a/api/maven-api-metadata/src/main/java/org/apache/maven/api/metadata/package-info.java +++ b/api/maven-api-metadata/src/main/java/org/apache/maven/api/metadata/package-info.java @@ -1,4 +1,22 @@ -// CHECKSTYLE_OFF: RegexpHeader +/* + * 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. + */ + /** * Maven Repository Metadata model. */ diff --git a/api/maven-api-model/src/main/java/org/apache/maven/api/model/package-info.java b/api/maven-api-model/src/main/java/org/apache/maven/api/model/package-info.java index 3c1c61e2130b..b74e0ef3b590 100644 --- a/api/maven-api-model/src/main/java/org/apache/maven/api/model/package-info.java +++ b/api/maven-api-model/src/main/java/org/apache/maven/api/model/package-info.java @@ -1,4 +1,22 @@ -// CHECKSTYLE_OFF: RegexpHeader +/* + * 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. + */ + /** * Maven Immutable POM (Project Object Model) classes, generated from maven.mdo model. * The root class is {@link org.apache.maven.api.model.Model}. diff --git a/api/maven-api-plugin/src/main/java/org/apache/maven/api/plugin/annotations/package-info.java b/api/maven-api-plugin/src/main/java/org/apache/maven/api/plugin/annotations/package-info.java new file mode 100644 index 000000000000..28a7936fed4c --- /dev/null +++ b/api/maven-api-plugin/src/main/java/org/apache/maven/api/plugin/annotations/package-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. + */ + +/** + * Provides annotations for Maven plugin development, including mojo configuration, + * parameter definitions, and lifecycle bindings. These annotations are used to + * generate plugin descriptors and configure plugin behavior. + * + * @since 4.0.0 + */ +package org.apache.maven.api.plugin.annotations; diff --git a/api/maven-api-plugin/src/main/java/org/apache/maven/api/plugin/descriptor/lifecycle/package-info.java b/api/maven-api-plugin/src/main/java/org/apache/maven/api/plugin/descriptor/lifecycle/package-info.java index eec9c505362c..800376de87fc 100644 --- a/api/maven-api-plugin/src/main/java/org/apache/maven/api/plugin/descriptor/lifecycle/package-info.java +++ b/api/maven-api-plugin/src/main/java/org/apache/maven/api/plugin/descriptor/lifecycle/package-info.java @@ -1,5 +1,26 @@ -// CHECKSTYLE_OFF: RegexpHeader +/* + * 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. + */ + /** - * Maven Plugin forked lifecycle model. + * Contains classes for managing plugin-specific lifecycle bindings and forked executions. + * This package helps define how plugins can modify or extend Maven's build lifecycle. + * + * @since 4.0.0 */ package org.apache.maven.api.plugin.descriptor.lifecycle; diff --git a/api/maven-api-plugin/src/main/java/org/apache/maven/api/plugin/descriptor/package-info.java b/api/maven-api-plugin/src/main/java/org/apache/maven/api/plugin/descriptor/package-info.java index 0435496d0b46..63d55f5447b8 100644 --- a/api/maven-api-plugin/src/main/java/org/apache/maven/api/plugin/descriptor/package-info.java +++ b/api/maven-api-plugin/src/main/java/org/apache/maven/api/plugin/descriptor/package-info.java @@ -1,5 +1,27 @@ -// CHECKSTYLE_OFF: RegexpHeader +/* + * 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. + */ + /** - * Maven Plugin descriptor model. + * Provides classes for Maven plugin descriptors that define plugin metadata, configuration, + * and execution parameters. These descriptors are typically stored in plugin.xml files + * within the META-INF/maven directory of plugin JARs. + * + * @since 4.0.0 */ package org.apache.maven.api.plugin.descriptor; diff --git a/api/maven-api-settings/pom.xml b/api/maven-api-settings/pom.xml index cb6298b4251e..875efd19dc73 100644 --- a/api/maven-api-settings/pom.xml +++ b/api/maven-api-settings/pom.xml @@ -80,7 +80,34 @@ under the License. + + org.apache.maven.plugins + maven-compiler-plugin + + + **/package-info.java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + **/package-info.java + + + **/*.java + + false + true + + + + diff --git a/api/maven-api-settings/src/main/java/org/apache/maven/api/settings/package-info.java b/api/maven-api-settings/src/main/java/org/apache/maven/api/settings/package-info.java new file mode 100644 index 000000000000..14782d443861 --- /dev/null +++ b/api/maven-api-settings/src/main/java/org/apache/maven/api/settings/package-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. + */ + +/** + * Contains classes for managing Maven settings, including global and user-specific + * configuration stored in settings.xml files. These settings control repository access, + * authentication, proxies, and other Maven runtime behaviors. + * + * @since 4.0.0 + */ +package org.apache.maven.api.settings; diff --git a/api/maven-api-spi/src/main/java/org/apache/maven/api/spi/package-info.java b/api/maven-api-spi/src/main/java/org/apache/maven/api/spi/package-info.java new file mode 100644 index 000000000000..6a4748fa010a --- /dev/null +++ b/api/maven-api-spi/src/main/java/org/apache/maven/api/spi/package-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. + */ + +/** + * Defines the Service Provider Interface (SPI) for Maven extensions, allowing + * third-party implementations to extend and customize Maven's core functionality + * through a stable, versioned API. + * + * @since 4.0.0 + */ +package org.apache.maven.api.spi; diff --git a/api/maven-api-toolchain/pom.xml b/api/maven-api-toolchain/pom.xml index e02a59128110..71177b153003 100644 --- a/api/maven-api-toolchain/pom.xml +++ b/api/maven-api-toolchain/pom.xml @@ -74,7 +74,35 @@ under the License. + + org.apache.maven.plugins + maven-compiler-plugin + + + **/package-info.java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + **/package-info.java + + + **/*.java + + false + true + + + + + diff --git a/api/maven-api-toolchain/src/main/java/org/apache/maven/api/toolchain/package-info.java b/api/maven-api-toolchain/src/main/java/org/apache/maven/api/toolchain/package-info.java new file mode 100644 index 000000000000..04661e78d20e --- /dev/null +++ b/api/maven-api-toolchain/src/main/java/org/apache/maven/api/toolchain/package-info.java @@ -0,0 +1,9 @@ +// CHECKSTYLE_OFF: RegexpHeader +/** + * Provides classes for managing Maven toolchains, which allow projects to use specific + * tool installations (like JDKs, compilers, or other build tools) across different + * environments without hardcoding paths. + * + * @since 4.0.0 + */ +package org.apache.maven.api.toolchain; diff --git a/api/maven-api-xml/src/main/java/org/apache/maven/api/xml/package-info.java b/api/maven-api-xml/src/main/java/org/apache/maven/api/xml/package-info.java index db25d3a153a7..11ecfc229838 100644 --- a/api/maven-api-xml/src/main/java/org/apache/maven/api/xml/package-info.java +++ b/api/maven-api-xml/src/main/java/org/apache/maven/api/xml/package-info.java @@ -1,5 +1,27 @@ -// CHECKSTYLE_OFF: RegexpHeader +/* + * 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. + */ + /** - * Maven immutable XML api. + * Provides an immutable XML processing API for Maven, offering classes and interfaces + * for reading, manipulating, and writing XML documents in a thread-safe manner. + * This package is used extensively for POM, settings, and other Maven configuration files. + * + * @since 4.0.0 */ package org.apache.maven.api.xml; From dbe5f3df473c23b763f96869150ec712b5c573b1 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Tue, 4 Mar 2025 15:15:41 +0100 Subject: [PATCH 2/2] Fix after review --- .../main/java/org/apache/maven/api/feature/package-info.java | 2 -- .../src/main/java/org/apache/maven/api/package-info.java | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/feature/package-info.java b/api/maven-api-core/src/main/java/org/apache/maven/api/feature/package-info.java index b56f01bbd565..b10b38ad3cc3 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/feature/package-info.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/feature/package-info.java @@ -19,8 +19,6 @@ /** * Provides feature flag management and configuration capabilities for Maven core functionality. - * This package allows for controlled enablement and management of Maven features across - * different execution contexts and environments. * * @since 4.0.0 */ diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/package-info.java b/api/maven-api-core/src/main/java/org/apache/maven/api/package-info.java index 5e00209eeae6..5f85ff9ad15b 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/package-info.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/package-info.java @@ -44,8 +44,8 @@ *

{@link org.apache.maven.api.Artifact} instances are the pointed artifacts in the repository. * They are created when resolving an {@code ArtifactCoordinates}. Resolving is the process * that selects a particular version and downloads the artifact in the local repository. - * There are two sub-interfaces, {@link org.apache.maven.api.DownloadedArtifact} which is used when - * an artifact has been resolved and {@link org.apache.maven.api.ProducedArtifact} which is used when + * The {@link org.apache.maven.api.DownloadedArtifact} sub-interface is used when + * an artifact has been resolved and {@link org.apache.maven.api.ProducedArtifact} when * an artifact is being produced by a project.

* *

{@link org.apache.maven.api.DependencyCoordinates} instances are used to express a dependency.