You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2022/02/03 07:09:44 UTC
[maven-site] 01/07: Initial draft layout
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch maven-repository-layout
in repository https://gitbox.apache.org/repos/asf/maven-site.git
commit 1df2dadda847df8e153e829eef7fd294a901e1dd
Author: Tamas Cservenak <ta...@cservenak.net>
AuthorDate: Wed Jan 19 15:10:37 2022 +0100
Initial draft layout
---
content/markdown/repositories/index.md | 32 ++++++++++++++++++++++++++++++++
content/markdown/repositories/layout.md | 31 +++++++++++++++++++++++++++++++
content/markdown/repositories/local.md | 23 +++++++++++++++++++++++
content/markdown/repositories/remote.md | 23 +++++++++++++++++++++++
content/site.xml | 7 ++++++-
5 files changed, 115 insertions(+), 1 deletion(-)
diff --git a/content/markdown/repositories/index.md b/content/markdown/repositories/index.md
new file mode 100644
index 0000000..451af35
--- /dev/null
+++ b/content/markdown/repositories/index.md
@@ -0,0 +1,32 @@
+# Maven Repositories
+
+<!--
+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.
+-->
+
+Apache Maven uses repositories to store build artifacts. Your dependencies are being downloaded from repositories,
+and your built artifacts are being stored (installed, uploaded) into repositories as well. This is one of the
+fundamental concept of Maven since its inception: Maven command line tool and Maven Repositories were mold together
+and developed since inception of Maven project itself.
+
+Maven addresses artifacts using coordinates, that are most often represented as `groupId`:`artifactId`:`version`,
+or GAV in short (or informally). The artifact coordinates uniquely describes the artifact you are referring to, but
+does not tells anything about its source (or origin). It is up to Maven to figure out (or you to tell Maven how
+to figure it out).
+
+Maven in general operates with one local repository and one or more remote repositories.
\ No newline at end of file
diff --git a/content/markdown/repositories/layout.md b/content/markdown/repositories/layout.md
new file mode 100644
index 0000000..3271098
--- /dev/null
+++ b/content/markdown/repositories/layout.md
@@ -0,0 +1,31 @@
+# Maven Repository Layout
+
+<!--
+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.
+-->
+
+The layout is responsible to translate the artifact coordinates into generic URI (path, URL, it depends on context).
+The transformation rule is quite simple for that matter:
+
+| Source coordinate | Trasformation | Result example |
+|-------------------|---------------|----------------|
+| Group ID | Replace "." (dot) characters with "/" (dash) character | `org.apache.maven` -> `org/apache/maven` |
+| Artifact ID | none | `apache-maven` -> `apache-maven` |
+| Version | none | `3.8.4` -> `3.8.4` |
+
+
diff --git a/content/markdown/repositories/local.md b/content/markdown/repositories/local.md
new file mode 100644
index 0000000..f58d06e
--- /dev/null
+++ b/content/markdown/repositories/local.md
@@ -0,0 +1,23 @@
+# Maven Local Repositories
+
+<!--
+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.
+-->
+
+The local repository is mixed bag, in sense, that it serves two purpose: it "caches" downloaded artifacts from
+remote repositories along with locally built and installed ones.
diff --git a/content/markdown/repositories/remote.md b/content/markdown/repositories/remote.md
new file mode 100644
index 0000000..beaa4c4
--- /dev/null
+++ b/content/markdown/repositories/remote.md
@@ -0,0 +1,23 @@
+# Maven Remote Repositories
+
+<!--
+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.
+-->
+
+Remote repositories usually referrers to repositories like [Maven Central Repository](/repository/index.html) is. These
+repositories are holding the artifacts to be consumed by Maven builds.
diff --git a/content/site.xml b/content/site.xml
index 0b8ebfe..eaca2a2 100644
--- a/content/site.xml
+++ b/content/site.xml
@@ -73,7 +73,12 @@ under the License.
<menu name="Documentation">
<item name="Maven Plugins" href="/plugins/index.html" />
- <item name="Maven Extensions" href="/extensions/index.html" />
+ <item name="Maven Extensions" href="/extensions/index.html" />
+ <item name="Maven Repositories" href="/repositories/index.html">
+ <item name="Maven Layout" href="/repositories/layout.html" />
+ <item name="Maven Local Repository" href="/repositories/local.html" />
+ <item name="Maven Remote Repositories" href="/repositories/remote.html" />
+ </item>
<item name="Index (category)" href="/guides/index.html" />
<item name="User Centre" href="/users/index.html" collapse="true">