Initial Maven site implementation
This commit is contained in:
40
README.md
Normal file
40
README.md
Normal file
@@ -0,0 +1,40 @@
|
||||
<!---
|
||||
Copyright (C) 2016 Ronald Jack Jenkins Jr.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
SLF4Bukkit
|
||||
===
|
||||
SLF4J binding that uses Bukkit's plugin logging system.
|
||||
---
|
||||
### Server Owners
|
||||
If you were linked here by documentation for a plugin that you're using on your Bukkit/Spigot server, [go here](http://rjenkinsjr.github.io/slf4bukkit) to learn what configuration options you have available (and please ask the plugin developer to fix their links!).
|
||||
|
||||
### Plugin Developers
|
||||
If you wish to use [SLF4J](http://slf4j.org) in your Bukkit plugin, or if your plugin has a dependency on a library that uses SLF4J:
|
||||
|
||||
+ [Shade](https://maven.apache.org/plugins/maven-shade-plugin/usage.html) SLF4Bukkit into your plugin project:
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>info.ronjenkins</groupId>
|
||||
<artifactId>slf4bukkit</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
+ (Optional) Add your desired default configuration values to your plugin's built-in [config.yml](http://rjenkinsjr.github.io/slf4bukkit) file.
|
||||
+ (Optional) Use the [SLF4J API](http://www.slf4j.org/api/org/slf4j/Logger.html) in your code. Note that SLF4Bukkit does not support markers.
|
||||
|
||||
For more details, see the Javadocs for the [BukkitPluginLoggerAdapter](http://rjenkinsjr.github.io/slf4bukkit/apidocs/org/slf4j/impl/BukkitPluginLoggerAdapter.html) class.
|
||||
212
pom.xml
212
pom.xml
@@ -23,12 +23,18 @@
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<name>SLF4Bukkit</name>
|
||||
<description>SLF4J binding that uses Bukkit's plugin logging system.</description>
|
||||
<url>http://rjenkinsjr.github.io/slf4bukkit</url>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.7</maven.compiler.source>
|
||||
<maven.compiler.target>1.7</maven.compiler.target>
|
||||
<maven.javadoc.version>2.10.3</maven.javadoc.version>
|
||||
<sonar.java.source>${maven.compiler.source}</sonar.java.source>
|
||||
<rtr.allowExternalSnapshots>true</rtr.allowExternalSnapshots>
|
||||
<site.src>${project.basedir}/src/site</site.src>
|
||||
<site.dest>${project.basedir}/target/site-src</site.dest>
|
||||
<site.profile>pre-release</site.profile>
|
||||
<github.site.dir>${project.basedir}/src/github</github.site.dir>
|
||||
<tagNameFormat>@{project.version}</tagNameFormat>
|
||||
</properties>
|
||||
<scm>
|
||||
@@ -45,16 +51,15 @@
|
||||
</licenses>
|
||||
<!-- Dependencies -->
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.9-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.19</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.9-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@@ -72,7 +77,155 @@
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
<executions>
|
||||
<!-- Filter site resources. -->
|
||||
<execution>
|
||||
<id>copy-site-resources</id>
|
||||
<phase>pre-site</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${site.dest}</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${site.src}</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- Site plugin configuration. -->
|
||||
<plugin>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.4</version>
|
||||
<configuration>
|
||||
<!-- Use renamed site files. -->
|
||||
<siteDirectory>${site.dest}</siteDirectory>
|
||||
<!-- Don't use this plugin to deploy anything. -->
|
||||
<skipDeploy>true</skipDeploy>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Custom scripting. -->
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.8</version>
|
||||
<executions>
|
||||
<!-- Rename site files to Velocity templates. -->
|
||||
<execution>
|
||||
<id>preprocess-site-velocity-templates</id>
|
||||
<phase>pre-site</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<move todir="${site.dest}" includeemptydirs="false">
|
||||
<fileset dir="${site.dest}" includes="**/*.md" />
|
||||
<globmapper from="*.md" to="*.md.vm" />
|
||||
</move>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<!-- Manages site/report configuration. -->
|
||||
<reporting>
|
||||
<plugins>
|
||||
<!-- Basic reports -->
|
||||
<plugin>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>2.8.1</version>
|
||||
<configuration>
|
||||
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
||||
</configuration>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<report>issue-tracking</report>
|
||||
<report>mailing-list</report>
|
||||
<report>project-team</report>
|
||||
<report>dependencies</report>
|
||||
<report>dependency-management</report>
|
||||
<report>dependency-convergence</report>
|
||||
<report>plugins</report>
|
||||
<report>scm</report>
|
||||
<report>cim</report>
|
||||
<report>distribution-management</report>
|
||||
<report>summary</report>
|
||||
<report>license</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<!-- Javadocs -->
|
||||
<plugin>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${maven.javadoc.version}</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<report>javadoc</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<!-- Source XRef -->
|
||||
<plugin>
|
||||
<artifactId>maven-jxr-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<report>jxr</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<!-- TODOs, etc. -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>taglist-maven-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<configuration>
|
||||
<tagListOptions>
|
||||
<tagClasses>
|
||||
<tagClass>
|
||||
<displayName>To-dos</displayName>
|
||||
<tags>
|
||||
<tag>
|
||||
<matchString>TODO</matchString>
|
||||
<matchType>ignoreCase</matchType>
|
||||
</tag>
|
||||
<tag>
|
||||
<matchString>FIXME</matchString>
|
||||
<matchType>ignoreCase</matchType>
|
||||
</tag>
|
||||
</tags>
|
||||
</tagClass>
|
||||
<tagClass>
|
||||
<displayName>Deprecations</displayName>
|
||||
<tags>
|
||||
<tag>
|
||||
<matchString>@deprecated</matchString>
|
||||
<matchType>ignoreCase</matchType>
|
||||
</tag>
|
||||
</tags>
|
||||
</tagClass>
|
||||
</tagClasses>
|
||||
</tagListOptions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
<profiles>
|
||||
<!-- SonarQube analysis profile. -->
|
||||
<profile>
|
||||
@@ -111,6 +264,7 @@
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<defaultGoal>clean deploy site-deploy</defaultGoal>
|
||||
<plugins>
|
||||
<!-- Write POM version to properties file. -->
|
||||
<plugin>
|
||||
@@ -133,6 +287,52 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<!-- Generate GitHub README.md. -->
|
||||
<execution>
|
||||
<id>generate-github-readme</id>
|
||||
<phase>site</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.basedir}</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${github.site.dir}</directory>
|
||||
<includes>
|
||||
<include>README.md</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<overwrite>true</overwrite>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- Push Maven site to GitHub. -->
|
||||
<plugin>
|
||||
<groupId>com.github.github</groupId>
|
||||
<artifactId>site-maven-plugin</artifactId>
|
||||
<version>0.12</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>push-site-to-github</id>
|
||||
<phase>site-deploy</phase>
|
||||
<goals>
|
||||
<goal>site</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<server>github</server><!-- settings.xml -->
|
||||
<message>Publishing site for version ${project.version}</message>
|
||||
<merge>true</merge>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
40
src/github/README.md
Normal file
40
src/github/README.md
Normal file
@@ -0,0 +1,40 @@
|
||||
<!---
|
||||
Copyright (C) 2016 Ronald Jack Jenkins Jr.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
${project.name}
|
||||
===
|
||||
${project.description}
|
||||
---
|
||||
### Server Owners
|
||||
If you were linked here by documentation for a plugin that you're using on your Bukkit/Spigot server, [go here](${project.url}) to learn what configuration options you have available (and please ask the plugin developer to fix their links!).
|
||||
|
||||
### Plugin Developers
|
||||
If you wish to use [SLF4J](http://slf4j.org) in your Bukkit plugin, or if your plugin has a dependency on a library that uses SLF4J:
|
||||
|
||||
+ [Shade](https://maven.apache.org/plugins/maven-shade-plugin/usage.html) SLF4Bukkit into your plugin project:
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>${project.artifactId}</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
+ (Optional) Add your desired default configuration values to your plugin's built-in [config.yml](${project.url}) file.
|
||||
+ (Optional) Use the [SLF4J API](http://www.slf4j.org/api/org/slf4j/Logger.html) in your code. Note that SLF4Bukkit does not support markers.
|
||||
|
||||
For more details, see the Javadocs for the [BukkitPluginLoggerAdapter](${project.url}/apidocs/org/slf4j/impl/BukkitPluginLoggerAdapter.html) class.
|
||||
@@ -58,6 +58,8 @@ public class StaticMDCBinder {
|
||||
/**
|
||||
* Currently this method always returns an instance of {@link BasicMDCAdapter}
|
||||
* .
|
||||
*
|
||||
* @return never null.
|
||||
*/
|
||||
public MDCAdapter getMDCA() {
|
||||
// note that this method is invoked only from within the static initializer
|
||||
|
||||
39
src/site/markdown/devs.md
Normal file
39
src/site/markdown/devs.md
Normal file
@@ -0,0 +1,39 @@
|
||||
## Copyright (C) 2016 Ronald Jack Jenkins Jr.
|
||||
##
|
||||
## This program is free software: you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation, either version 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#set($h1 = '#')
|
||||
#set($h2 = '##')
|
||||
#set($h3 = '###')
|
||||
#set($h4 = '####')
|
||||
#set($h5 = '#####')
|
||||
#set($h6 = '######')
|
||||
${project.name} for Plugin Developers
|
||||
---
|
||||
|
||||
If you wish to use [SLF4J](http://slf4j.org) in your Bukkit plugin, or if your plugin has a dependency on a library that uses SLF4J:
|
||||
|
||||
+ [Shade](https://maven.apache.org/plugins/maven-shade-plugin/usage.html) SLF4Bukkit into your plugin project:
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>${project.artifactId}</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
+ (Optional) Add your desired default configuration values to your plugin's built-in [config.yml](home.html) file.
|
||||
+ (Optional) Use the [SLF4J API](http://www.slf4j.org/api/org/slf4j/Logger.html) in your code. Note that SLF4Bukkit does not support markers.
|
||||
|
||||
For more details, see the Javadocs for the [BukkitPluginLoggerAdapter](apidocs/org/slf4j/impl/BukkitPluginLoggerAdapter.html) class.
|
||||
78
src/site/markdown/index.md
Normal file
78
src/site/markdown/index.md
Normal file
@@ -0,0 +1,78 @@
|
||||
## Copyright (C) 2016 Ronald Jack Jenkins Jr.
|
||||
##
|
||||
## This program is free software: you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation, either version 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#set($h1 = '#')
|
||||
#set($h2 = '##')
|
||||
#set($h3 = '###')
|
||||
#set($h4 = '####')
|
||||
#set($h5 = '#####')
|
||||
#set($h6 = '######')
|
||||
${project.name} for Server Administrators
|
||||
---
|
||||
|
||||
If you were linked here by documentation for a plugin that you're using on your Bukkit/Spigot server, you can control the logging behavior of the plugin using its `config.yml` file.
|
||||
|
||||
Basic documentation of all available options is shown below. Your plugin likely has additional information regarding what portions of the plugin's logging facilities are configurable.
|
||||
|
||||
```yaml
|
||||
# This is the section within which all SLF4Bukkit configuration options is
|
||||
# contained. Its name is the same regardless of what the plugin's name is.
|
||||
slf4j:
|
||||
|
||||
# Default log level for all plugin logging activity. Possible values are
|
||||
# "trace", "debug", "info", "warn", or "error".
|
||||
#
|
||||
# If the plugin logs any "trace" or "debug" messages, they will be logged by
|
||||
# the plugin as "info" severity, but you'll see the actual severity in the
|
||||
# log message. This is due to a Bukkit logging limitation.
|
||||
#
|
||||
# If not specified, default is "info".
|
||||
defaultLogLevel: info
|
||||
|
||||
# Shows an "[SLF4J]" header for every message logged through SLF4Bukkit.
|
||||
#
|
||||
# If not specified, default is "false".
|
||||
showHeader: false
|
||||
|
||||
# Shows the name of each thread that is logging via SLF4Bukkit. You probably
|
||||
# don't want this information unless you're helping troubleshoot a plugin.
|
||||
#
|
||||
# If not specified, default is "false".
|
||||
showThreadName: false
|
||||
|
||||
# Shows the full logger name (e.g. "info.ronjenkins.bukkit.MyPlugin").
|
||||
#
|
||||
# If not specified, default is "false".
|
||||
showLogName: false
|
||||
|
||||
# Shows the short logger name, which is the short Java package name format
|
||||
# (e.g. a logger named "info.ronjenkins.bukkit.MyPlugin" would have a short
|
||||
# name of "i.r.b.MyPlugin".
|
||||
#
|
||||
# If not specified, default is "true".
|
||||
showShortLogName: true
|
||||
|
||||
# This section controls logging levels for individual loggers.
|
||||
log:
|
||||
|
||||
# For each element in this section, the key is the full logger name and the
|
||||
# value is the logging level for that logger. Possible logging levels are
|
||||
# the same as what's available for the "slf4j.defaultLogLevel" property.
|
||||
#
|
||||
# The documentation for your plugin should elaborate on what logger names
|
||||
# are available. As a general rule, you won't need to specify levels for
|
||||
# specific loggers.
|
||||
info.ronjenkins.bukkit.MyPlugin: debug
|
||||
info.ronjenkins.SomeOtherLogger: warn
|
||||
```
|
||||
47
src/site/site.xml
Normal file
47
src/site/site.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (C) 2016 Ronald Jack Jenkins Jr.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<project name="${project.name}" 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.skins</groupId>
|
||||
<artifactId>maven-fluido-skin</artifactId>
|
||||
<version>1.4</version>
|
||||
</skin>
|
||||
<custom>
|
||||
<fluidoSkin>
|
||||
<topBarEnabled>true</topBarEnabled>
|
||||
<sideBarEnabled>true</sideBarEnabled>
|
||||
<sourceLineNumbersEnabled>true</sourceLineNumbersEnabled>
|
||||
<copyrightClass>pull-right</copyrightClass>
|
||||
<gitHub>
|
||||
<projectId>rjenkinsjr/slf4bukkit</projectId>
|
||||
<ribbonOrientation>right</ribbonOrientation>
|
||||
<ribbonColor>black</ribbonColor>
|
||||
</gitHub>
|
||||
<profile>${site.profile}</profile>
|
||||
</fluidoSkin>
|
||||
</custom>
|
||||
<body>
|
||||
<menu name="User Guide">
|
||||
<item name="For Server Administrators" href="index.html" />
|
||||
<item name="For Plugin Developers" href="devs.html" />
|
||||
</menu>
|
||||
<menu ref="reports" />
|
||||
</body>
|
||||
</project>
|
||||
Reference in New Issue
Block a user