-
Notifications
You must be signed in to change notification settings - Fork 31
[DOXIASITETOOLS-348] Allow to enforce a parent site descriptor #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
<description><![CDATA[ | ||
Whether to enforce a parent site descriptor. | ||
]]></description> | ||
<name>enforceParentDescriptor</name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure this is really a good name, any other suggestion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of enforce
I'd use the term require
. E.g., requireParentSite
. The term descriptor
is too confusing and too abstract for most.
@@ -66,6 +66,15 @@ under the License. | |||
<type>String</type> | |||
<defaultValue>merge</defaultValue> | |||
</field> | |||
<field xml.attribute="true"> | |||
<description><![CDATA[ | |||
Whether to enforce a parent site descriptor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably outline that this is only effective in case the the POM has a parent defined. Also this just requires a parent descriptor on any level (not necessarily from the direct parent).
I have a few thoughts on this, will try to share tomorrow or over the weekend. |
bd5647d
to
4bdef85
Compare
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: <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 See this one: https://repo1.maven.org/maven2/org/apache/maven/maven-parent/43/maven-parent-43-site.xml Either: <site>
<parent>
<groupId>org.apache.maven</groupId>
<artifactId>maven-parent</artifactId>
<version>43</version>
</parent>
</site> OR <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? |
Yes, but I am trying to fix this without breaking backwards compatibility. Having an additional parent on the site.xml level would fix this, but in most cases is highly redundant (and also isn't properly upgraded during release), so maintaining this on Similar an additional dependency on the POM level feels highly redundant, because this should always reflect the Maven coordinates of the parent. Also knowledge about classifier (potentially extended with locale) requires additional knowledge from consumers they shouldn't necessarily know about. So just having a boolean toggle is IMHO the option with least redundancy and simplest to understand from a consumer PoV. |
Let me crunch on this...I am we are already breaking stuff. This would be ideal for now because we won't have another chance soon to break it. |
<description><![CDATA[ | ||
Whether to enforce a parent site descriptor. | ||
]]></description> | ||
<name>enforceParentDescriptor</name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of enforce
I'd use the term require
. E.g., requireParentSite
. The term descriptor
is too confusing and too abstract for most.
doxia-integration-tools/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java
Show resolved
Hide resolved
4bdef85
to
5f7d799
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it is a compromise...let's move on.
This leads to build failures in case it is required but cannot be resolved.
5f7d799
to
3228dc8
Compare
No description provided.