Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ jobs:
matrix:
utplsql_version: ["v3.1.14","develop"]
utplsql_file: ["utPLSQL"]
jdk: ['8', '11', '17','21','25']
jdk: ['11', '17', '21', '25']
services:
oracle:
image: gvenzl/oracle-free:23-slim-faststart
env:
ORACLE_PASSWORD: oracle
DB_URL: "//localhost:1521/FREEPDB1"
DB_USER: APP
DB_PASS: APP
DB_PASS: pass
ports:
- 1521:1521
options: >-
Expand Down
105 changes: 57 additions & 48 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.utplsql</groupId>
<artifactId>cli</artifactId>
<version>3.1.10-SNAPSHOT</version>
<version>3.2.0-SNAPSHOT</version>

<name>utPLSQL CLI</name>
<description>CLI for running Unit Tests with utPLSQL v3+.</description>
Expand All @@ -13,9 +13,14 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>11</maven.compiler.release>
<junit.jupiter.version>5.5.2</junit.jupiter.version>
<oracle.jdbc.version>21.9.0.0</oracle.jdbc.version>
<junit.jupiter.version>5.12.2</junit.jupiter.version>
<picocli.version>4.7.7</picocli.version>
<logback.version>1.5.18</logback.version>
<hamcrest.version>2.2</hamcrest.version>
<travisBuildNumber>local</travisBuildNumber>

<sonar.organization>utplsql</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>

<licenses>
Expand All @@ -26,26 +31,44 @@
</license>
</licenses>

<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/utPLSQL/utPLSQL-java-api/issues</url>
</issueManagement>

<developers>
<developer>
<name>Vinicius Avellar Moreira</name>
<organization>utPLSQL.org</organization>
<organizationUrl>https://utplsql.org</organizationUrl>
<email>amvinicius@gmail.com</email>
</developer>
<developer>
<name>Samuel Nitsche</name>
<organization>utPLSQL.org</organization>
<organizationUrl>https://utplsql.org</organizationUrl>
<email>derpesse@gmail.com</email>
</developer>
<developer>
<name>Jacek Gebal</name>
<organization>utPLSQL.org</organization>
<organizationUrl>https://utplsql.org</organizationUrl>
<email>jgebal@gmail.com</email>
</developer>
<developer>
<name>Simon Martinelli</name>
<organization>utPLSQL.org</organization>
<organizationUrl>https://utplsql.org</organizationUrl>
<email>simon@martineli.ch</email>
<url>https://martinelli.ch</url>
</developer>
</developers>

<dependencies>
<dependency>
<groupId>org.utplsql</groupId>
<artifactId>java-api</artifactId>
<version>3.1.9</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>ucp</artifactId>
</exclusion>
<exclusion>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>ojdbc8</artifactId>
</exclusion>
<exclusion>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>orai18n</artifactId>
</exclusion>
</exclusions>
<artifactId>utplsql-java-api</artifactId>
<version>3.2.3</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
Expand All @@ -55,32 +78,13 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.13</version>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli</artifactId>
<version>4.6.3</version>
<version>${picocli.version}</version>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>${oracle.jdbc.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ucp</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.oracle.database.nls</groupId>
<artifactId>orai18n</artifactId>
<version>${oracle.jdbc.version}</version>
<scope>compile</scope>
</dependency>

<!-- Test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand All @@ -91,17 +95,22 @@
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>2.1</version>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.10</version>
<version>2.1.0</version>
<configuration>
<copyConfigurationDirectory>true</copyConfigurationDirectory>
<useWildcardClassPath>true</useWildcardClassPath>
Expand All @@ -119,7 +128,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<version>3.5.5</version>
<configuration>
<excludes>
<exclude>**/*IT.java</exclude>
Expand All @@ -129,7 +138,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version>
<version>3.5.5</version>
<executions>
<execution>
<goals>
Expand All @@ -142,7 +151,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<version>3.8.0</version>
<configuration>
<finalName>utPLSQL-cli</finalName>
<appendAssemblyId>false</appendAssemblyId>
Expand All @@ -154,7 +163,7 @@
<plugin>
<groupId>net.nicoulaj.maven.plugins</groupId>
<artifactId>checksum-maven-plugin</artifactId>
<version>1.10</version>
<version>1.11</version>
<configuration>
<fileSets>
<fileSet>
Expand All @@ -172,7 +181,7 @@
<plugin>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-plugin</artifactId>
<version>1.18.0</version>
<version>1.21.0</version>
<configuration>
<verbose>true</verbose>
<gitFlowConfig>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/utplsql/cli/RunAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ private void initDatabase(DataSource dataSource) throws SQLException {

compatibilityProxy = checkFrameworkCompatibility(conn);

logger.info("Successfully connected to database. UtPLSQL core: {}", compatibilityProxy.getVersionDescription());
logger.info("Oracle-Version: {}", new DefaultDatabaseInformation().getOracleVersion(conn));
logger.info("Connected to Oracle database: {}", new DefaultDatabaseInformation().getOracleVersion(conn));
logger.info("utPLSQL core: {}", compatibilityProxy.getVersionDescription());
} catch (SQLException e) {
if (e.getErrorCode() == 1017 || e.getErrorCode() == 12514) {
throw new DatabaseConnectionFailed(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@ public LocalAssetsCoverageHTMLReporter(String selfType, Object[] attributes) {
public Reporter init(Connection con, CompatibilityProxy compatibilityProxy, ReporterFactory reporterFactory) throws SQLException {
super.init(con, compatibilityProxy, reporterFactory);

if (hasOutputToFile()) {
if (hasOutputToFile() && assetsAreBundled()) {
writeReportAssetsTo(getPhysicalAssetPath());
}

return this;
}

private static boolean assetsAreBundled() {
return CoverageHTMLReporter.class.getResource("/CoverageHTMLReporter") != null;
}

private String getNameOfOutputFile() {
Path outputPath = Paths.get(options.getOutputFileName());
return outputPath.getName(outputPath.getNameCount() - 1).toString();
Expand All @@ -51,7 +55,7 @@ private Path getPhysicalAssetPath() {
}

private void setAssetsPathFromOptions() {
if (hasOutputToFile()) {
if (hasOutputToFile() && assetsAreBundled()) {
setAssetsPath(getNameOfOutputFile() + "_assets/");
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/utplsql/cli/CliVersionInfoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class CliVersionInfoTest {

@Test
void getCliVersionInfo() {
assertTrue(CliVersionInfo.getVersion().startsWith("3.1"));
assertTrue(CliVersionInfo.getVersion().startsWith("3.2"));
}
}
6 changes: 3 additions & 3 deletions src/test/java/org/utplsql/cli/TestHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class TestHelper {
private static String sPass;

static {
sUrl = EnvironmentVariableUtil.getEnvValue("DB_URL", "192.168.99.100:1521:XE");
sUser = EnvironmentVariableUtil.getEnvValue("DB_USER", "app");
sPass = EnvironmentVariableUtil.getEnvValue("DB_PASS", "app");
sUrl = EnvironmentVariableUtil.getEnvValue("DB_URL", "//localhost:1521/FREEPDB1");
sUser = EnvironmentVariableUtil.getEnvValue("DB_USER", "APP");
sPass = EnvironmentVariableUtil.getEnvValue("DB_PASS", "pass");
}

static RunPicocliCommand createPicocliRunCommand(String... args ) {
Expand Down
Loading