[ 
https://issues.apache.org/jira/browse/MSITE-1010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17863550#comment-17863550
 ] 

ASF GitHub Bot commented on MSITE-1010:
---------------------------------------

michael-o commented on code in PR #194:
URL: https://github.com/apache/maven-site-plugin/pull/194#discussion_r1667658214


##########
src/site/apt/examples/inheritancesiterepository.apt:
##########
@@ -0,0 +1,77 @@
+ ------
+ Inheritance Site Repository

Review Comment:
   Use hyphens in the file name



##########
src/site/apt/examples/inheritancesiterepository.apt:
##########
@@ -0,0 +1,77 @@
+ ------
+ Inheritance Site Repository
+ ------
+Matthias Bünger
+ ------
+ 2024-07-07
+ ------
+
+ ~~ 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.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html
+
+
+Inheritance of the site repository
+
+  Inside your <<<pom.xml>>> you can not only configure the 
<<<distributionManagement>>> for the releases and snapshots
+  of your project, but also where to deploy your site pages when using the 
<<<{{{../deploy-mojo.html}site:deploy}}>>>
+  goal. The following configuration would deploy the project's site to a local 
folder called <<<temprepo>>>.

Review Comment:
   directory, not folder



##########
src/site/apt/examples/inheritancesiterepository.apt:
##########
@@ -0,0 +1,77 @@
+ ------
+ Inheritance Site Repository
+ ------
+Matthias Bünger
+ ------
+ 2024-07-07
+ ------
+
+ ~~ 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.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html
+
+
+Inheritance of the site repository
+
+  Inside your <<<pom.xml>>> you can not only configure the 
<<<distributionManagement>>> for the releases and snapshots
+  of your project, but also where to deploy your site pages when using the 
<<<{{{../deploy-mojo.html}site:deploy}}>>>
+  goal. The following configuration would deploy the project's site to a local 
folder called <<<temprepo>>>.
+
++-----+
+<distributionManagement>
+  <site>
+      <id>localFileRepository</id>
+      <url>file:C:\temp\temprepo\</url>
+  </site>
+</distributionManagement>
++-----+
+
+  The content of this site-repository would look similar to the following 
after your your deployment.
+
++-----+
+/ (root of site-repository - here C:\temp\temprepo\)
+ /css
+report.html
++-----+
+
+  You see that all files are placed inside the site-repository and that no 
subfolder with their <artifactId> name is created.
+  That's a small, but important difference in comparison how the regular 
<<<deploy>>> of the build lifecycle works,

Review Comment:
   Note: deploy and site-deploy only share names. That's it.



##########
src/site/apt/examples/inheritancesiterepository.apt:
##########
@@ -0,0 +1,77 @@
+ ------
+ Inheritance Site Repository
+ ------
+Matthias Bünger
+ ------
+ 2024-07-07
+ ------
+
+ ~~ 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.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html
+
+
+Inheritance of the site repository
+
+  Inside your <<<pom.xml>>> you can not only configure the 
<<<distributionManagement>>> for the releases and snapshots
+  of your project, but also where to deploy your site pages when using the 
<<<{{{../deploy-mojo.html}site:deploy}}>>>
+  goal. The following configuration would deploy the project's site to a local 
folder called <<<temprepo>>>.
+
++-----+
+<distributionManagement>
+  <site>
+      <id>localFileRepository</id>
+      <url>file:C:\temp\temprepo\</url>
+  </site>
+</distributionManagement>
++-----+
+
+  The content of this site-repository would look similar to the following 
after your your deployment.

Review Comment:
   No hyphen 



##########
src/site/site.xml:
##########
@@ -41,6 +41,7 @@ under the License.
       <item name="Building a multi-module site" 
href="/examples/multimodule.html"/>
       <item name="Configuring Site Run" href="/examples/siterun.html"/>
       <item name="Excluding Document Formats" 
href="/examples/moduleexcludes.html"/>
+      <item name="Inheritance of the site repository" 
href="/examples/inheritanccesiterepository.html"/>

Review Comment:
   Typo in the href



##########
src/site/apt/examples/inheritancesiterepository.apt:
##########
@@ -0,0 +1,77 @@
+ ------
+ Inheritance Site Repository
+ ------
+Matthias Bünger
+ ------
+ 2024-07-07
+ ------
+
+ ~~ 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.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html
+
+
+Inheritance of the site repository
+
+  Inside your <<<pom.xml>>> you can not only configure the 
<<<distributionManagement>>> for the releases and snapshots
+  of your project, but also where to deploy your site pages when using the 
<<<{{{../deploy-mojo.html}site:deploy}}>>>
+  goal. The following configuration would deploy the project's site to a local 
folder called <<<temprepo>>>.
+
++-----+
+<distributionManagement>
+  <site>
+      <id>localFileRepository</id>
+      <url>file:C:\temp\temprepo\</url>
+  </site>
+</distributionManagement>
++-----+
+
+  The content of this site-repository would look similar to the following 
after your your deployment.
+
++-----+
+/ (root of site-repository - here C:\temp\temprepo\)
+ /css
+report.html
++-----+
+
+  You see that all files are placed inside the site-repository and that no 
subfolder with their <artifactId> name is created.
+  That's a small, but important difference in comparison how the regular 
<<<deploy>>> of the build lifecycle works,
+  where always a subfolder is created for each project. So you have to be 
aware to don't use the exact same value
+  for the site-repository for multiple projects, as otherwise files will 
overwrite files of the first deployed project
+  are overwritten by the files of the second deployed one.
+
+  To handle this easily you can use a the same parent-pom (often called 
"meta-pom") for each of your project.

Review Comment:
   Remove the term meta POM. It will cause confusion with the reader.





> site-deployment for POM projects does not create project directories in site 
> repository
> ---------------------------------------------------------------------------------------
>
>                 Key: MSITE-1010
>                 URL: https://issues.apache.org/jira/browse/MSITE-1010
>             Project: Maven Site Plugin
>          Issue Type: Bug
>          Components: site:deploy
>    Affects Versions: 3.12.0, 4.0.0-M14
>         Environment: Nexus, since at least Maven 3.6.3 (not tested with 3.9.7 
> or 4.0.0-beta)
>            Reporter: Matthias Bünger
>            Priority: Minor
>         Attachments: pom.xml, webdav.txt
>
>
> I noticed the following issue while updating the plugins in our teams 
> META-POM and could backtrack it at least until 3.12 but might be an even 
> older issue. Havn't checked 4.0.0-M15 but from the releases notes I doubt it 
> is fixed.
> When you do "site-deploy" for a single module or multi module project the 
> site files (.html, css-folders, etc.) are stored in the site-repository (we 
> have current Nexus version) within a subfolder with the name of the project, 
> e.g
> {code}
> / (root of site-repository)
>   /- project-A
>    /css
>    report.html
>   /- project-B
>    /css
>    report.html
>   /project-C
> {code}
> If you do the same for a "POM" project (e.g. a META-POM or BOM) the site 
> files are all stored at root level (instead of creating a project folder) and 
> ofc overwriting the ones from other POM-projects:
> {code}
> / (root of site-repository)
>  /css
>  /project-A
>  /project-B
>  /project-C
> report.html
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to