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. -- 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]
