elharo commented on code in PR #642: URL: https://github.com/apache/maven-site/pull/642#discussion_r1921065342
########## content/markdown/guides/mini/guide-naming-conventions.md: ########## @@ -0,0 +1,124 @@ +<!-- +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. +--> + +<head> + <title>Naming conventions of Maven coordinates (groupId, artifactId, and version)</title> +</head> + +# Naming convention of Maven coordinates + +So that Maven can identify and utilise any artifact (e.g. a `.jar` file), this artifact must be identifiable through a +unique combination of three identifiers. +This combination is called the "[Maven coordinates][4]". +Maven coordinates consist of a project group identifier named `groupId`, an artifact identifier named `artifactId`, and +the version identifier named `version`. + +This document defines the naming conventions of Maven coordinates. + +You should follow this convention whenever you create a new artifact. + +## Project group identifier + +When projects of the same organization are topically related, we say they belong to the same "project group". +The `groupId` uniquely identifies a project group across all other groups. +Each `groupId` should follow [Java's package name rules][1]. +This means it starts with a reversed domain name you control. + +Examples + +``` +org.apache.maven +org.apache.commons Review Comment: can we add a non-Apache example here? E,g. com.google.guava ########## content/markdown/guides/mini/guide-naming-conventions.md: ########## @@ -0,0 +1,124 @@ +<!-- +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. +--> + +<head> + <title>Naming conventions of Maven coordinates (groupId, artifactId, and version)</title> +</head> + +# Naming convention of Maven coordinates + +So that Maven can identify and utilise any artifact (e.g. a `.jar` file), this artifact must be identifiable through a +unique combination of three identifiers. +This combination is called the "[Maven coordinates][4]". +Maven coordinates consist of a project group identifier named `groupId`, an artifact identifier named `artifactId`, and +the version identifier named `version`. + +This document defines the naming conventions of Maven coordinates. + +You should follow this convention whenever you create a new artifact. + +## Project group identifier + +When projects of the same organization are topically related, we say they belong to the same "project group". +The `groupId` uniquely identifies a project group across all other groups. +Each `groupId` should follow [Java's package name rules][1]. +This means it starts with a reversed domain name you control. + +Examples + +``` +org.apache.maven +org.apache.commons +``` + +There are many legacy projects that do not follow this convention and instead use single word group IDs. +However, it will be difficult to get a new single word group ID approved for inclusion in the Maven Central repository. + +You can create as many subgroups as you want. +A good way to determine the granularity of the `groupId` is to look at the project group's structure. +If there are multiple projects of the same topic or type, e.g. plugins, those may be grouped in a subgroup. +Each subgroup should append a new identifier to the parent's `groupId`. + +Example + +``` +// Parent project group +org.apache.maven + +// Subgroups +org.apache.maven.plugins +org.apache.maven.reporting +``` + +## Artifact identifier + +The `artifactId` is the name of the artifact and therefore should describe the artifacts content. +The identifiers should only consist of *lowercase* letters, digits, and hyphens. + +Examples + +``` +commons-math +maven-clean-plugin +``` + +## Version identifier + +We recommend that the `version` follows the rules of [Semantic Versioning 1.0.0][2]. +It should start with the major version, followed by the minor version and the patch version. +All three are numeric, separated by a dot. + +Examples + +``` +1.0.0 +2.3.2 +3.5.42 +``` + +You can add labels for pre-releases or build metadata after the patch version. +Avoid using dates in those labels, because they are usually associated with unstable versions (see below). + +Examples + +``` +// Pre-releases +1.0.0-beta +1.0.0-M1 +1.0.0-rc2 + +// Build metadata +1.2.3+dfc0c87 +2.3.4+15433 +``` + +### Unstable versions (SNAPSHOT) + +The "latest" code on a development branch might change. Review Comment: I don't think this is quite what snapshots are. I suggest replacing this paragraph with something along the lines of SNAPSHOTs are artifacts built in between releases. They may be built from a particular commit or from code that isn't even committed to the source repository. Usually the snapshot has the version of the next anticipated release followed by -SNAPSHOT. Unlike release versions, snapshot artifacts can and do change over time. They are a snapshot of the project at a particular point in time, generally used for testing. ########## content/markdown/guides/mini/guide-naming-conventions.md: ########## @@ -50,17 +51,17 @@ There are many legacy projects that do not follow this convention and instead us However, it will be difficult to get a new single word group ID approved for inclusion in the Maven Central repository. You can create as many subgroups as you want. -A good way to determine the granularity of the `groupId` is to use the project structure. -If the current project contains multiple subprojects, each subproject should append a new identifier to the parent's -`groupId`. +A good way to determine the granularity of the `groupId` is to look at the project group's structure. Review Comment: This seems fine to me. ########## content/markdown/guides/mini/guide-naming-conventions.md: ########## @@ -0,0 +1,124 @@ +<!-- +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. +--> + +<head> + <title>Naming conventions of Maven coordinates (groupId, artifactId, and version)</title> +</head> + +# Naming convention of Maven coordinates + +So that Maven can identify and utilise any artifact (e.g. a `.jar` file), this artifact must be identifiable through a +unique combination of three identifiers. +This combination is called the "[Maven coordinates][4]". +Maven coordinates consist of a project group identifier named `groupId`, an artifact identifier named `artifactId`, and +the version identifier named `version`. + +This document defines the naming conventions of Maven coordinates. + +You should follow this convention whenever you create a new artifact. + +## Project group identifier + +When projects of the same organization are topically related, we say they belong to the same "project group". +The `groupId` uniquely identifies a project group across all other groups. +Each `groupId` should follow [Java's package name rules][1]. +This means it starts with a reversed domain name you control. + +Examples + +``` +org.apache.maven +org.apache.commons +``` + +There are many legacy projects that do not follow this convention and instead use single word group IDs. +However, it will be difficult to get a new single word group ID approved for inclusion in the Maven Central repository. + +You can create as many subgroups as you want. +A good way to determine the granularity of the `groupId` is to look at the project group's structure. +If there are multiple projects of the same topic or type, e.g. plugins, those may be grouped in a subgroup. +Each subgroup should append a new identifier to the parent's `groupId`. + +Example + +``` +// Parent project group +org.apache.maven + +// Subgroups +org.apache.maven.plugins +org.apache.maven.reporting +``` + +## Artifact identifier + +The `artifactId` is the name of the artifact and therefore should describe the artifacts content. Review Comment: Perhaps delete "and therefore should describe the artifacts content". Siometimes it's just a name. E.g. jaxen, xom, and guava are all artifact IDs that don't really describe anything. But if you keep this artifacts --> artifact's ########## content/markdown/guides/mini/guide-naming-conventions.md: ########## @@ -0,0 +1,124 @@ +<!-- +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. +--> + +<head> + <title>Naming conventions of Maven coordinates (groupId, artifactId, and version)</title> +</head> + +# Naming convention of Maven coordinates + +So that Maven can identify and utilise any artifact (e.g. a `.jar` file), this artifact must be identifiable through a +unique combination of three identifiers. +This combination is called the "[Maven coordinates][4]". +Maven coordinates consist of a project group identifier named `groupId`, an artifact identifier named `artifactId`, and +the version identifier named `version`. + +This document defines the naming conventions of Maven coordinates. + +You should follow this convention whenever you create a new artifact. + +## Project group identifier + +When projects of the same organization are topically related, we say they belong to the same "project group". +The `groupId` uniquely identifies a project group across all other groups. +Each `groupId` should follow [Java's package name rules][1]. +This means it starts with a reversed domain name you control. + +Examples + +``` +org.apache.maven +org.apache.commons +``` + +There are many legacy projects that do not follow this convention and instead use single word group IDs. +However, it will be difficult to get a new single word group ID approved for inclusion in the Maven Central repository. + +You can create as many subgroups as you want. +A good way to determine the granularity of the `groupId` is to look at the project group's structure. +If there are multiple projects of the same topic or type, e.g. plugins, those may be grouped in a subgroup. +Each subgroup should append a new identifier to the parent's `groupId`. + +Example + +``` +// Parent project group +org.apache.maven + +// Subgroups +org.apache.maven.plugins +org.apache.maven.reporting +``` + +## Artifact identifier + +The `artifactId` is the name of the artifact and therefore should describe the artifacts content. +The identifiers should only consist of *lowercase* letters, digits, and hyphens. + +Examples + +``` +commons-math +maven-clean-plugin +``` + +## Version identifier + +We recommend that the `version` follows the rules of [Semantic Versioning 1.0.0][2]. Review Comment: follows --> follow ########## content/markdown/guides/mini/guide-naming-conventions.md: ########## @@ -0,0 +1,124 @@ +<!-- +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. +--> + +<head> + <title>Naming conventions of Maven coordinates (groupId, artifactId, and version)</title> +</head> + +# Naming convention of Maven coordinates + +So that Maven can identify and utilise any artifact (e.g. a `.jar` file), this artifact must be identifiable through a +unique combination of three identifiers. +This combination is called the "[Maven coordinates][4]". +Maven coordinates consist of a project group identifier named `groupId`, an artifact identifier named `artifactId`, and +the version identifier named `version`. + +This document defines the naming conventions of Maven coordinates. + +You should follow this convention whenever you create a new artifact. + +## Project group identifier + +When projects of the same organization are topically related, we say they belong to the same "project group". Review Comment: This is good. I like this. ########## content/markdown/guides/mini/guide-naming-conventions.md: ########## @@ -0,0 +1,124 @@ +<!-- +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. +--> + +<head> + <title>Naming conventions of Maven coordinates (groupId, artifactId, and version)</title> +</head> + +# Naming convention of Maven coordinates + +So that Maven can identify and utilise any artifact (e.g. a `.jar` file), this artifact must be identifiable through a +unique combination of three identifiers. +This combination is called the "[Maven coordinates][4]". +Maven coordinates consist of a project group identifier named `groupId`, an artifact identifier named `artifactId`, and +the version identifier named `version`. + +This document defines the naming conventions of Maven coordinates. + +You should follow this convention whenever you create a new artifact. + +## Project group identifier + +When projects of the same organization are topically related, we say they belong to the same "project group". +The `groupId` uniquely identifies a project group across all other groups. +Each `groupId` should follow [Java's package name rules][1]. +This means it starts with a reversed domain name you control. + +Examples + +``` +org.apache.maven +org.apache.commons +``` + +There are many legacy projects that do not follow this convention and instead use single word group IDs. +However, it will be difficult to get a new single word group ID approved for inclusion in the Maven Central repository. + +You can create as many subgroups as you want. +A good way to determine the granularity of the `groupId` is to look at the project group's structure. +If there are multiple projects of the same topic or type, e.g. plugins, those may be grouped in a subgroup. +Each subgroup should append a new identifier to the parent's `groupId`. + +Example + +``` +// Parent project group +org.apache.maven + +// Subgroups +org.apache.maven.plugins +org.apache.maven.reporting +``` + +## Artifact identifier + +The `artifactId` is the name of the artifact and therefore should describe the artifacts content. +The identifiers should only consist of *lowercase* letters, digits, and hyphens. + +Examples + +``` +commons-math +maven-clean-plugin +``` + +## Version identifier + +We recommend that the `version` follows the rules of [Semantic Versioning 1.0.0][2]. +It should start with the major version, followed by the minor version and the patch version. +All three are numeric, separated by a dot. + +Examples + +``` +1.0.0 +2.3.2 +3.5.42 +``` + +You can add labels for pre-releases or build metadata after the patch version. +Avoid using dates in those labels, because they are usually associated with unstable versions (see below). Review Comment: delete "(see below)" -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
