diff --git a/.github/workflows/clear_artifacts.yml b/.github/workflows/clear_artifacts.yml
index 75b8aa96..85991ce3 100644
--- a/.github/workflows/clear_artifacts.yml
+++ b/.github/workflows/clear_artifacts.yml
@@ -7,7 +7,11 @@ jobs:
delete-artifacts:
runs-on: ubuntu-latest
steps:
- - uses: kolpav/purge-artifacts-action@v1
+ - name: Purge Artifacts
+ if: env.ACCESS_TOKEN != null
+ uses: kolpav/purge-artifacts-action@v1
with:
- token: ${{ secrets. access_token }}
+ token: ${{ secrets.access_token }}
expire-in: 2days # Setting this to 0 will delete all artifacts
+ env:
+ ACCESS_TOKEN: ${{ secrets.access_token }}
diff --git a/pom.xml b/pom.xml
index 4c0cd40a..285f9831 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
io.mosip
mimoto
- 0.2.0-SNAPSHOT
+ 1.2.0-SNAPSHOT
mimoto
Mobile server backend supporting Inji.
@@ -50,7 +50,9 @@
1.2.3
- 2.13.1
+ 2.13.2
+
+ 2.13.2.2
20180130
2.2.10
20180813
@@ -192,7 +194,7 @@
ch.qos.logback
logback-core
- 1.2.6
+ 1.2.9
joda-time
@@ -238,7 +240,7 @@
com.fasterxml.jackson.core
jackson-databind
- ${jackson.version}
+ ${jackson.databind.version}
com.fasterxml.jackson.core
@@ -513,9 +515,9 @@
- pl.project13.maven
- git-commit-id-plugin
- 3.0.1
+ io.github.git-commit-id
+ git-commit-id-maven-plugin
+ 5.0.0
get-the-git-infos
@@ -527,48 +529,48 @@
true
- ${project.build.outputDirectory}/git.properties
+ ${project.build.outputDirectory}/build.json
^git.build.(time|version)$
^git.commit.id.(abbrev|full)$
+ ^git.branch$
full
- ${project.basedir}/.git
-
-
-
-
-
-
-
- sonar
-
- .
- src/main/java/**,src/main/resources/**
- ${sonar.coverage.exclusions}
- https://sonarcloud.io
-
-
- false
-
-
-
-
- org.sonarsource.scanner.maven
- sonar-maven-plugin
- ${maven.sonar.plugin.version}
-
-
- verify
-
- sonar
-
-
-
-
-
-
-
-
+ json
+
+
+
+
+
+
+ sonar
+
+ .
+ src/main/java/**,src/main/resources/**
+ ${sonar.coverage.exclusions}
+ https://sonarcloud.io
+
+
+ false
+
+
+
+
+ org.sonarsource.scanner.maven
+ sonar-maven-plugin
+ ${maven.sonar.plugin.version}
+
+
+ verify
+
+ sonar
+
+
+
+
+
+
+
+
-
+
diff --git a/scripts/generate_THIRDPARTY.md.py b/scripts/generate_THIRDPARTY.md.py
new file mode 100644
index 00000000..f2371f88
--- /dev/null
+++ b/scripts/generate_THIRDPARTY.md.py
@@ -0,0 +1,20 @@
+# Generates THIRDPARTY.md license report as gathered from pom.xml
+# Usage:
+# pip install markdownify
+# python scripts/generate_THIRDPARTY.md.py
+#
+# A THIRDPARTY.md file is generated at project's root folder.
+
+import markdownify
+import subprocess
+import sys
+
+subprocess.run(['mvn', 'clean'])
+subprocess.run(['mvn', 'project-info-reports:dependencies'])
+html = open('target/site/dependencies.html').read()
+h = markdownify.markdownify(html, heading_style="ATX")
+with open('THIRDPARTY.md','w') as f:
+ for line in h.splitlines():
+ if 'Project Dependency Graph' in line:
+ break
+ print(line, file=f)
diff --git a/src/main/java/io/mosip/mimoto/MimotoServiceApplication.java b/src/main/java/io/mosip/mimoto/MimotoServiceApplication.java
index aa822f6b..b89cf5fa 100644
--- a/src/main/java/io/mosip/mimoto/MimotoServiceApplication.java
+++ b/src/main/java/io/mosip/mimoto/MimotoServiceApplication.java
@@ -1,5 +1,8 @@
package io.mosip.mimoto;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.json.simple.JSONObject;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration;
@@ -15,22 +18,18 @@
import io.mosip.mimoto.service.impl.CbeffImpl;
import io.mosip.mimoto.spi.CbeffUtil;
-@SpringBootApplication(
- scanBasePackages = {
+@SpringBootApplication(scanBasePackages = {
"io.mosip.mimoto.*",
"${mosip.auth.adapter.impl.basepackage}"
- },
- exclude = {
+}, exclude = {
SecurityAutoConfiguration.class,
DataSourceAutoConfiguration.class,
HibernateJpaAutoConfiguration.class,
CacheAutoConfiguration.class
- }
-)
+})
@EnableScheduling
@EnableAsync
public class MimotoServiceApplication {
-
@Bean
@Primary
public CbeffUtil getCbeffUtil() {
@@ -45,7 +44,27 @@ public ThreadPoolTaskScheduler taskScheduler() {
return threadPoolTaskScheduler;
}
+ public static JSONObject getGitProp() {
+ try {
+ return (new ObjectMapper()).readValue(
+ MimotoServiceApplication.class.getClassLoader().getResourceAsStream("build.json"),
+ JSONObject.class
+ );
+ } catch (Exception e) {
+ System.err.println("Error when trying to read build.json file: " + e);
+ }
+ return new JSONObject();
+ }
+
public static void main(String[] args) {
+ JSONObject gitProp = getGitProp();
+ System.out.println(
+ String.format(
+ "Mimoto Service version: %s - revision: %s @ branch: %s | build @ %s",
+ gitProp.get("git.build.version"),
+ gitProp.get("git.commit.id.abbrev"),
+ gitProp.get("git.branch"),
+ gitProp.get("git.build.time")));
SpringApplication.run(MimotoServiceApplication.class, args);
}