Skip to content

Commit

Permalink
[MSITE-892] Upgrade to Doxia/Doxia Sitetools to 2.0.0-M2
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-o committed Apr 24, 2022
1 parent 85c4bb2 commit 5f81392
Show file tree
Hide file tree
Showing 24 changed files with 173 additions and 364 deletions.
30 changes: 3 additions & 27 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,9 @@ under the License.
<properties>
<mavenVersion>3.2.5</mavenVersion>
<javaVersion>8</javaVersion>

<!-- for dependencies -->
<doxiaVersion>1.11.1</doxiaVersion>
<doxiaSitetoolsVersion>1.11.1</doxiaSitetoolsVersion>
<doxiaVersion>2.0.0-M2</doxiaVersion>
<doxiaSitetoolsVersion>2.0.0-M2</doxiaSitetoolsVersion>
<jettyVersion>9.4.46.v20220331</jettyVersion>
<wagonVersion>3.5.1</wagonVersion>
<slf4jVersion>1.7.36</slf4jVersion>
Expand Down Expand Up @@ -372,24 +371,7 @@ under the License.
<version>${doxiaVersion}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-module-confluence</artifactId>
<version>${doxiaVersion}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-module-docbook-simple</artifactId>
<version>${doxiaVersion}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-module-twiki</artifactId>
<version>${doxiaVersion}</version>
<scope>runtime</scope>
</dependency>

