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 2025/07/19 07:43:16 UTC

(maven-studies) branch deploy updated: reorg directories for simplification

This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch deploy
in repository https://gitbox.apache.org/repos/asf/maven-studies.git


The following commit(s) were added to refs/heads/deploy by this push:
     new d1216e339 reorg directories for simplification
d1216e339 is described below

commit d1216e339aab762f09f87cf1b6c3944a3aa25046
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sat Jul 19 09:43:09 2025 +0200

    reorg directories for simplification
---
 README.md                                          | 14 ++++++++++----
 pom.xml                                            | 16 +++++++++++-----
 {ear => projects/ear}/pom.xml                      |  2 +-
 {ejbs => projects/ejbs}/pom.xml                    |  2 +-
 .../ejbs}/src/main/resources/META-INF/ejb-jar.xml  |  0
 projects/pom.xml                                   |  4 ++++
 .../primary-source}/pom.xml                        |  2 +-
 {servlets => projects}/servlet/pom.xml             |  2 +-
 .../servlet/src/main/webapp/WEB-INF/web.xml        |  0
 .../servlet/src/main/webapp/index.jsp              |  0
 servlets/pom.xml                                   | 22 ----------------------
 11 files changed, 29 insertions(+), 35 deletions(-)

diff --git a/README.md b/README.md
index 5ceac2f22..2ef35dcfe 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ And few additions to [`pom.xml`](pom.xml) for some of the tests.
 
 ## basic test: deploy to local directory `target/deploy`
 
