Skip to content

Commit

Permalink
docs: extend README with Sonarcloud and dependency snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
poikilotherm committed Mar 4, 2024
1 parent 6961500 commit acbe4db
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
sitemapgen4j
============

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=gdcc_sitemapgen4j&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=gdcc_sitemapgen4j)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=gdcc_sitemapgen4j&metric=bugs)](https://sonarcloud.io/summary/new_code?id=gdcc_sitemapgen4j)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=gdcc_sitemapgen4j&metric=coverage)](https://sonarcloud.io/summary/new_code?id=gdcc_sitemapgen4j)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=gdcc_sitemapgen4j&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=gdcc_sitemapgen4j)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=gdcc_sitemapgen4j&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=gdcc_sitemapgen4j)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=gdcc_sitemapgen4j&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=gdcc_sitemapgen4j)

SitemapGen4j is a library to generate XML sitemaps in Java.

**NOTE:** This is a modernized fork of the upstream https://github.com/dfabulich/sitemapgen4j.
It will receive bug fixes and security updates as necessary and can be found as ``io.gdcc:sitemapgen4j`` on Maven Central.

<h2>What's an XML sitemap?</h2>

Quoting from <a href="http://sitemaps.org/index.php">sitemaps.org</a>:
Expand All @@ -16,6 +26,12 @@ Sitemap 0.90 is offered under the terms of the Attribution-ShareAlike Creative C

<h2>Getting started</h2>

**NOTE: As of v2.0.0, sitemapgen4j is compatible with Java 11+ only.**

First, add this as a dependency to your POM:

![mvn dependency](docs/version.svg)

The easiest way to get started is to just use the WebSitemapGenerator class, like this:

```java
Expand Down
18 changes: 18 additions & 0 deletions docs/version.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
<maven-flatten-plugin.version>1.5.0</maven-flatten-plugin.version>
<maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>
<maven-release-plugin.version>3.0.1</maven-release-plugin.version>
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
<maven-enforcer-plugin.version>3.4.1</maven-enforcer-plugin.version>

<pomchecker-maven-plugin.version>1.7.0</pomchecker-maven-plugin.version>
Expand Down Expand Up @@ -200,6 +201,11 @@
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
Expand Down Expand Up @@ -313,6 +319,34 @@
</execution>
</executions>
</plugin>

<!-- DOCUMENTATION -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>readme-md</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/docs</outputDirectory>
<resources>
<resource>
<directory>${project.build.resources[0].directory}</directory>
<includes>
<include>version.svg</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<encoding>UTF-8</encoding>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
18 changes: 18 additions & 0 deletions src/main/resources/version.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit acbe4db

Please sign in to comment.