Skip to content

Commit

Permalink
update to jdk 11 (#23)
Browse files Browse the repository at this point in the history
* update to jdk 11

* using java 11

* clean

* update versions

* fix test-reporter

* fix path

* adjust path

* use install

* removed dependency graph

* removed cache as it is not working
  • Loading branch information
sterlp authored Dec 16, 2023
1 parent 3876106 commit 3c0e660
Show file tree
Hide file tree
Showing 44 changed files with 1,917 additions and 1,548 deletions.
70 changes: 35 additions & 35 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [master]
schedule:
- cron: '43 10 * * 2'
- cron: "43 10 * * 2"

jobs:
analyze:
Expand All @@ -21,40 +21,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'java' ]
language: ["java"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
14 changes: 8 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@ name: deploy tags

on:
push:
tags: ['v*.*.*']
tags: ["v*.*.*"]

jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4
-
name: Import GPG key
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PGP_PASSPHRASE }}

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: "zulu"
- name: Build site and deploy maven registry
env:
GPG_KEYNAME: ${{ secrets.PGP_KEYNAME }}
Expand Down
23 changes: 10 additions & 13 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: Java CI with Maven

on:
push:
branches: [master]
branches: [master, jdk8-version]
pull_request:
branches: [master]
branches: [master, jdk8-version]

jobs:
build:
Expand All @@ -15,22 +15,21 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 8
java-version: 11
distribution: "zulu"
cache: maven

- name: Build with Maven
run: mvn -B package --file pom.xml
run: mvn -B install --file pom.xml

- name: Report Junit
uses: dorny/test-reporter@v1
if: always()
with:
name: Test results
path: target/surefire-reports/*.xml
path: "**/**/surefire-reports/*.xml"
reporter: java-junit
fail-on-error: true

Expand All @@ -43,26 +42,24 @@ jobs:
path: "target/pmd.xml"
title: PMD Result

- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6

deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PGP_PASSPHRASE }}
- name: Set up JDK 1.8

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 8
java-version: 11
distribution: "zulu"
cache: maven

- name: Build and deploy maven registry
env:
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/target/
target/
.settings
.classpath
.project

.factorypath

/tmp1/
/sample.png
/sample2.png
tmp1/
sample.png
sample2.png
File renamed without changes
166 changes: 166 additions & 0 deletions cli/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.sterl.svg2png</groupId>
<artifactId>svg2png-root</artifactId>
<version>1.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>svg2png-cli</artifactId>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>svg2png-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.github.romankh3</groupId>
<artifactId>image-comparison</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<!--
https://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests
-->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.21.0</version>
<configuration>
<!-- failOnViolation is actually true by default, but can be
disabled -->
<failOnViolation>true</failOnViolation>
<!-- printFailingErrors is pretty useful -->
<printFailingErrors>true</printFailingErrors>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>false</minimizeJar>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>org.sterl.svg2png.Main</Main-Class>
<X-Compile-Source-JDK>${java.version}</X-Compile-Source-JDK>
<X-Compile-Target-JDK>${java.version}</X-Compile-Target-JDK>
</manifestEntries>
</transformer>
</transformers>
<!--
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/license/**</exclude>
<exclude>META-INF/*</exclude>
<exclude>META-INF/maven/**</exclude>
<exclude>LICENSE</exclude>
<exclude>NOTICE</exclude>
<exclude>/*.txt</exclude>
<exclude>build.properties</exclude>
</excludes>
</filter>
</filters>
-->
</configuration>
</execution>
</executions>
</plugin>
<!-- https://github.com/brianm/really-executable-jars-maven-plugin -->
<plugin>
<groupId>org.skife.maven</groupId>
<artifactId>really-executable-jar-maven-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<!-- value of flags will be interpolated into the java
invocation -->
<!-- as "java $flags -jar ..." -->
<flags>-Xmx1G</flags>

<!-- (optional) name for binary executable, if not set will
just -->
<!-- make the regular jar artifact executable -->
<programFile>svg2png</programFile>

<!-- (optional) name for a file that will define what script
gets -->
<!-- embedded into the executable jar. This can be used to -->
<!-- override the default startup script which is -->
<!-- `#!/bin/sh -->
<!-- -->
<!-- exec java " + flags + " -jar "$0" "$@" -->
<!--
<scriptFile>src/packaging/someScript.extension</scriptFile> -->
</configuration>

<executions>
<execution>
<phase>package</phase>
<goals>
<goal>really-executable-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit 3c0e660

Please sign in to comment.