Skip to content

Commit 0832ffe

Browse files
authored
Merge pull request #228 from utPLSQL/feature/update_dependencies
Feature/update dependencies
2 parents 9a743f0 + 63a2510 commit 0832ffe

7 files changed

Lines changed: 155 additions & 69 deletions

File tree

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Test with utplsql-java-api snapshot
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
api_version:
7+
description: 'utplsql-java-api snapshot version (e.g. 3.2.4-SNAPSHOT)'
8+
required: true
9+
10+
repository_dispatch:
11+
types: [utPLSQL-java-api-build]
12+
13+
defaults:
14+
run:
15+
shell: bash
16+
17+
jobs:
18+
build:
19+
name: Test with utplsql-java-api ${{ github.event.client_payload.api_version || inputs.api_version }}
20+
runs-on: ubuntu-latest
21+
env:
22+
UTPLSQL_VERSION: develop
23+
UTPLSQL_FILE: utPLSQL
24+
DB_URL: "//localhost:1521/FREEPDB1"
25+
DB_USER: APP
26+
DB_PASS: APP
27+
28+
services:
29+
oracle:
30+
image: gvenzl/oracle-free:23-slim-faststart
31+
env:
32+
ORACLE_PASSWORD: oracle
33+
DB_URL: "//localhost:1521/FREEPDB1"
34+
DB_USER: APP
35+
DB_PASS: pass
36+
ports:
37+
- 1521:1521
38+
options: >-
39+
--health-cmd healthcheck.sh
40+
--health-interval 10s
41+
--health-timeout 5s
42+
--health-retries 10
43+
--name oracle
44+
45+
steps:
46+
- uses: actions/checkout@v4
47+
with:
48+
fetch-depth: 0
49+
50+
- uses: actions/setup-java@v5
51+
with:
52+
distribution: 'adopt'
53+
java-version: '17'
54+
55+
- name: Install utplsql
56+
run: .github/scripts/install_utplsql.sh
57+
58+
- name: Install demo project
59+
run: .github/scripts/install_demo_project.sh
60+
61+
- name: Build and Test
62+
run: |
63+
API_VERSION="${{ github.event.client_payload.api_version || inputs.api_version }}"
64+
mvn verify appassembler:assemble -Dutplsql-java-api.version="$API_VERSION"
65+
66+
slack-workflow-status:
67+
if: always()
68+
name: Post Workflow Status To Slack
69+
needs: [ build ]
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Slack Workflow Notification
73+
uses: Gamesight/slack-workflow-status@master
74+
with:
75+
repo_token: ${{secrets.GITHUB_TOKEN}}
76+
slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}}
77+
name: 'Github Actions[bot]'
78+
icon_url: 'https://octodex.github.com/images/mona-the-rivetertocat.png'

.github/workflows/build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Build and test
22

33
on:
44
push:
5+
branches: [ develop ]
56

67
pull_request:
78
branches: [ develop ]
@@ -29,17 +30,17 @@ jobs:
2930
strategy:
3031
fail-fast: false
3132
matrix:
32-
utplsql_version: ["v3.1.14","develop"]
33+
utplsql_version: ["v3.2.01","develop"]
3334
utplsql_file: ["utPLSQL"]
34-
jdk: ['8', '11', '17','21','25']
35+
jdk: ['11', '17', '21', '25']
3536
services:
3637
oracle:
3738
image: gvenzl/oracle-free:23-slim-faststart
3839
env:
3940
ORACLE_PASSWORD: oracle
4041
DB_URL: "//localhost:1521/FREEPDB1"
4142
DB_USER: APP
42-
DB_PASS: APP
43+
DB_PASS: pass
4344
ports:
4445
- 1521:1521
4546
options: >-

pom.xml

Lines changed: 61 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,24 @@
44

55
<groupId>org.utplsql</groupId>
66
<artifactId>cli</artifactId>
7-
<version>3.1.10-SNAPSHOT</version>
7+
<version>3.2.0-SNAPSHOT</version>
88

