Skip to content

Commit

Permalink
Add javadoc and README
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalijr2 committed Nov 26, 2024
1 parent e911061 commit a80deac
Show file tree
Hide file tree
Showing 32 changed files with 623 additions and 47 deletions.
21 changes: 20 additions & 1 deletion commons-logging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
<scope>provided</scope>
<version>1.3.4</version>
<version>${commons-logging.version}</version>
</dependency>
<dependency>
<artifactId>hamcrest</artifactId>
Expand Down Expand Up @@ -66,6 +66,22 @@
<version>1.1.0-SNAPSHOT</version>
</parent>
<profiles>
<profile>
<build>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<links>
<link>https://javadoc.io/doc/commons-logging/commons-logging/${commons-logging.version}</link>
</links>
</configuration>
<groupId>org.apache.maven.plugins</groupId>
</plugin>
</plugins>
</build>
<id>release</id>
</profile>
<profile>
<build>
<plugins>
Expand All @@ -78,4 +94,7 @@
<id>run-its</id>
</profile>
</profiles>
<properties>
<commons-logging.version>1.3.4</commons-logging.version>
</properties>
</project>
2 changes: 1 addition & 1 deletion commons-logging/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Just put a test dependency to your POM:
<artifactId>mock-loggers-commons-logging</artifactId>
<groupId>io.github.vitalijr2.logging</groupId>
<scope>test</scope>
<version>1.0.0</version>
<version>1.1.0</version>
</dependency>
```

Expand Down
18 changes: 5 additions & 13 deletions commons-logging/src/it/hello-commons-logging-world/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,23 @@
</plugins>
</build>
<dependencies>
<!-- main -->
<dependency>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
<version>1.3.4</version>
</dependency>
<!-- test -->
<dependency>
<artifactId>@project.artifactId@</artifactId>
<groupId>@project.groupId@</groupId>
<scope>test</scope>
<version>@project.version@</version>
</dependency>
<dependency>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
<version>1.3.4</version>
</dependency>
<dependency>
<artifactId>hamcrest</artifactId>
<groupId>org.hamcrest</groupId>
<scope>test</scope>
<version>3.0</version>
</dependency>
<dependency>
<artifactId>junit-jupiter-api</artifactId>
<groupId>org.junit.jupiter</groupId>
<scope>test</scope>
<version>${junit-jupiter.version}</version>
</dependency>
<dependency>
<artifactId>junit-jupiter-engine</artifactId>
<groupId>org.junit.jupiter</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import org.jetbrains.annotations.VisibleForTesting;

/**
* Uses {@link org.mockito.Mockito#mock(Class, String)} to get a mock that is adapted for {@link System.Logger}.
* Uses {@link org.mockito.Mockito#mock(Class, String)} to get a mock that is adapted for {@link Log}.
* <p>
* Example:
* <pre><code class="language-java">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* Mock loggers for Apache Commons Logging backed by <a href="https://site.mockito.org/">Mockito</a>.
* Mock loggers for <a href="https://commons.apache.org/proper/commons-logging/">Apache Commons Logging</a> backed by <a
* href="https://site.mockito.org/">Mockito</a>.
*
* @since 1.0.0
*/
Expand Down
2 changes: 1 addition & 1 deletion jdk-platform-logging/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Just put a test dependency to your POM:
<artifactId>mock-loggers-jdk-platform-logging</artifactId>
<groupId>io.github.vitalijr2.logging</groupId>
<scope>test</scope>
<version>1.0.0</version>
<version>1.1.0</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
</plugins>
</build>
<dependencies>
<!-- test -->
<dependency>
<artifactId>@project.artifactId@</artifactId>
<groupId>@project.groupId@</groupId>
Expand All @@ -41,12 +40,6 @@
<scope>test</scope>
<version>3.0</version>
</dependency>
<dependency>
<artifactId>junit-jupiter-api</artifactId>
<groupId>org.junit.jupiter</groupId>
<scope>test</scope>
<version>${junit-jupiter.version}</version>
</dependency>
<dependency>
<artifactId>junit-jupiter-engine</artifactId>
<groupId>org.junit.jupiter</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* Mock loggers for JDK Platform Logging backed by <a href="https://site.mockito.org/">Mockito</a>.
* Mock loggers for <a href="https://www.baeldung.com/java-9-logging-api">JDK Platform Logging</a> backed by <a
* href="https://site.mockito.org/">Mockito</a>.
*
* @since 1.0.0
*/
Expand Down
5 changes: 4 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ void helloWorld() {
```

Now this library implements services for [JDK Platform Logging][jdk-logging],
[Apache Commons Logging][commons-logging] and [SLF4J][slf4j].
[Apache Commons Logging][commons-logging], [SLF4J][slf4j] and [tinylog][].

See more examples in the relevant modules of this project:

