You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/06/11 20:29:06 UTC
[maven-doxia-sitetools] branch DOXIASITETOOLS-257 updated (375596b -> 3bbf62c)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch DOXIASITETOOLS-257
in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git
discard 375596b [DOXIASITETOOLS-257] Require a skin if a site descriptor (site.xml) has been provided
new 3bbf62c [DOXIASITETOOLS-257] Require a skin if a site descriptor (site.xml) has been provided
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (375596b)
\
N -- N -- N refs/heads/DOXIASITETOOLS-257 (3bbf62c)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
[maven-doxia-sitetools] 01/01: [DOXIASITETOOLS-257] Require a skin if a site descriptor (site.xml) has been provided
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch DOXIASITETOOLS-257
in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git
commit 3bbf62c229d849c1a155cdb26ea04eb6a3feba0a
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sat Jun 11 21:37:38 2022 +0200
[DOXIASITETOOLS-257] Require a skin if a site descriptor (site.xml) has been provided
This closes #47
---
doxia-decoration-model/src/main/mdo/decoration.mdo | 22 +---------------------
.../apache/maven/doxia/tools/DefaultSiteTool.java | 16 ++++++++--------
.../src/main/resources/default-site.xml | 5 +++++
3 files changed, 14 insertions(+), 29 deletions(-)
diff --git a/doxia-decoration-model/src/main/mdo/decoration.mdo b/doxia-decoration-model/src/main/mdo/decoration.mdo
index 752a9b5..691a953 100644
--- a/doxia-decoration-model/src/main/mdo/decoration.mdo
+++ b/doxia-decoration-model/src/main/mdo/decoration.mdo
@@ -127,7 +127,7 @@ under the License.
<name>edit</name>
<description><![CDATA[
The base url to edit Doxia document sources.
- In general, <code>${project.scm.url}</code> value should do the job.
+ In general, <code>${project.scm.url}</code> value should do the job.
]]></description>
<version>1.8.0+</version>
<type>String</type>
@@ -759,26 +759,6 @@ under the License.
<identifier>true</identifier>
</field>
</fields>
- <codeSegments>
- <codeSegment>
- <version>1.0.0+</version>
- <code>
- <![CDATA[
- /**
- * @return the default skin <code>org.apache.maven.skins:maven-default-skin:1.3</code>.
- */
- public static Skin getDefaultSkin()
- {
- Skin skin = new Skin();
- skin.setGroupId( "org.apache.maven.skins" );
- skin.setArtifactId( "maven-default-skin" );
- skin.setVersion( "1.3" );
- return skin;
- }
- ]]>
- </code>
- </codeSegment>
- </codeSegments>
</class>
</classes>
</model>
diff --git a/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java b/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java
index c51c1d7..b393e9b 100644
--- a/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java
+++ b/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java
@@ -138,13 +138,7 @@ public class DefaultSiteTool
Objects.requireNonNull( localRepository, "localRepository cannot be null" );
Objects.requireNonNull( remoteArtifactRepositories, "remoteArtifactRepositories cannot be null" );
Objects.requireNonNull( decoration, "decoration cannot be null" );
-
- Skin skin = decoration.getSkin();
-
- if ( skin == null )
- {
- skin = Skin.getDefaultSkin();
- }
+ Skin skin = Objects.requireNonNull( decoration.getSkin(), "decoration.skin cannot be null" );
String version = skin.getVersion();
Artifact artifact;
@@ -180,7 +174,13 @@ public class DefaultSiteTool
List<ArtifactRepository> remoteArtifactRepositories )
throws SiteToolException
{
- return getSkinArtifactFromRepository( localRepository, remoteArtifactRepositories, new DecorationModel() );
+ Skin skin = new Skin();
+ skin.setGroupId( "org.apache.maven.skins" );
+ skin.setArtifactId( "maven-default-skin" );
+ skin.setVersion( "1.3" );
+ DecorationModel model = new DecorationModel();
+ model.setSkin( skin );
+ return getSkinArtifactFromRepository( localRepository, remoteArtifactRepositories, model );
}
/**
diff --git a/doxia-integration-tools/src/main/resources/default-site.xml b/doxia-integration-tools/src/main/resources/default-site.xml
index 5ba93bf..c04d78e 100644
--- a/doxia-integration-tools/src/main/resources/default-site.xml
+++ b/doxia-integration-tools/src/main/resources/default-site.xml
@@ -22,6 +22,11 @@ under the License.
<bannerLeft>
<name>${project.name}</name>
</bannerLeft>
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-default-skin</artifactId>
+ <version>1.3</version>
+ </skin>
<body>
<links>
<item name="${project.name}" href="${project.url}"/>