99
<name>utPLSQL CLI</name>
1010
<description>CLI for running Unit Tests with utPLSQL v3+.</description>
1111
<url>https://github.com/utPLSQL/utPLSQL-cli</url>
1212

1313
<properties>
14+
<utplsql-java-api.version>3.2.3</utplsql-java-api.version>
1415
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1516
<maven.compiler.release>11</maven.compiler.release>
16-
<junit.jupiter.version>5.5.2</junit.jupiter.version>
17-
<oracle.jdbc.version>21.9.0.0</oracle.jdbc.version>
17+
<junit.jupiter.version>5.12.2</junit.jupiter.version>
18+
<picocli.version>4.7.7</picocli.version>
19+
<logback.version>1.5.18</logback.version>
20+
<hamcrest.version>2.2</hamcrest.version>
1821
<travisBuildNumber>local</travisBuildNumber>
22+
23+
<sonar.organization>utplsql</sonar.organization>
24+
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
1925
</properties>
2026

2127
<licenses>
@@ -26,26 +32,44 @@
2632
</license>
2733
</licenses>
2834

35+
<issueManagement>
36+
<system>GitHub Issues</system>
37+
<url>https://github.com/utPLSQL/utPLSQL-java-api/issues</url>
38+
</issueManagement>
39+
40+
<developers>
41+
<developer>
42+
<name>Vinicius Avellar Moreira</name>
43+
<organization>utPLSQL.org</organization>
44+
<organizationUrl>https://utplsql.org</organizationUrl>
45+
<email>amvinicius@gmail.com</email>
46+
</developer>
47+
<developer>
48+
<name>Samuel Nitsche</name>
49+
<organization>utPLSQL.org</organization>
50+
<organizationUrl>https://utplsql.org</organizationUrl>
51+
<email>derpesse@gmail.com</email>
52+
</developer>
53+
<developer>
54+
<name>Jacek Gebal</name>
55+
<organization>utPLSQL.org</organization>
56+
<organizationUrl>https://utplsql.org</organizationUrl>
57+
<email>jgebal@gmail.com</email>
58+
</developer>
59+
<developer>
60+
<name>Simon Martinelli</name>
61+
<organization>utPLSQL.org</organization>
62+
<organizationUrl>https://utplsql.org</organizationUrl>
63+
<email>simon@martineli.ch</email>
64+
<url>https://martinelli.ch</url>
65+
</developer>
66+
</developers>
67+
2968
<dependencies>
3069
<dependency>
3170
<groupId>org.utplsql</groupId>
32-
<artifactId>java-api</artifactId>
33-
<version>3.1.9</version>
34-
<scope>compile</scope>
35-
<exclusions>
36-
<exclusion>
37-
<groupId>com.oracle.ojdbc</groupId>
38-
<artifactId>ucp</artifactId>
39-
</exclusion>
40-
<exclusion>
41-
<groupId>com.oracle.ojdbc</groupId>
42-
<artifactId>ojdbc8</artifactId>
43-
</exclusion>
44-
<exclusion>
45-
<groupId>com.oracle.ojdbc</groupId>
46-
<artifactId>orai18n</artifactId>
47-
</exclusion>
48-
</exclusions>
71+
<artifactId>utplsql-java-api</artifactId>
72+
<version>${utplsql-java-api.version}</version>
4973
</dependency>
5074
<dependency>
5175
<groupId>javax.xml.bind</groupId>
@@ -55,32 +79,13 @@
5579
<dependency>
5680
<groupId>ch.qos.logback</groupId>
5781
<artifactId>logback-classic</artifactId>
58-
<version>1.2.13</version>
82+
<version>${logback.version}</version>
5983
</dependency>
6084
<dependency>
6185
<groupId>info.picocli</groupId>
6286
<artifactId>picocli</artifactId>
63-
<version>4.6.3</version>
87+
<version>${picocli.version}</version>
6488
</dependency>
65-
<dependency>
66-
<groupId>com.oracle.database.jdbc</groupId>
67-
<artifactId>ojdbc8</artifactId>
68-
<version>${oracle.jdbc.version}</version>
69-
<scope>compile</scope>
70-
<exclusions>
71-
<exclusion>
72-
<groupId>com.oracle.database.jdbc</groupId>
73-
<artifactId>ucp</artifactId>
74-
</exclusion>
75-
</exclusions>
76-
</dependency>
77-
<dependency>
78-
<groupId>com.oracle.database.nls</groupId>
79-
<artifactId>orai18n</artifactId>
80-
<version>${oracle.jdbc.version}</version>
81-
<scope>compile</scope>
82-
</dependency>
83-
8489
<!-- Test -->
8590
<dependency>
8691
<groupId>org.junit.jupiter</groupId>
@@ -91,17 +96,22 @@
9196
<dependency>
9297
<groupId>org.hamcrest</groupId>
9398
<artifactId>hamcrest</artifactId>
94-
<version>2.1</version>
99+
<version>${hamcrest.version}</version>
95100
<scope>test</scope>
96101
</dependency>
97102
</dependencies>
98103

