diff --git a/.github/scripts/1_install_utplsql.sh b/.github/scripts/1_install_utplsql.sh new file mode 100755 index 0000000..88ae94c --- /dev/null +++ b/.github/scripts/1_install_utplsql.sh @@ -0,0 +1,30 @@ +#!/bin/bash +set -ev +cd $(dirname $(readlink -f $0)) + +# Download the specified version of utPLSQL. +if [ "$UTPLSQL_VERSION" == "develop" ] +then + git clone -b develop --single-branch https://github.com/utPLSQL/utPLSQL.git +else + curl -L -O "https://github.com/utPLSQL/utPLSQL/releases/download/$UTPLSQL_VERSION/$UTPLSQL_FILE.tar.gz" + tar -xzf ${UTPLSQL_FILE}.tar.gz && rm ${UTPLSQL_FILE}.tar.gz +fi + +chmod -R go+w ./${UTPLSQL_FILE}/{source,examples} +# Create a temporary install script. +cat > install.sh.tmp <- + --health-cmd healthcheck.sh + --health-interval 10s + --health-timeout 5s + --health-retries 10 + --name oracle + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up JDK + uses: actions/setup-java@v5 + with: + distribution: 'temurin' + java-version: '21' + + - name: Install utplsql + run: .github/scripts/1_install_utplsql.sh + + - name: Install demo project + run: .github/scripts/2_install_demo_project.sh + + - name: Build and Test + run: | + API_VERSION="${{ github.event.client_payload.api_version || inputs.api_version }}" + mvn clean verify sonar:sonar -Pcoverage -Dsonar.projectKey=utPLSQL_utPLSQL-maven-plugin -Dutplsql-java-api.version="$API_VERSION" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3a4e7b..1202fd9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,23 +2,26 @@ name: Build and deploy snapshot on: push: - branches-ignore: [ main ] + branches: [ develop ] pull_request: branches: [ develop ] workflow_dispatch: - repository_dispatch: - type: [utPLSQL-build,utPLSQL-java-api-build] - jobs: build: runs-on: ubuntu-latest + env: + UTPLSQL_VERSION: develop + UTPLSQL_FILE: utPLSQL + DB_URL: "//localhost:1521/FREEPDB1" + DB_USER: APP + DB_PASS: pass services: oracle: - image: gvenzl/oracle-xe:21-slim + image: gvenzl/oracle-free:23-slim-faststart env: ORACLE_PASSWORD: oracle ports: @@ -28,31 +31,30 @@ jobs: --health-interval 10s --health-timeout 5s --health-retries 10 + --name oracle steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 + - uses: actions/checkout@v4 - name: Install utPLSQL - run: sh ${{ github.workspace }}/scripts/1_install_utplsql.sh + run: .github/scripts/1_install_utplsql.sh - name: Install demo project - run: sh ${{ github.workspace }}/scripts/2_install_demo_project.sh + run: .github/scripts/2_install_demo_project.sh - - name: Set up JDK 11 - uses: actions/setup-java@v2 + - name: Set up JDK 17 + uses: actions/setup-java@v5 with: - java-version: '11' - distribution: 'adopt' - server-id: ossrh + java-version: '17' + distribution: 'temurin' + server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} @@ -60,12 +62,13 @@ jobs: ${{ runner.os }}-maven- - name: Maven unit and integration tests with sonar - run: mvn clean verify sonar:sonar -Pcoverage -Dsonar.projectKey=org.utplsql:utplsql-maven-plugin + run: mvn clean verify sonar:sonar -Pcoverage -Dsonar.projectKey=utPLSQL_utPLSQL-maven-plugin env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - name: Maven deploy snapshot + if: github.event_name != 'pull_request' run: mvn deploy -DskipTests env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} @@ -73,23 +76,7 @@ jobs: MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - name: Publish unit test results - uses: EnricoMi/publish-unit-test-result-action@v1.24 + uses: EnricoMi/publish-unit-test-result-action@v2 if: always() with: files: target/**/TEST**.xml - - slack-workflow-status: - if: always() - name: Post Workflow Status To Slack - needs: [ build ] - runs-on: ubuntu-latest - steps: - - name: Slack Workflow Notification - uses: Gamesight/slack-workflow-status@master - with: - # Required Input - repo_token: ${{secrets.GITHUB_TOKEN}} - slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}} - # Optional Input - name: 'Github Actions[bot]' - icon_url: 'https://octodex.github.com/images/mona-the-rivetertocat.png' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4825e34..455c1cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,74 +1,113 @@ -name: Build and deploy release +name: Release on: - push: - branches: [ main ] + workflow_dispatch: + inputs: + release_version: + description: 'Release version (e.g. 3.2.3)' + required: true + next_snapshot: + description: 'Next development version (default: auto-increment patch, e.g. 3.2.4) without the "-SNAPSHOT" word' + required: false -jobs: - build: +permissions: + contents: write + id-token: write + attestations: write + +defaults: + run: + shell: bash +jobs: + release: runs-on: ubuntu-latest + env: + UTPLSQL_VERSION: develop + UTPLSQL_FILE: utPLSQL + DB_URL: "//localhost:1521/FREEPDB1" + DB_USER: APP + DB_PASS: pass - services: - oracle: - image: gvenzl/oracle-xe:21-slim - env: - ORACLE_PASSWORD: oracle - ports: - - 1521:1521 - options: >- - --health-cmd healthcheck.sh - --health-interval 10s - --health-timeout 5s - --health-retries 10 +# services: +# oracle: +# image: gvenzl/oracle-free:23-slim-faststart +# env: +# ORACLE_PASSWORD: oracle +# ports: +# - 1521:1521 +# options: >- +# --health-cmd healthcheck.sh +# --health-interval 10s +# --health-timeout 5s +# --health-retries 10 +# --name oracle steps: - - uses: actions/checkout@v2 - - - name: Install utPLSQL - run: sh ${{ github.workspace }}/scripts/1_install_utplsql.sh + - uses: actions/checkout@v4 + with: + fetch-depth: 0 - - name: Install demo project - run: sh ${{ github.workspace }}/scripts/2_install_demo_project.sh +# - name: Install utPLSQL +# run: .github/scripts/1_install_utplsql.sh +# +# - name: Install demo project +# run: .github/scripts/2_install_demo_project.sh - - name: Set up JDK 11 - uses: actions/setup-java@v2 + - name: Set up JDK + uses: actions/setup-java@v5 with: - java-version: '11' - distribution: 'adopt' - server-id: ossrh + distribution: 'temurin' + java-version: '21' + cache: 'maven' + server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE - - name: Cache local Maven repository - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + - name: Configure Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" - - name: Maven deploy release - run: mvn clean deploy -Prelease - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} + - name: Set release version + run: mvn versions:set -DnewVersion=${{ inputs.release_version }} -DgenerateBackupPoms=false - slack-workflow-status: - if: always() - name: Post Workflow Status To Slack - needs: [ build ] - runs-on: ubuntu-latest - steps: - - name: Slack Workflow Notification - uses: Gamesight/slack-workflow-status@master +# - name: Maven deploy release +# run: mvn clean deploy -Prelease +# env: +# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} +# MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} +# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} + + - name: Commit and tag release version + run: | + git add pom.xml + git commit -m "Release v${{ inputs.release_version }}" + git tag -a "v${{ inputs.release_version }}" -m "Release ${{ inputs.release_version }}" + + - name: Calculate and set next development version + run: | + if [[ -n "${{ inputs.next_snapshot }}" ]]; then + NEXT="${{ inputs.next_snapshot }}-SNAPSHOT" + else + IFS='.' read -r major minor patch <<< "${{ inputs.release_version }}" + NEXT="${major}.${minor}.$((patch + 1))-SNAPSHOT" + fi + mvn -B versions:set -DnewVersion="$NEXT" -DgenerateBackupPoms=false + git add pom.xml + git commit -m "Prepare next development version $NEXT [skip ci]" + + - name: Push commits and tag + run: | + git push origin HEAD:${{ github.ref_name }} + git push origin "v${{ inputs.release_version }}" + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 with: - # Required Input - repo_token: ${{secrets.GITHUB_TOKEN}} - slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}} - # Optional Input - name: 'Github Actions[bot]' - icon_url: 'https://octodex.github.com/images/mona-the-rivetertocat.png' + tag_name: v${{ inputs.release_version }} + name: "utPLSQL-cli v${{ inputs.release_version }}" + generate_release_notes: true + fail_on_unmatched_files: true diff --git a/README.md b/README.md index d57328f..3efb1d6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ -[![Build status](https://github.com/utPLSQL/utPLSQL-maven-plugin/actions/workflows/build.yml/badge.svg)](https://github.com/utPLSQL/utPLSQL-maven-plugin/actions/workflows/build.yml) -[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=org.utplsql%3Autplsql-maven-plugin&metric=alert_status)](https://sonarcloud.io/dashboard?id=org.utplsql%3Autplsql-maven-plugin) +[![latest-release](https://img.shields.io/github/release/utPLSQL/utPLSQL-maven-plugin.svg)](https://github.com/utPLSQL/utPLSQL-maven-plugin/releases) +[![license](https://img.shields.io/github/license/utPLSQL/utPLSQL-cli.svg)](https://www.apache.org/licenses/LICENSE-2.0) +[![Build](https://github.com/utPLSQL/utPLSQL-maven-plugin/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/utPLSQL/utPLSQL-maven-plugin/actions/workflows/build.yml) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=utPLSQL_utPLSQL-maven-plugin&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=utPLSQL_utPLSQL-maven-plugin) # utPLSQL-maven-plugin @@ -11,18 +13,8 @@ This plugin is compatible with utPLSQL 3.1.0+. ## Prerequisites -* Java SE Runtime Environment 8 -* Maven Version 3.5+ -* Oracle JDBC driver - -```xml - - - com.oracle.database.jdbc - ojdbc8 - 21.3.0.0 - -``` +* Java SE Runtime Environment 17 +* Maven Version 3.9.9+ ## Usage @@ -31,7 +23,6 @@ This plugin is compatible with utPLSQL 3.1.0+. To skip running the tests for a particular project, set the **skipUtplsqlTests** property to true. ```xml - true @@ -47,7 +38,6 @@ If you want to skip tests by default but want the ability to re-enable tests fro properties section in the pom: ```xml - true @@ -62,7 +52,6 @@ This will allow you to run with all tests disabled by default and to run them wi Please refer to the following usage example for the parameters descriptions: ```xml - @@ -181,7 +170,7 @@ Please refer to the following usage example for the parameters descriptions: app.test1,app.test2 - app.test1,app.test2 + app.test1,app.test2 app.test1,app.test2 @@ -267,35 +256,35 @@ directory: ## Comparison with utPLSQL CLI -| CLI short parameter | CLI long parameter | Maven XML path | -| --- | --- | --- | -| -c | --color | | -| | --failure-exit-code | | -| -p | --path | paths.path | -| -f | --format | reporters.reporter.name | -| -o | | reporters.reporter.fileOutput | -| -s | | reporters.reporter.consoleOutput | -| | | ignoreFailure | -| -scc | --skip-compatibility-check | skipCompatibilityCheck | -| | --tags | tags.tag | -| -D | --dbms_output | dbmsOutput | -| -r | --random-test-order | randomTestOrder | -| -seed | --random-test-order-seed | randomTestOrderSeed | -| -exclude | | excludeObject | -| -include | | includeObject | -| | | | -| -source_path | | sources.source.directory | -| -owner | | sourcesOwner | -| -regex_expression | | sourcesRegexExpression | -| -type_mapping | | list of testsCustomTypeMapping.customTypeMapping | -| -owner_subexpression | | sourcesOwnerSubexpression | -| -type_subexpression | | sourcesTypeSubexpression | -| -name_subexpression | | sourcesNameSubexpression | -| | | | -| -test_path | | tests.test.directory | -| -owner | | testsOwner | -| -regex_expression | | testsRegexExpression | -| -type_mapping | | list of testsCustomTypeMapping.customTypeMapping | -| -owner_subexpression | | testsOwnerSubexpression | -| -type_subexpression | | testsTypeSubexpression | -| -name_subexpression | | testsNameSubexpression | +| CLI short parameter | CLI long parameter | Maven XML path | +|----------------------|----------------------------|--------------------------------------------------| +| -c | --color | | +| | --failure-exit-code | | +| -p | --path | paths.path | +| -f | --format | reporters.reporter.name | +| -o | | reporters.reporter.fileOutput | +| -s | | reporters.reporter.consoleOutput | +| | | ignoreFailure | +| -scc | --skip-compatibility-check | skipCompatibilityCheck | +| | --tags | tags.tag | +| -D | --dbms_output | dbmsOutput | +| -r | --random-test-order | randomTestOrder | +| -seed | --random-test-order-seed | randomTestOrderSeed | +| -exclude | | excludeObject | +| -include | | includeObject | +| | | | +| -source_path | | sources.source.directory | +| -owner | | sourcesOwner | +| -regex_expression | | sourcesRegexExpression | +| -type_mapping | | list of testsCustomTypeMapping.customTypeMapping | +| -owner_subexpression | | sourcesOwnerSubexpression | +| -type_subexpression | | sourcesTypeSubexpression | +| -name_subexpression | | sourcesNameSubexpression | +| | | | +| -test_path | | tests.test.directory | +| -owner | | testsOwner | +| -regex_expression | | testsRegexExpression | +| -type_mapping | | list of testsCustomTypeMapping.customTypeMapping | +| -owner_subexpression | | testsOwnerSubexpression | +| -type_subexpression | | testsTypeSubexpression | +| -name_subexpression | | testsNameSubexpression | diff --git a/pom.xml b/pom.xml index b8f50b8..4f06dce 100644 --- a/pom.xml +++ b/pom.xml @@ -5,13 +5,31 @@ org.utplsql utplsql-maven-plugin - 3.1.11 + 3.2.0 maven-plugin utPLSQL Maven Plugin A maven plugin for running Unit Tests with utPLSQL v3+. https://github.com/utPLSQL/utPLSQL-maven-plugin + + UTF-8 + 17 + + 3.2.4 + + + 3.9.9 + + 3.15.2 + + 0.13.1 + 5.12.2 + + utplsql + https://sonarcloud.io + + Apache License, Version 2.0 @@ -26,6 +44,11 @@ utPLSQL.org http://utplsql.org + + Jacek Gebal + utPLSQL.org + https://utplsql.org + Simon Martinelli utPLSQL.org @@ -38,31 +61,29 @@ https://github.com/utPLSQL/utPLSQL-maven-plugin + + + central-snapshots + https://central.sonatype.com/repository/maven-snapshots/ + + true + + + false + + + + - ossrh - https://oss.sonatype.org/content/repositories/snapshots + central + https://central.sonatype.com/repository/maven-snapshots/ - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - 1.8 - 1.8 - UTF-8 - - 3.5.2 - 0.11.0 - 5.8.1 - - utplsql - https://sonarcloud.io - + org.apache.maven maven-core @@ -72,31 +93,19 @@ org.apache.maven.plugin-tools maven-plugin-annotations - ${maven.version} + ${maven.plugin.tools.version} provided org.apache.maven.shared maven-shared-utils - 3.3.4 + 3.4.2 org.utplsql utplsql-java-api - 3.1.15 - - - - com.oracle.database.jdbc - ojdbc8 - 21.3.0.0 - - - - org.codehaus.plexus - plexus-utils - 3.1.0 + ${utplsql-java-api.version} @@ -109,7 +118,7 @@ org.apache.maven.plugin-testing maven-plugin-testing-harness - 3.3.0 + 3.5.1 test @@ -142,22 +151,27 @@ org.slf4j slf4j-simple - 1.7.32 + 2.0.17 test + + org.apache.maven.plugins + maven-compiler-plugin + 3.14.0 + org.apache.maven.plugins maven-surefire-plugin - 2.22.2 + 3.5.5 org.apache.maven.plugins maven-failsafe-plugin - 2.22.2 + 3.5.5 @@ -185,7 +199,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.2 + 3.6.2 package @@ -194,18 +208,11 @@ - - - - org.utplsql:java-api - - - org.apache.maven.plugins maven-plugin-plugin - ${maven.version} + ${maven.plugin.tools.version} utplsql true @@ -228,7 +235,7 @@ com.amashchenko.maven.plugin gitflow-maven-plugin - 1.16.0 + 1.21.0 true @@ -247,7 +254,7 @@ org.jacoco jacoco-maven-plugin - 0.8.7 + 0.8.13 prepare-agent @@ -278,7 +285,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + 3.12.0 attach-javadocs @@ -291,7 +298,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.1 + 3.4.0 attach-sources @@ -302,10 +309,21 @@ + + org.sonatype.central + central-publishing-maven-plugin + 0.10.0 + true + + central + true + published + + org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + 3.2.8 sign-artifacts diff --git a/scripts/0_start_db.sh b/scripts/0_start_db.sh deleted file mode 100644 index d319407..0000000 --- a/scripts/0_start_db.sh +++ /dev/null @@ -1 +0,0 @@ -docker run -d --name ora-utplsql -p 1521:1521 -e ORACLE_PASSWORD=oracle gvenzl/oracle-xe:21-slim diff --git a/scripts/1_install_utplsql.sh b/scripts/1_install_utplsql.sh deleted file mode 100644 index bb6577c..0000000 --- a/scripts/1_install_utplsql.sh +++ /dev/null @@ -1,8 +0,0 @@ -UTPLSQL_DOWNLOAD_URL=$(curl --silent https://api.github.com/repos/utPLSQL/utPLSQL/releases/latest | awk '/browser_download_url/ { print $2 }' | grep ".zip\"" | sed 's/"//g') - -curl -Lk "${UTPLSQL_DOWNLOAD_URL}" -o utPLSQL.zip - -unzip -q utPLSQL.zip - -docker run --rm -v $(pwd)/utPLSQL:/utPLSQL -w /utPLSQL/source --network host \ - --entrypoint sqlplus truemark/sqlplus:19.8 sys/oracle@//127.0.0.1:1521/XE as sysdba @install_headless.sql UT3 UT3 users diff --git a/src/main/java/org/utplsql/maven/plugin/io/SqlFileScanner.java b/src/main/java/org/utplsql/maven/plugin/io/SqlFileScanner.java index f126769..14001fe 100644 --- a/src/main/java/org/utplsql/maven/plugin/io/SqlFileScanner.java +++ b/src/main/java/org/utplsql/maven/plugin/io/SqlFileScanner.java @@ -1,7 +1,7 @@ package org.utplsql.maven.plugin.io; import org.apache.maven.model.Resource; -import org.codehaus.plexus.util.DirectoryScanner; +import org.apache.maven.shared.utils.io.DirectoryScanner; import java.io.File; import java.io.IOException; diff --git a/src/test/java/org/utplsql/maven/plugin/ReportChecker.java b/src/test/java/org/utplsql/maven/plugin/ReportChecker.java index 3818674..828989e 100644 --- a/src/test/java/org/utplsql/maven/plugin/ReportChecker.java +++ b/src/test/java/org/utplsql/maven/plugin/ReportChecker.java @@ -28,10 +28,10 @@ private ReportChecker() { */ public static void assertThatReportsAreGeneratedAsExpected(MavenExecutionResult result, String... files) { for (String filename : files) { - File expectedOutputFile = new File(result.getMavenProjectResult().getTargetProjectDirectory(), "/expected-output/utplsql/" + filename); - File outputFile = new File(result.getMavenProjectResult().getTargetProjectDirectory(), "/target/utplsql/" + filename); + File expectedOutputFile = new File(result.getMavenProjectResult().getTargetProjectDirectory().toFile(), "expected-output/utplsql/" + filename); + File outputFile = new File(result.getMavenProjectResult().getTargetProjectDirectory().toFile(), "target/utplsql/" + filename); - assertThat(result.getMavenProjectResult()).withFile("/utplsql/" + filename).exists(); + assertThat(result.getMavenProjectResult()).withFile("utplsql/" + filename).exists(); try (Stream stream = Files.lines(outputFile.toPath())) { String outputContent = stream @@ -60,7 +60,7 @@ public static void assertThatReportsAreGeneratedAsExpected(MavenExecutionResult * @return if report exits */ public static boolean reportWasGenerated(MavenExecutionResult result, String filename) { - File outputFile = new File(result.getMavenProjectResult().getTargetProjectDirectory(), "/target/utplsql/" + filename); + File outputFile = new File(result.getMavenProjectResult().getTargetProjectDirectory().toFile(), "/target/utplsql/" + filename); return outputFile.exists(); } } diff --git a/src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoTest.java b/src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoTest.java index 6315072..3e144be 100644 --- a/src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoTest.java +++ b/src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoTest.java @@ -308,18 +308,18 @@ public void dbms_output() throws Exception { */ @Test public void db_config_using_system_properties() throws Exception { - System.setProperty("dbUrl", "jdbc:oracle:thin:@localhost:1521:xe"); + System.setProperty("dbUrl", "jdbc:oracle:thin:@//localhost:1521/FREEPDB1"); System.setProperty("dbUser", "UT3"); - System.setProperty("dbPass", "UT3"); + System.setProperty("dbPass", "ut3"); UtPlsqlMojo utPlsqlMojo = createUtPlsqlMojo("db_config_using_system_properties"); assertNotNull(utPlsqlMojo); utPlsqlMojo.execute(); - System.setProperty("dbUrl", ""); - System.setProperty("dbUser", ""); - System.setProperty("dbPass", ""); + System.clearProperty("dbUrl"); + System.clearProperty("dbUser"); + System.clearProperty("dbPass"); } /** @@ -370,7 +370,7 @@ public void include_object_expr() throws Exception { utPlsqlMojo.execute(); - assertEquals("*", utPlsqlMojo.includeObjectExpr); + assertEquals("APP.*", utPlsqlMojo.includeObjectExpr); } /** @@ -405,7 +405,7 @@ public void include_schema_expr() throws Exception { utPlsqlMojo.execute(); - assertEquals("*", utPlsqlMojo.includeSchemaExpr); + assertEquals("APP", utPlsqlMojo.includeSchemaExpr); } /** diff --git a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/exclude_object/pom.xml b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/exclude_object/pom.xml index 15411c2..9ae222d 100644 --- a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/exclude_object/pom.xml +++ b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/exclude_object/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@localhost:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/exclude_object_expr/pom.xml b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/exclude_object_expr/pom.xml index 22d0869..8e1701a 100644 --- a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/exclude_object_expr/pom.xml +++ b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/exclude_object_expr/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@localhost:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/include_object/pom.xml b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/include_object/pom.xml index ee6d13f..ae6edd8 100644 --- a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/include_object/pom.xml +++ b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/include_object/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@localhost:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/include_object_expr/expected-output/utplsql/coverage-sonar-report.xml b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/include_object_expr/expected-output/utplsql/coverage-sonar-report.xml index 2dbcb4d..f59ddcf 100644 --- a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/include_object_expr/expected-output/utplsql/coverage-sonar-report.xml +++ b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/include_object_expr/expected-output/utplsql/coverage-sonar-report.xml @@ -1 +1 @@ - + diff --git a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/include_object_expr/pom.xml b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/include_object_expr/pom.xml index e807d13..1369fda 100644 --- a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/include_object_expr/pom.xml +++ b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/include_object_expr/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@localhost:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 @@ -42,7 +42,7 @@ true - app.* + TEST_PKG_.*_ME diff --git a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/minimalist/pom.xml b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/minimalist/pom.xml index 40759d2..6a1a36a 100644 --- a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/minimalist/pom.xml +++ b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/minimalist/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@localhost:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/ora_stuck_timeout/pom.xml b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/ora_stuck_timeout/pom.xml index f0c33da..8c88c5c 100644 --- a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/ora_stuck_timeout/pom.xml +++ b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/ora_stuck_timeout/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@localhost:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/pom.xml b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/pom.xml index 961940b..c43a7e5 100644 --- a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/pom.xml +++ b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@localhost:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/regex/pom.xml b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/regex/pom.xml index 2620738..02fddc2 100644 --- a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/regex/pom.xml +++ b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/regex/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@localhost:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/pom.xml b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/pom.xml index c174c87..dbb4a25 100644 --- a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/pom.xml +++ b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@localhost:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/skip/pom.xml b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/skip/pom.xml index f9264fb..e0b2e44 100644 --- a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/skip/pom.xml +++ b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/skip/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@localhost:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/tags/pom.xml b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/tags/pom.xml index 01150a1..d027db2 100644 --- a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/tags/pom.xml +++ b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/tags/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@localhost:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/type_mapping/pom.xml b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/type_mapping/pom.xml index 3cf0033..555a850 100644 --- a/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/type_mapping/pom.xml +++ b/src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/type_mapping/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@localhost:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources/unit-tests/db_config_using_system_properties/pom.xml b/src/test/resources/unit-tests/db_config_using_system_properties/pom.xml index 814c181..a2c510f 100644 --- a/src/test/resources/unit-tests/db_config_using_system_properties/pom.xml +++ b/src/test/resources/unit-tests/db_config_using_system_properties/pom.xml @@ -14,7 +14,7 @@ org.utplsql utplsql-maven-plugin - @proj + @project.version@ test diff --git a/src/test/resources/unit-tests/dbms_output/pom.xml b/src/test/resources/unit-tests/dbms_output/pom.xml index 4f45635..13037fb 100644 --- a/src/test/resources/unit-tests/dbms_output/pom.xml +++ b/src/test/resources/unit-tests/dbms_output/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 @@ -20,7 +20,7 @@ org.utplsql utplsql-maven-plugin - @proj + @project.version@ test diff --git a/src/test/resources/unit-tests/default_console_output_behaviour/pom.xml b/src/test/resources/unit-tests/default_console_output_behaviour/pom.xml index ac6b14c..5b980dc 100644 --- a/src/test/resources/unit-tests/default_console_output_behaviour/pom.xml +++ b/src/test/resources/unit-tests/default_console_output_behaviour/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources/unit-tests/default_reporter/pom.xml b/src/test/resources/unit-tests/default_reporter/pom.xml index 8f03e25..d4411d8 100644 --- a/src/test/resources/unit-tests/default_reporter/pom.xml +++ b/src/test/resources/unit-tests/default_reporter/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources/unit-tests/exclude_object/pom.xml b/src/test/resources/unit-tests/exclude_object/pom.xml index d65fde3..43f83ca 100644 --- a/src/test/resources/unit-tests/exclude_object/pom.xml +++ b/src/test/resources/unit-tests/exclude_object/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 @@ -20,7 +20,7 @@ org.utplsql utplsql-maven-plugin - @proj + @project.version@ test diff --git a/src/test/resources/unit-tests/exclude_object_expr/pom.xml b/src/test/resources/unit-tests/exclude_object_expr/pom.xml index 7993e05..7db4090 100644 --- a/src/test/resources/unit-tests/exclude_object_expr/pom.xml +++ b/src/test/resources/unit-tests/exclude_object_expr/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 @@ -20,7 +20,7 @@ org.utplsql utplsql-maven-plugin - @proj + @project.version@ test diff --git a/src/test/resources/unit-tests/exclude_schema_expr/pom.xml b/src/test/resources/unit-tests/exclude_schema_expr/pom.xml index 28df05e..e0fa712 100644 --- a/src/test/resources/unit-tests/exclude_schema_expr/pom.xml +++ b/src/test/resources/unit-tests/exclude_schema_expr/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 @@ -20,7 +20,7 @@ org.utplsql utplsql-maven-plugin - @proj + @project.version@ test diff --git a/src/test/resources/unit-tests/include_object/pom.xml b/src/test/resources/unit-tests/include_object/pom.xml index f031df5..6da5ff1 100644 --- a/src/test/resources/unit-tests/include_object/pom.xml +++ b/src/test/resources/unit-tests/include_object/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 @@ -20,7 +20,7 @@ org.utplsql utplsql-maven-plugin - @proj + @project.version@ test diff --git a/src/test/resources/unit-tests/include_object_expr/pom.xml b/src/test/resources/unit-tests/include_object_expr/pom.xml index 636098b..967f725 100644 --- a/src/test/resources/unit-tests/include_object_expr/pom.xml +++ b/src/test/resources/unit-tests/include_object_expr/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 @@ -20,7 +20,7 @@ org.utplsql utplsql-maven-plugin - @proj + @project.version@ test @@ -44,7 +44,7 @@ true - * + APP.* diff --git a/src/test/resources/unit-tests/include_schema_expr/pom.xml b/src/test/resources/unit-tests/include_schema_expr/pom.xml index f953ec0..9193e5b 100644 --- a/src/test/resources/unit-tests/include_schema_expr/pom.xml +++ b/src/test/resources/unit-tests/include_schema_expr/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 @@ -20,7 +20,7 @@ org.utplsql utplsql-maven-plugin - @proj + @project.version@ test @@ -44,7 +44,7 @@ true - * + APP diff --git a/src/test/resources/unit-tests/invalid_sources_directory/pom.xml b/src/test/resources/unit-tests/invalid_sources_directory/pom.xml index af6643d..74c84ea 100644 --- a/src/test/resources/unit-tests/invalid_sources_directory/pom.xml +++ b/src/test/resources/unit-tests/invalid_sources_directory/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources/unit-tests/invalid_tests_directory/pom.xml b/src/test/resources/unit-tests/invalid_tests_directory/pom.xml index c7380ef..e6f868a 100644 --- a/src/test/resources/unit-tests/invalid_tests_directory/pom.xml +++ b/src/test/resources/unit-tests/invalid_tests_directory/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources/unit-tests/ora_stuck_timeout/pom.xml b/src/test/resources/unit-tests/ora_stuck_timeout/pom.xml index f04825c..fbb4dcd 100644 --- a/src/test/resources/unit-tests/ora_stuck_timeout/pom.xml +++ b/src/test/resources/unit-tests/ora_stuck_timeout/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 @@ -20,7 +20,7 @@ org.utplsql utplsql-maven-plugin - @proj + @project.version@ test diff --git a/src/test/resources/unit-tests/skip_utplsql_tests/pom.xml b/src/test/resources/unit-tests/skip_utplsql_tests/pom.xml index 3e978d5..dd99f13 100644 --- a/src/test/resources/unit-tests/skip_utplsql_tests/pom.xml +++ b/src/test/resources/unit-tests/skip_utplsql_tests/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources/unit-tests/sources_and_tests_parameter_does_not_exist/pom.xml b/src/test/resources/unit-tests/sources_and_tests_parameter_does_not_exist/pom.xml index a556a7e..83b1daa 100644 --- a/src/test/resources/unit-tests/sources_and_tests_parameter_does_not_exist/pom.xml +++ b/src/test/resources/unit-tests/sources_and_tests_parameter_does_not_exist/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources/unit-tests/sources_and_tests_parameter_does_not_exist_but_default_directory_exists/pom.xml b/src/test/resources/unit-tests/sources_and_tests_parameter_does_not_exist_but_default_directory_exists/pom.xml index a556a7e..83b1daa 100644 --- a/src/test/resources/unit-tests/sources_and_tests_parameter_does_not_exist_but_default_directory_exists/pom.xml +++ b/src/test/resources/unit-tests/sources_and_tests_parameter_does_not_exist_but_default_directory_exists/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources/unit-tests/sources_and_tests_parameter_have_not_directory_tag/pom.xml b/src/test/resources/unit-tests/sources_and_tests_parameter_have_not_directory_tag/pom.xml index d5382b4..16d419c 100644 --- a/src/test/resources/unit-tests/sources_and_tests_parameter_have_not_directory_tag/pom.xml +++ b/src/test/resources/unit-tests/sources_and_tests_parameter_have_not_directory_tag/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources/unit-tests/sources_and_tests_parameter_have_not_includes_tag/pom.xml b/src/test/resources/unit-tests/sources_and_tests_parameter_have_not_includes_tag/pom.xml index d33e917..52adc45 100644 --- a/src/test/resources/unit-tests/sources_and_tests_parameter_have_not_includes_tag/pom.xml +++ b/src/test/resources/unit-tests/sources_and_tests_parameter_have_not_includes_tag/pom.xml @@ -10,9 +10,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3 diff --git a/src/test/resources/unit-tests/sources_tests_parameters/pom.xml b/src/test/resources/unit-tests/sources_tests_parameters/pom.xml index 6f4c2d0..9ec7a27 100644 --- a/src/test/resources/unit-tests/sources_tests_parameters/pom.xml +++ b/src/test/resources/unit-tests/sources_tests_parameters/pom.xml @@ -9,9 +9,9 @@ pom - jdbc:oracle:thin:@127.0.0.1:1521:xe + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 UT3 - UT3 + ut3