Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from litetex-oss/dev
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
litetex authored Mar 20, 2024
2 parents 2a6d994 + 4e84f85 commit 537df62
Show file tree
Hide file tree
Showing 33 changed files with 3,029 additions and 259 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/checkBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@ name: Check Build
on:
workflow_dispatch:
push:
branches: [ develop ]
branches: [ dev ]
paths-ignore:
- '**.md'
- '.config/**'
- '.github/**'
- '.idea/**'
- '.run/**'
- 'assets/**'
pull_request:
branches: [ develop ]
branches: [ dev ]
paths-ignore:
- '**.md'
- '.config/**'
- '.github/**'
- '.idea/**'
- '.run/**'
- 'assets/**'

env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ jobs:
release_name: v${{ steps.version.outputs.release }}
commitish: master
body: |
## [Changelog](https://github.com/litetex-oss/${{ env.PRIMARY_MAVEN_MODULE }}/blob/develop/CHANGELOG.md#${{ steps.version.outputs.releasenumber }})
See [Changelog#v${{ steps.version.outputs.release }}](https://github.com/litetex-oss/${{ env.PRIMARY_MAVEN_MODULE }}/blob/develop/CHANGELOG.md#${{ steps.version.outputs.releasenumber }}) for more information.
## [Changelog](https://github.com/litetex-oss/${{ env.PRIMARY_MAVEN_MODULE }}/blob/dev/CHANGELOG.md#${{ steps.version.outputs.releasenumber }})
See [Changelog#v${{ steps.version.outputs.release }}](https://github.com/litetex-oss/${{ env.PRIMARY_MAVEN_MODULE }}/blob/dev/CHANGELOG.md#${{ steps.version.outputs.releasenumber }}) for more information.
## Installation
Add the following lines to your pom:
Expand Down Expand Up @@ -226,6 +226,6 @@ jobs:
gh_pr_up() {
gh pr create "$@" || gh pr edit "$@"
}
gh_pr_up -B "develop" \
gh_pr_up -B "dev" \
--title "Sync back" \
--body "An automated PR to sync changes back"
4 changes: 3 additions & 1 deletion .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ name: Sonar
on:
workflow_dispatch:
push:
branches: [ develop ]
branches: [ dev ]
paths-ignore:
- '**.md'
- '.config/**'
- '.github/**'
- '.idea/**'
- '.run/**'
- 'assets/**'
pull_request:
types: [opened, synchronize, reopened]
Expand All @@ -17,6 +18,7 @@ on:
- '.config/**'
- '.github/**'
- '.idea/**'
- '.run/**'
- 'assets/**'

env:
Expand Down
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
2 changes: 1 addition & 1 deletion .run/Run Demo.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Demo" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="net.litetex.Application" />
<module name="standard-maven-template-demo" />
<module name="crt-sh-client-demo" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<extension name="coverage">
<pattern>
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 1.0.3
* Updated dependencies
* Migrated repository to organization

# 1.0.2
* Updated dependencies

# 1.0.1
* Added more fields to response
* Updated dependencies

# 1.0.0
* Initial release
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ You should have the following things installed:
* Ensure that the JDK/Java-Version is correct


## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/litetex-oss/standard-maven-template/release.yml?branch=master)](https://github.com/litetex-oss/standard-maven-template/actions/workflows/release.yml)
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/litetex-oss/crt-sh-client/release.yml?branch=master)](https://github.com/litetex-oss/crt-sh-client/actions/workflows/release.yml)

Before releasing:
* Consider doing a [test-deployment](https://github.com/litetex-oss/standard-maven-template/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
* Consider doing a [test-deployment](https://github.com/litetex-oss/crt-sh-client/actions/workflows/test-deploy.yml?query=branch%3Adev) before actually releasing.
* Check the [changelog](CHANGELOG.md)

If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes
If ``dev`` is ready for release, create a pull request to the ``master``-Branch and merge the changes

When the release is finished do the following:
* Merge the auto-generated PR (with the incremented version number) back into the ``develop``
* Merge the auto-generated PR (with the incremented version number) back into ``dev``
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
[![Latest version](https://img.shields.io/maven-central/v/net.litetex/standard-maven-template?logo=apache%20maven)](https://mvnrepository.com/artifact/net.litetex/standard-maven-template)
[![Build](https://img.shields.io/github/actions/workflow/status/litetex-oss/standard-maven-template/checkBuild.yml?branch=develop)](https://github.com/litetex-oss/standard-maven-template/actions/workflows/checkBuild.yml?query=branch%3Adevelop)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=litetex-oss_standard-maven-template&metric=alert_status)](https://sonarcloud.io/dashboard?id=litetex-oss_standard-maven-template)
[![Latest version](https://img.shields.io/maven-central/v/net.litetex/crt-sh-client?logo=apache%20maven)](https://mvnrepository.com/artifact/net.litetex/crt-sh-client)
[![Build](https://img.shields.io/github/actions/workflow/status/litetex-oss/crt-sh-client/checkBuild.yml?branch=dev)](https://github.com/litetex-oss/crt-sh-client/actions/workflows/checkBuild.yml?query=branch%3Adev)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=litetex_crt-sh-client&metric=alert_status)](https://sonarcloud.io/dashboard?id=litetex_crt-sh-client)
[![API Specification Editor](https://img.shields.io/badge/API--Spec-Editor-85ea2d?logo=swagger)](https://editor.swagger.io/?url=https://raw.githubusercontent.com/litetex-oss/crt-sh-client/dev/openapi/openapi.yml)
[![crt.sh Website](https://img.shields.io/website?up_color=00b373&url=https%3A%2F%2Fcrt.sh&label=crt.sh%20Website)](https://crt.sh)

# standard-maven-template
# <img src="https://crt.sh/favicon.ico" height="28" /> [crt-sh](https://crt.sh)-client

A Java client for [crt.sh](https://crt.sh).

This client [is generated](./crt-sh-client/pom.xml) from an [``openapi.yml``](./openapi/openapi.yml) using [OpenAPI Generator](https://openapi-generator.tech/).

## Installation
[Installation guide for the latest release](https://github.com/litetex-oss/standard-maven-template/releases/latest#Installation)

## Demo
A minimal demo is also available [here](./crt-sh-client-demo/src/main/java/net/litetex/Application.java).

## Contributing
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.

## Dependencies and Licenses
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://litetex-oss.github.io/standard-maven-template/dependencies/)
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://litetex-oss.github.io/crt-sh-client/dependencies/)

<sub>Disclaimer: This is not an official crt.sh product and not associated with crt.sh</sub>
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## Reporting a Vulnerability

Please report a security vulnerability [on GitHub Security Advisories](https://github.com/litetex-oss/standard-maven-template/security/advisories/new).
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/litetex-oss/crt-sh-client/security/advisories/new).
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
<modelVersion>4.0.0</modelVersion>

<groupId>net.litetex</groupId>
<artifactId>standard-maven-template-demo</artifactId>
<version>1.0.0-SNAPSHOT</version>
<artifactId>crt-sh-client-demo</artifactId>
<version>1.0.3-SNAPSHOT</version>
<packaging>jar</packaging>

<inceptionYear>2022</inceptionYear>

<properties>
<javaVersion>17</javaVersion>
<maven.compiler.release>${javaVersion}</maven.compiler.release>
Expand All @@ -17,14 +19,29 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<mainClass>net.litetex.Application</mainClass>

<log4j2-version>2.23.1</log4j2-version>
</properties>

<dependencies>
<dependency>
<groupId>net.litetex</groupId>
<artifactId>standard-maven-template</artifactId>
<artifactId>crt-sh-client</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Logging -->
<!-- SLF4J comes from Apache Httpclient -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j2-version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j2-version}</version>
</dependency>
</dependencies>

<build>
Expand All @@ -34,7 +51,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<version>3.13.0</version>
<configuration>
<release>${maven.compiler.release}</release>
<compilerArgs>
Expand All @@ -45,7 +62,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.0</version>
<version>3.7.1</version>
<configuration>
<archive>
<manifest>
Expand Down Expand Up @@ -85,7 +102,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.14.1</version>
<version>10.14.2</version>
</dependency>
</dependencies>
<configuration>
Expand Down
34 changes: 34 additions & 0 deletions crt-sh-client-demo/src/main/java/net/litetex/Application.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package net.litetex;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import net.litetex.crtsh.api.SearchApi;
import net.litetex.crtsh.model.Certificate;


public final class Application
{
public static final Logger LOG = LoggerFactory.getLogger(Application.class);

private Application()
{
}

public static void main(final String[] args)
{
final SearchApi searchApi = new SearchApi();

LOG.info("=== SEARCH ===");
final List<Certificate> certificates = searchApi.search(
"json",
"example.org",
"expired",
"Y",
null,
null);
LOG.info("Certificates: {}", certificates);
}
}
20 changes: 20 additions & 0 deletions crt-sh-client-demo/src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configuration>
<Configuration status="ERROR">

<Properties>
<Property name="consolePattern">%d{HH:mm:ss} %-5p [%t] [%-25.25c] %m %n</Property>
</Properties>

<Appenders>
<Console name="stdout" target="SYSTEM_OUT">
<PatternLayout pattern="${consolePattern}" />
</Console>
</Appenders>

<Loggers>
<Root level="INFO">
<AppenderRef ref="stdout"/>
</Root>
</Loggers>
</Configuration>
Loading

0 comments on commit 537df62

Please sign in to comment.