99104
<build>
100105
<plugins>
106+
<plugin>
107+
<groupId>org.apache.maven.plugins</groupId>
108+
<artifactId>maven-compiler-plugin</artifactId>
109+
<version>3.13.0</version>
110+
</plugin>
101111
<plugin>
102112
<groupId>org.codehaus.mojo</groupId>
103113
<artifactId>appassembler-maven-plugin</artifactId>
104-
<version>1.10</version>
114+
<version>2.1.0</version>
105115
<configuration>
106116
<copyConfigurationDirectory>true</copyConfigurationDirectory>
107117
<useWildcardClassPath>true</useWildcardClassPath>
@@ -119,7 +129,7 @@
119129
<plugin>
120130
<groupId>org.apache.maven.plugins</groupId>
121131
<artifactId>maven-surefire-plugin</artifactId>
122-
<version>2.22.0</version>
132+
<version>3.5.5</version>
123133
<configuration>
124134
<excludes>
125135
<exclude>**/*IT.java</exclude>
@@ -129,7 +139,7 @@
129139
<plugin>
130140
<groupId>org.apache.maven.plugins</groupId>
131141
<artifactId>maven-failsafe-plugin</artifactId>
132-
<version>2.22.0</version>
142+
<version>3.5.5</version>
133143
<executions>
134144
<execution>
135145
<goals>
@@ -142,7 +152,7 @@
142152
<plugin>
143153
<groupId>org.apache.maven.plugins</groupId>
144154
<artifactId>maven-assembly-plugin</artifactId>
145-
<version>3.3.0</version>
155+
<version>3.8.0</version>
146156
<configuration>
147157
<finalName>utPLSQL-cli</finalName>
148158
<appendAssemblyId>false</appendAssemblyId>
@@ -154,7 +164,7 @@
154164
<plugin>
155165
<groupId>net.nicoulaj.maven.plugins</groupId>
156166
<artifactId>checksum-maven-plugin</artifactId>
157-
<version>1.10</version>
167+
<version>1.11</version>
158168
<configuration>
159169
<fileSets>
160170
<fileSet>
@@ -172,7 +182,7 @@
172182
<plugin>
173183
<groupId>com.amashchenko.maven.plugin</groupId>
174184
<artifactId>gitflow-maven-plugin</artifactId>
175-
<version>1.18.0</version>
185+
<version>1.21.0</version>
176186
<configuration>
177187
<verbose>true</verbose>
178188
<gitFlowConfig>
@@ -201,16 +211,9 @@
201211

202212
<repositories>
203213
<repository>
204-
<id>utplsql-java-api</id>
205-
<url>
206-
https://packagecloud.io/utplsql/utplsql-java-api/maven2
207-
</url>
208-
<releases>
209-
<enabled>true</enabled>
210-
</releases>
211-
<snapshots>
212-
<enabled>true</enabled>
213-
</snapshots>
214+
<id>central-snapshots</id>
215+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
216+
<snapshots><enabled>true</enabled></snapshots>
214217
</repository>
215218
</repositories>
216219

src/main/java/org/utplsql/cli/RunAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ private void initDatabase(DataSource dataSource) throws SQLException {
192192

193193
compatibilityProxy = checkFrameworkCompatibility(conn);
194194

195-
logger.info("Successfully connected to database. UtPLSQL core: {}", compatibilityProxy.getVersionDescription());
196-
logger.info("Oracle-Version: {}", new DefaultDatabaseInformation().getOracleVersion(conn));
195+
logger.info("Connected to Oracle database: {}", new DefaultDatabaseInformation().getOracleVersion(conn));
196+
logger.info("utPLSQL core: {}", compatibilityProxy.getVersionDescription());
197197
} catch (SQLException e) {
198198
if (e.getErrorCode() == 1017 || e.getErrorCode() == 12514) {
199199
throw new DatabaseConnectionFailed(e);

src/main/java/org/utplsql/cli/reporters/LocalAssetsCoverageHTMLReporter.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,17 @@ public LocalAssetsCoverageHTMLReporter(String selfType, Object[] attributes) {
2929
public Reporter init(Connection con, CompatibilityProxy compatibilityProxy, ReporterFactory reporterFactory) throws SQLException {
3030
super.init(con, compatibilityProxy, reporterFactory);
3131

32-
if (hasOutputToFile()) {
32+
if (hasOutputToFile() && assetsAreBundled()) {
3333
writeReportAssetsTo(getPhysicalAssetPath());
3434
}
3535

3636
return this;
3737
}
3838

39+
private static boolean assetsAreBundled() {
40+
return CoverageHTMLReporter.class.getResource("/CoverageHTMLReporter") != null;
41+
}
42+
3943
private String getNameOfOutputFile() {
4044
Path outputPath = Paths.get(options.getOutputFileName());
4145
return outputPath.getName(outputPath.getNameCount() - 1).toString();
@@ -51,7 +55,7 @@ private Path getPhysicalAssetPath() {
5155
}
5256

5357
private void setAssetsPathFromOptions() {
54-
if (hasOutputToFile()) {
58+
if (hasOutputToFile() && assetsAreBundled()) {
5559
setAssetsPath(getNameOfOutputFile() + "_assets/");
5660
}
5761
}

src/test/java/org/utplsql/cli/CliVersionInfoTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ class CliVersionInfoTest {
88

99
@Test
1010
void getCliVersionInfo() {
11-
assertTrue(CliVersionInfo.getVersion().startsWith("3.1"));
11+
assertTrue(CliVersionInfo.getVersion().startsWith("3.2"));
1212
}
1313
}

src/test/java/org/utplsql/cli/TestHelper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ class TestHelper {
1919
private static String sPass;
2020

2121
static {
22-
sUrl = EnvironmentVariableUtil.getEnvValue("DB_URL", "192.168.99.100:1521:XE");
23-
sUser = EnvironmentVariableUtil.getEnvValue("DB_USER", "app");
24-
sPass = EnvironmentVariableUtil.getEnvValue("DB_PASS", "app");
22+
sUrl = EnvironmentVariableUtil.getEnvValue("DB_URL", "//localhost:1521/FREEPDB1");
23+
sUser = EnvironmentVariableUtil.getEnvValue("DB_USER", "APP");
24+
sPass = EnvironmentVariableUtil.getEnvValue("DB_PASS", "pass");
2525
}
2626

2727
static RunPicocliCommand createPicocliRunCommand(String... args ) {

0 commit comments

Comments
 (0)