- for Apache Commons Logging in [mock-loggers-commons-logging](commons-logging)
- for JDK Platform Logging in [mock-loggers-jdk-platform-logging](jdk-platform-logging)
- for SLF4J in [mock-loggers-slf4j](slf4j)
- for tinylog in [mock-loggers-tinylog-provider](tinylog-provider)

## Other logging libraries and frameworks

Expand Down Expand Up @@ -86,6 +87,8 @@ See full text [here](LICENSE "the LICENSE file").

[slf4j]: https://www.slf4j.org/

[tinylog]: https://tinylog.org/v2/

[java-version]: https://img.shields.io/static/v1?label=Java&message=11&color=blue&logoColor=E23D28

[jdk-download]: https://www.oracle.com/java/technologies/downloads/#java11
Expand Down
21 changes: 20 additions & 1 deletion slf4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
<scope>provided</scope>
<version>2.0.16</version>
<version>${slf4j.version}</version>
</dependency>
</dependencies>
<description>Mock loggers for SLF4J backed by Mockito.</description>
Expand All @@ -66,6 +66,22 @@
<version>1.1.0-SNAPSHOT</version>
</parent>
<profiles>
<profile>
<build>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<links>
<link>https://javadoc.io/doc/org.slf4j/slf4j-api/${slf4j.version}</link>
</links>
</configuration>
<groupId>org.apache.maven.plugins</groupId>
</plugin>
</plugins>
</build>
<id>release</id>
</profile>
<profile>
<build>
<plugins>
Expand All @@ -78,4 +94,7 @@
<id>run-its</id>
</profile>
</profiles>
<properties>
<slf4j.version>2.0.16</slf4j.version>
</properties>
</project>
2 changes: 1 addition & 1 deletion slf4j/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Just put a test dependency to your POM:
<artifactId>mock-loggers-slf4j</artifactId>
<groupId>io.github.vitalijr2.logging</groupId>
<scope>test</scope>
<version>1.0.0</version>
<version>1.1.0</version>
</dependency>
```

Expand Down
18 changes: 5 additions & 13 deletions slf4j/src/it/hello-slf4j-world/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@
</plugins>
</build>
<dependencies>
<!-- main -->
<dependency>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
<version>2.0.16</version>
</dependency>
<!-- test -->
<dependency>
<artifactId>@project.artifactId@</artifactId>
<groupId>@project.groupId@</groupId>
Expand All @@ -47,12 +40,6 @@
<scope>test</scope>
<version>3.0</version>
</dependency>
<dependency>
<artifactId>junit-jupiter-api</artifactId>
<groupId>org.junit.jupiter</groupId>
<scope>test</scope>
<version>${junit-jupiter.version}</version>
</dependency>
<dependency>
<artifactId>junit-jupiter-engine</artifactId>
<groupId>org.junit.jupiter</groupId>
Expand All @@ -77,6 +64,11 @@
<scope>test</scope>
<version>${mockito.version}</version>
</dependency>
<dependency>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
<version>2.0.16</version>
</dependency>
</dependencies>
<description>Basic example</description>
<groupId>example.hello</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.slf4j.Logger;

/**
* Uses {@link org.mockito.Mockito#mock(Class, String)} to get a mock that is adapted for {@link System.Logger}.
* Uses {@link org.mockito.Mockito#mock(Class, String)} to get a mock that is adapted for {@link Logger}.
* <p>
* Example:
* <pre><code class="language-java">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* Mock loggers for SLF4J backed by <a href="https://site.mockito.org/">Mockito</a>.
* Mock loggers for <a href="https://www.slf4j.org/">SLF4J</a> backed by <a
* href="https://site.mockito.org/">Mockito</a>.
*
* @since 1.0.0
*/
Expand Down
21 changes: 20 additions & 1 deletion tinylog-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<artifactId>tinylog-api</artifactId>
<groupId>org.tinylog</groupId>
<scope>provided</scope>
<version>2.7.0</version>
<version>${tinylog.version}</version>
</dependency>
</dependencies>
<description>Mock loggers for tinylog backed by Mockito.</description>
Expand All @@ -76,6 +76,22 @@
<version>1.1.0-SNAPSHOT</version>
</parent>
<profiles>
<profile>
<build>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<links>
<link>https://javadoc.io/doc/org.tinylog/tinylog-api/${tinylog.version}</link>
</links>
</configuration>
<groupId>org.apache.maven.plugins</groupId>
</plugin>
</plugins>
</build>
<id>release</id>
</profile>
<profile>
<build>
<plugins>
Expand All @@ -88,4 +104,7 @@
<id>run-its</id>
</profile>
</profiles>
<properties>
<tinylog.version>2.7.0</tinylog.version>
</properties>
</project>
Loading

0 comments on commit a80deac

Please sign in to comment.