<!-- Doxia Sitetools -->
<dependency>
<groupId>org.apache.maven.doxia</groupId>
Expand All @@ -407,12 +389,6 @@ under the License.
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-integration-tools</artifactId>
<version>${doxiaSitetoolsVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Wagon -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/

import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.doxia.sink.SinkAdapter;
import org.apache.maven.doxia.sink.impl.SinkAdapter;
import org.apache.maven.doxia.siterenderer.Renderer;
import org.apache.maven.project.MavenProject;
import org.apache.maven.reporting.AbstractMavenReport;
Expand All @@ -30,7 +30,7 @@

/**
* Goal which creates a sink in a report.
*
*
* @goal test
* @phase site
*/
Expand Down
3 changes: 1 addition & 2 deletions src/it/projects/MSITE-842/invoker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@

invoker.goals.1 = clean install
invoker.debug.1 = false
invoker.goals.2 = site
invoker.maven.version = 3.0+
invoker.goals.2 = -pl project site
65 changes: 6 additions & 59 deletions src/it/projects/MSITE-842/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,69 +25,16 @@ under the License.
<modelVersion>4.0.0</modelVersion>

<groupId>org.apache.maven.plugins.site.its</groupId>
<artifactId>MSITE-842</artifactId>
<artifactId>MSITE-842-aggregator</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<packaging>pom</packaging>

<name>it-plugin-test Maven Mojo</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>

<build>

<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>@project.version@</version>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<templateFile>${basedir}/src/site/show-properties.vm</templateFile>
</configuration>
</plugin>
</plugins>

</build>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins.site.its</groupId>
<artifactId>MSITE-842</artifactId>
<version>${project.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.9</version>
<reportSets>
<reportSet>
<configuration>
<skip>true</skip>
</configuration>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
<modules>
<module>skin</module>
<module>project</module>
</modules>

</project>
91 changes: 91 additions & 0 deletions src/it/projects/MSITE-842/project/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>

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

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.apache.maven.plugins.site.its</groupId>
<artifactId>MSITE-842-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>

<name>it-plugin-test Maven Mojo</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>4.0.0-M1</version>
</dependency>
</dependencies>

<build>

<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>@project.version@</version>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.4</version>
</plugin>
</plugins>

</build>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins.site.its</groupId>
<artifactId>MSITE-842-plugin</artifactId>
<version>${project.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>@projectInfoReportsPluginVersion@</version>
<reportSets>
<reportSet>
<configuration>
<skip>true</skip>
</configuration>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>

</project>
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>

<!--
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
Expand All @@ -6,30 +9,31 @@ 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
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.

h4. Confluence Markup

Ideally, the markup should be _readable_ and even *clearly understandable* when you are
editing it. Inserting formatting should require few keystrokes, and little thought.

After all, we want people to be concentrating on the words, not on where the angle-brackets
should go.

* Kinds of Markup
** Text Effects
** Headings
** Text Breaks
** Links
** Other

Example from [https://confluence.atlassian.com/display/CONF25/Confluence+Notation+Guide+Overview]

Content for verify.groovy
-->

<project name="Maven" xmlns="http://maven.apache.org/DECORATION/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
<skin>
<groupId>org.apache.maven.plugins.site.its</groupId>
<artifactId>MSITE-842-skin</artifactId>
<version>1.0-SNAPSHOT</version>
</skin>

<body>
<links>
<item name="Maven" href="http://maven.apache.org/"/>
</links>

<menu name="Documentation">
<!--<item name="Xdoc Example" href="xdoc.html"/>-->
</menu>
</body>
</project>
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
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
Expand All @@ -14,12 +17,23 @@ software distributed under the License is distributed on an
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.apache.maven.plugins.site.its</groupId>
<artifactId>MSITE-842-skin</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

---++ Example
<name>it-plugin-test Maven Mojo</name>
<url>http://maven.apache.org</url>

* level 1
* level 2
* back on 1
* last bullet
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Content for verify.groovy
</project>
12 changes: 6 additions & 6 deletions src/it/projects/MSITE-842/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ File resultFile;
File expectedFile;

// Check MSITE-842.html (must exist and be exactly like the model
resultFile = new File(basedir, "target/site/MSITE-842.html");
expectedFile = new File(basedir, "src/it/MSITE-842.html");
resultFile = new File(basedir, "project/target/site/MSITE-842.html");
expectedFile = new File(basedir, "project/src/it/MSITE-842.html");

assert resultFile.exists() && resultFile.isFile()
assert resultFile.text.normalize().equals(expectedFile.text.normalize())

// Check another-page.html (must exist and be exactly like the model
resultFile = new File(basedir, "target/site/another-page.html");
expectedFile = new File(basedir, "src/it/another-page.html");
resultFile = new File(basedir, "project/target/site/another-page.html");
expectedFile = new File(basedir, "project/src/it/another-page.html");

assert resultFile.exists() && resultFile.isFile()
assert resultFile.text.normalize().equals(expectedFile.text.normalize())

// Check sub/sub.html (must exist and be exactly like the model
resultFile = new File(basedir, "target/site/sub/sub.html");
expectedFile = new File(basedir, "src/it/sub/sub.html");
resultFile = new File(basedir, "project/target/site/sub/sub.html");
expectedFile = new File(basedir, "project/src/it/sub/sub.html");

assert resultFile.exists() && resultFile.isFile()
assert resultFile.text.normalize().equals(expectedFile.text.normalize())
Expand Down
11 changes: 0 additions & 11 deletions src/it/projects/doxia-formats/src/site/apt/velocity-context.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,8 @@ Doxia Site Renderer Velocity Context
*-----------------------+-------------------------------------------------------+
| <<<decoration>>> | <<<decoration.name>>> = <<< $decoration.name>>>
*-----------------------+-------------------------------------------------------+
| <<<currentDate>>> | = <<<$currentDate>>> \
| | <<<dateFormat.format(currentDate)>>> = <<<$dateFormat.format($currentDate)>>>
*-----------------------+-------------------------------------------------------+
| <<<currentFileName>>> | = <<<$currentFileName>>>
*-----------------------+-------------------------------------------------------+
| <<<dateFormat>>> | = <<<$dateFormat>>>
*-----------------------+-------------------------------------------------------+
| <<<dateRevision>>> | = <<<$dateRevision>>>
*-----------------------+-------------------------------------------------------+
| <<<doxiaSiteRendererVersion>>> | = <<<$doxiaSiteRendererVersion>>>
*-----------------------+-------------------------------------------------------+
| <<<locale>>> | = <<<$locale>>>
Expand All @@ -77,10 +70,6 @@ Doxia Site Renderer Velocity Context
*-----------------------*-------------------------------------------------------*
|| variable || examples ||
*-----------------------+-------------------------------------------------------+
| <<<FileUtils>>> | = <<<$FileUtils>>>
*-----------------------+-------------------------------------------------------+
| <<<i18n>>> | = <<<$i18n>>>
*-----------------------+-------------------------------------------------------+
| <<<PathTool>>> | = <<<$PathTool>>>
*-----------------------+-------------------------------------------------------+
| <<<StringUtils>>> | = <<<$StringUtils>>>
Expand Down

0 comments on commit 5f81392

Please sign in to comment.