-Instead of classical deployment to an HTTP(S) server (PUT), or scp or any other file-oriented server, we can easily test `maven-deploy-plugin:deploy` to deploy to a local directory using `altDeploymentRepository` parameter with a `file:` target url:
+Instead of classical deployment to an HTTP(S) server (PUT), or scp or any other file-oriented server, we can easily test `maven-deploy-plugin:deploy` to deploy to a local directory using `altDeploymentRepository` parameter with a `file:` target url (instead of updating `pom.xml`'s `project.distributionManagement.repository.id`and `url`):
 
     mvn clean deploy -DaltDeploymentRepository=local::file:target/deploy
 
@@ -36,9 +36,15 @@ Based on previous deploy to `target/deploy` local directory, it's easy to create
 
     tar cvf deploy-bundle.tar -C target/deploy org
 
-then upload with Maven Central Portal ["Publish Component"](https://central.sonatype.com/publishing) UI (publication is expected to fail because you don't have permissions on the groupId, but you can test and see the behaviour).
+then upload with Maven Central Portal ["Publish Component" UI](https://central.sonatype.org/publish/publish-portal-upload/) (publication is expected to fail because you don't have permissions on the groupId, but you can test and see the behaviour).
 
-Upload can also be done using `curl` to the [`/api/v1/publisher/upload`](https://central.sonatype.com/api-doc) API
+Upload can also be done [using `curl`](https://central.sonatype.org/publish/publish-portal-api/#uploading-a-deployment-bundle) to the [`/api/v1/publisher/upload`](https://central.sonatype.com/api-doc) API:
+
+    curl --request POST \
+    --verbose \
+    --header 'Authorization: Bearer ZXhhbXBsZV91c2VybmFtZTpleGFtcGxlX3Bhc3N3b3Jk' \
+    --form bundle=@deploy-bundle.tar \
+    https://central.sonatype.com/api/v1/publisher/upload
 
 ## deploy with Sonatype Maven plugin
 
@@ -46,7 +52,7 @@ https://central.sonatype.org/publish/publish-portal-maven/
 
     mvn clean deploy -Pcentral-publishing
 
-with a fake server defined in `~/.m2/settings.xml` for putting fake credentials:
+with a fake `publish-to-central` server id defined in `~/.m2/settings.xml` for putting fake credentials:
 
     <server>
       <id>publish-to-central</id>
diff --git a/pom.xml b/pom.xml
index 2999e8060..8713141ec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,17 +9,23 @@
   <version>1.0</version>
   <packaging>pom</packaging>
 
-  <name>deploy</name>
+  <name>deploy study root</name>
 
   <modules>
     <module>projects</module>
-    <module>primary-source</module>
-    <module>servlets</module>
-    <module>ejbs</module>
-    <module>ear</module>
   </modules>
 
   <distributionManagement>
+    <repository><!-- deploy release to -->
+      <id/>
+      <name/>
+      <url/>
+    </repository>
+    <snapshotRepository><!-- deploy snapshot to -->
+      <id/>
+      <name/>
+      <url/>
+    </snapshotRepository>
     <site>
       <id>site</id>
       <name>project website</name>
diff --git a/ear/pom.xml b/projects/ear/pom.xml
similarity index 97%
rename from ear/pom.xml
rename to projects/ear/pom.xml
index 5029bd594..c6c4d0f52 100644
--- a/ear/pom.xml
+++ b/projects/ear/pom.xml
@@ -6,7 +6,7 @@
 
   <parent>
     <groupId>org.apache.maven.studies</groupId>
-    <artifactId>deploy</artifactId>
+    <artifactId>projects</artifactId>
     <version>1.0</version>
   </parent>
 
diff --git a/ejbs/pom.xml b/projects/ejbs/pom.xml
similarity index 96%
rename from ejbs/pom.xml
rename to projects/ejbs/pom.xml
index 5500be3ca..9751647e5 100644
--- a/ejbs/pom.xml
+++ b/projects/ejbs/pom.xml
@@ -6,7 +6,7 @@
 
   <parent>
     <groupId>org.apache.maven.studies</groupId>
-    <artifactId>deploy</artifactId>
+    <artifactId>projects</artifactId>
     <version>1.0</version>
   </parent>
 
diff --git a/ejbs/src/main/resources/META-INF/ejb-jar.xml b/projects/ejbs/src/main/resources/META-INF/ejb-jar.xml
similarity index 100%
rename from ejbs/src/main/resources/META-INF/ejb-jar.xml
rename to projects/ejbs/src/main/resources/META-INF/ejb-jar.xml
diff --git a/projects/pom.xml b/projects/pom.xml
index 00068cc2a..d5e291514 100644
--- a/projects/pom.xml
+++ b/projects/pom.xml
@@ -17,5 +17,9 @@
 
   <modules>
     <module>logging</module>
+    <module>ear</module>
+    <module>ejbs</module>
+    <module>primary-source</module>
+    <module>servlet</module>
   </modules>
 </project>
diff --git a/primary-source/pom.xml b/projects/primary-source/pom.xml
similarity index 96%
rename from primary-source/pom.xml
rename to projects/primary-source/pom.xml
index 886772d47..c5cd38eb2 100644
--- a/primary-source/pom.xml
+++ b/projects/primary-source/pom.xml
@@ -6,7 +6,7 @@
 
   <parent>
     <groupId>org.apache.maven.studies</groupId>
-    <artifactId>deploy</artifactId>
+    <artifactId>projects</artifactId>
     <version>1.0</version>
   </parent>
 
diff --git a/servlets/servlet/pom.xml b/projects/servlet/pom.xml
similarity index 94%
rename from servlets/servlet/pom.xml
rename to projects/servlet/pom.xml
index 16f7ea348..6b8e1ffb7 100644
--- a/servlets/servlet/pom.xml
+++ b/projects/servlet/pom.xml
@@ -6,7 +6,7 @@
 
   <parent>
     <groupId>org.apache.maven.studies</groupId>
-    <artifactId>servlets</artifactId>
+    <artifactId>projects</artifactId>
     <version>1.0</version>
   </parent>
 
diff --git a/servlets/servlet/src/main/webapp/WEB-INF/web.xml b/projects/servlet/src/main/webapp/WEB-INF/web.xml
similarity index 100%
rename from servlets/servlet/src/main/webapp/WEB-INF/web.xml
rename to projects/servlet/src/main/webapp/WEB-INF/web.xml
diff --git a/servlets/servlet/src/main/webapp/index.jsp b/projects/servlet/src/main/webapp/index.jsp
similarity index 100%
rename from servlets/servlet/src/main/webapp/index.jsp
rename to projects/servlet/src/main/webapp/index.jsp
diff --git a/servlets/pom.xml b/servlets/pom.xml
deleted file mode 100644
index f5f4bf1eb..000000000
--- a/servlets/pom.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.maven.studies</groupId>
-    <artifactId>deploy</artifactId>
-    <version>1.0</version>
-  </parent>
-
-  <artifactId>servlets</artifactId>
-  <packaging>pom</packaging>
-
-  <name>servlets</name>
-
-  <modules>
-    <module>servlet</module>
-  </modules>
-</project>
-