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

ASF GitHub Bot commented on DOXIASITETOOLS-348:
-----------------------------------------------

michael-o commented on PR #173:
URL: 
https://github.com/apache/maven-doxia-sitetools/pull/173#issuecomment-2363189879

   Looking at your usecase I have the feeling that we have a conceptual flaw in 
our design. Implicit parents do not seem right after all and you are trying to 
remedy this with a parameter at the wrong place IMHO. I think that we either 
need something like:
   
   ```xml
   <site>
     <parent>
       <groupId>com.mycompany.app</groupId>
       <artifactId>my-app</artifactId>
       <version>1</version>
     </parent>
   </site>
   ```
   (type and classifier are implied)
   
   or we can make the `site.xml` a provided dependency of our build in the POM 
directly. If the site descriptor follows the rules of the POM then introducing 
a parent seems natural to me, no?
   
   See this one: 
https://repo1.maven.org/maven2/org/apache/maven/maven-parent/43/maven-parent-43-site.xml
   
   Either:
   ```xml
   <site>
     <parent>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-parent</artifactId>
       <version>43</version>
     </parent>
   </site>
   ```
   OR
   ```xml
   <project>
   <dependencies>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-parent</artifactId>
       <version>43</version>
       <type>xml</type>
       <classifier>site</classifer>
     </dependency>
   </dependencies>
   </site>
   ```
   
   WDYT?




> Extend site descriptor to enforce a parent
> ------------------------------------------
>
>                 Key: DOXIASITETOOLS-348
>                 URL: https://issues.apache.org/jira/browse/DOXIASITETOOLS-348
>             Project: Maven Doxia Sitetools
>          Issue Type: Improvement
>          Components: Site model
>    Affects Versions: 2.0.0-M19
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>            Priority: Major
>
> Currently the [site 
> descriptor|https://maven.apache.org/doxia/doxia-sitetools/doxia-site-model/site.html]
>  does not allow to enforce a parent {{site.xml}}.
> The attribute {{combine.self}} does not lead to a failure in case no parent 
> {{site.xml}} can be found. 
> This may easily lead to broken sites without breaking the site build as
> a) the site transparently inherits the {{site.xml}} attached to the parent 
> POM.
> b) attaching the {{site.xml}} to a project is a manual step 
> (https://maven.apache.org/plugins/maven-site-plugin/attach-descriptor-mojo.html)
> As at the time when the descriptor of the derived {{site.xml}} is created it 
> is known whether the descriptor works standalone or requires a parent 
> {{site.xml}}, therefore this should be made explicit in the site descriptor.
> I propose to add an additional attribute {{requireParent}} on the top level 
> element which is {{false}} by default (current behaviour). If set to {{true}} 
> it should lead to a build failure in case the parent {{site.xml}} cannot be 
> resolved (for whatever reason).



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

Reply via email to