Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 76ad405

Browse filesBrowse files
committed
Merge branch 'develop'
2 parents a191427 + 0afdbd5 commit 76ad405
Copy full SHA for 76ad405

File tree

70 files changed

+382
-354
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner

70 files changed

+382
-354
lines changed

‎.github/workflows/build.yml

Copy file name to clipboardExpand all lines: .github/workflows/build.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
workflow_dispatch:
1010

1111
repository_dispatch:
12-
type: [utPLSQL-build]
12+
type: [utPLSQL-build,utPLSQL-java-api-build]
1313

1414
jobs:
1515
build:

‎.gitignore

Copy file name to clipboardExpand all lines: .gitignore
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ dependency-reduced-pom.xml
2626
doc/
2727
/utPLSQL/
2828
/utPLSQL.zip
29+
/tree.txt

‎README.md

Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Please refer to the following usage example for the parameters descriptions:
9090
<plugin>
9191
<groupId>org.utplsql</groupId>
9292
<artifactId>utplsql-maven-plugin</artifactId>
93-
<version>3.1.9</version>
93+
<version>3.1.10</version>
9494
<executions>
9595
<execution>
9696
<goals>
@@ -152,6 +152,10 @@ Please refer to the following usage example for the parameters descriptions:
152152
<!-- Enables DBMS_OUTPUT -->
153153
<!-- Defaults to: false -->
154154
<dbmsOutput>false</dbmsOutput>
155+
156+
<!-- Sets a timeout around Reporter creation and retries when not ready after a while. -->
157+
<!-- 0 = no timeout. -->
158+
<ora-stuck-timeout>0</ora-stuck-timeout>
155159

156160
<!-- A list of tags to run. -->
157161
<tags>

‎mvnw

Copy file name to clipboardExpand all lines: mvnw
+85-2Lines changed: 85 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# ----------------------------------------------------------------------------
2020

2121
# ----------------------------------------------------------------------------
22-
# Maven2 Start Up Batch script
22+
# Maven Start Up Batch script
2323
#
2424
# Required ENV vars:
2525
# ------------------
@@ -114,7 +114,6 @@ if $mingw ; then
114114
M2_HOME="`(cd "$M2_HOME"; pwd)`"
115115
[ -n "$JAVA_HOME" ] &&
116116
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
117-
# TODO classpath?
118117
fi
119118

120119
if [ -z "$JAVA_HOME" ]; then
@@ -200,6 +199,85 @@ if [ -z "$BASE_DIR" ]; then
200199
exit 1;
201200
fi
202201

202+
##########################################################################################
203+
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
204+
# This allows using the maven wrapper in projects that prohibit checking in binary data.
205+
##########################################################################################
206+
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
207+
if [ "$MVNW_VERBOSE" = true ]; then
208+
echo "Found .mvn/wrapper/maven-wrapper.jar"
209+
fi
210+
else
211+
if [ "$MVNW_VERBOSE" = true ]; then
212+
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
213+
fi
214+
if [ -n "$MVNW_REPOURL" ]; then
215+
jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
216+
else
217+
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
218+
fi
219+
while IFS="=" read key value; do
220+
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
221+
esac
222+
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
223+
if [ "$MVNW_VERBOSE" = true ]; then
224+
echo "Downloading from: $jarUrl"
225+
fi
226+
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
227+
if $cygwin; then
228+
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
229+
fi
230+
231+
if command -v wget > /dev/null; then
232+
if [ "$MVNW_VERBOSE" = true ]; then
233+
echo "Found wget ... using wget"
234+
fi
235+
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
236+
wget "$jarUrl" -O "$wrapperJarPath"
237+
else
238+
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
239+
fi
240+
elif command -v curl > /dev/null; then
241+
if [ "$MVNW_VERBOSE" = true ]; then
242+
echo "Found curl ... using curl"
243+
fi
244+
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
245+
curl -o "$wrapperJarPath" "$jarUrl" -f
246+
else
247+
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
248+
fi
249+
250+
else
251+
if [ "$MVNW_VERBOSE" = true ]; then
252+
echo "Falling back to using Java to download"
253+
fi
254+
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
255+
# For Cygwin, switch paths to Windows format before running javac
256+
if $cygwin; then
257+
javaClass=`cygpath --path --windows "$javaClass"`
258+
fi
259+
if [ -e "$javaClass" ]; then
260+
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
261+
if [ "$MVNW_VERBOSE" = true ]; then
262+
echo " - Compiling MavenWrapperDownloader.java ..."
263+
fi
264+
# Compiling the Java class
265+
("$JAVA_HOME/bin/javac" "$javaClass")
266+
fi
267+
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
268+
# Running the downloader
269+
if [ "$MVNW_VERBOSE" = true ]; then
270+
echo " - Running MavenWrapperDownloader.java ..."
271+
fi
272+
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
273+
fi
274+
fi
275+
fi
276+
fi
277+
##########################################################################################
278+
# End of extension
279+
##########################################################################################
280+
203281
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
204282
if [ "$MVNW_VERBOSE" = true ]; then
205283
echo $MAVEN_PROJECTBASEDIR
@@ -218,6 +296,11 @@ if $cygwin; then
218296
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
219297
fi
220298

299+
# Provide a "standardized" way to retrieve the CLI args that will
300+
# work with both Windows and non-Windows executions.
301+
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
302+
export MAVEN_CMD_LINE_ARGS
303+
221304
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
222305

223306
exec "$JAVACMD" \

‎mvnw.cmd

Copy file name to clipboardExpand all lines: mvnw.cmd
+43-4Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
@REM ----------------------------------------------------------------------------
1919

2020
@REM ----------------------------------------------------------------------------
21-
@REM Maven2 Start Up Batch script
21+
@REM Maven Start Up Batch script
2222
@REM
2323
@REM Required ENV vars:
2424
@REM JAVA_HOME - location of a JDK home dir
2525
@REM
2626
@REM Optional ENV vars
2727
@REM M2_HOME - location of maven2's installed home dir
2828
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
29-
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
29+
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
3030
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
3131
@REM e.g. to debug Maven itself, use
3232
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@@ -35,7 +35,9 @@
3535

3636
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
3737
@echo off
38-
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
38+
@REM set title of command window
39+
title %0
40+
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
3941
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
4042

4143
@REM set %HOME% to equivalent of $HOME
@@ -115,10 +117,47 @@ for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do s
115117
:endReadAdditionalConfig
116118

117119
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
118-
119120
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
120121
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
121122

123+
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
124+
125+
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
126+
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
127+
)
128+
129+
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
130+
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
131+
if exist %WRAPPER_JAR% (
132+
if "%MVNW_VERBOSE%" == "true" (
133+
echo Found %WRAPPER_JAR%
134+
)
135+
) else (
136+
if not "%MVNW_REPOURL%" == "" (
137+
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
138+
)
139+
if "%MVNW_VERBOSE%" == "true" (
140+
echo Couldn't find %WRAPPER_JAR%, downloading it ...
141+
echo Downloading from: %DOWNLOAD_URL%
142+
)
143+
144+
powershell -Command "&{"^
145+
"$webclient = new-object System.Net.WebClient;"^
146+
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
147+
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
148+
"}"^
149+
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
150+
"}"
151+
if "%MVNW_VERBOSE%" == "true" (
152+
echo Finished downloading %WRAPPER_JAR%
153+
)
154+
)
155+
@REM End of extension
156+
157+
@REM Provide a "standardized" way to retrieve the CLI args that will
158+
@REM work with both Windows and non-Windows executions.
159+
set MAVEN_CMD_LINE_ARGS=%*
160+
122161
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
123162
if ERRORLEVEL 1 goto error
124163
goto end

‎pom.xml

Copy file name to clipboardExpand all lines: pom.xml
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>org.utplsql</groupId>
77
<artifactId>utplsql-maven-plugin</artifactId>
8-
<version>3.1.9</version>
8+
<version>3.1.10</version>
99
<packaging>maven-plugin</packaging>
1010

1111
<name>utPLSQL Maven Plugin</name>
@@ -78,13 +78,13 @@
7878
<dependency>
7979
<groupId>org.apache.maven.shared</groupId>
8080
<artifactId>maven-shared-utils</artifactId>
81-
<version>3.1.0</version>
81+
<version>3.3.4</version>
8282
</dependency>
8383

8484
<dependency>
8585
<groupId>org.utplsql</groupId>
8686
<artifactId>java-api</artifactId>
87-
<version>3.1.8</version>
87+
<version>3.1.9</version>
8888
</dependency>
8989

9090
<dependency>

‎scripts/sql/create_app_objects.sql

Copy file name to clipboard
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
whenever sqlerror exit failure rollback
22
whenever oserror exit failure rollback
33

4-
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/scripts/sources/TO_TEST_ME.tab
5-
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/scripts/sources/APP.PKG_TEST_ME.spc
6-
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/scripts/sources/APP.PKG_TEST_ME.bdy
4+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/scripts/sources/TO_TEST_ME.sql
5+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/scripts/sources/APP.PKG_TEST_ME.pks
6+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/scripts/sources/APP.PKG_TEST_ME.pkb
77

8-
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/scripts/tests/APP.TEST_PKG_TEST_ME.spc
9-
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/scripts/tests/APP.TEST_PKG_TEST_ME.bdy
8+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/scripts/tests/APP.TEST_PKG_TEST_ME.pks
9+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/scripts/tests/APP.TEST_PKG_TEST_ME.pkb
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
whenever sqlerror exit failure rollback
22
whenever oserror exit failure rollback
33

4-
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/scripts/sources/foo/tables/TO_TEST_ME.tab
5-
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/scripts/sources/foo/packages/PKG_TEST_ME.sql
6-
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/scripts/sources/foo/package_bodies/PKG_TEST_ME.sql
4+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/scripts/sources/foo/tables/TO_TEST_ME.sql
5+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/scripts/sources/foo/packages/PKG_TEST_ME.pks
6+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/scripts/sources/foo/package_bodies/PKG_TEST_ME.pkb

‎scripts/sql/create_tests_owner_objects.sql

Copy file name to clipboardExpand all lines: scripts/sql/create_tests_owner_objects.sql
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ whenever oserror exit failure rollback
44
create synonym TO_TEST_ME for CODE_OWNER.TO_TEST_ME;
55
create synonym PKG_TEST_ME for CODE_OWNER.PKG_TEST_ME;
66

7-
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/scripts/test/bar/packages/TEST_PKG_TEST_ME.sql
8-
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/scripts/test/bar/package_bodies/TEST_PKG_TEST_ME.sql
7+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/scripts/test/bar/packages/TEST_PKG_TEST_ME.pks
8+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/scripts/test/bar/package_bodies/TEST_PKG_TEST_ME.pkb

‎src/main/java/org/utplsql/maven/plugin/UtPlsqlMojo.java

Copy file name to clipboardExpand all lines: src/main/java/org/utplsql/maven/plugin/UtPlsqlMojo.java
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ public class UtPlsqlMojo extends AbstractMojo {
125125
@Parameter
126126
boolean dbmsOutput;
127127

128+
@Parameter(defaultValue = "0")
129+
Integer oraStuckTimeout;
130+
128131
private final SqlFileScanner sqlFileScanner = new SqlFileScanner();
129132

130133
@Override
@@ -160,7 +163,8 @@ public void execute() throws MojoExecutionException {
160163
.addTags(tags)
161164
.randomTestOrder(randomTestOrder)
162165
.randomTestOrderSeed(randomTestOrderSeed)
163-
.failOnErrors(!ignoreFailure);
166+
.failOnErrors(!ignoreFailure)
167+
.oraStuckTimeout(oraStuckTimeout);
164168

165169
if (isNotBlank(excludeObject)) {
166170
if (excludeObject.contains(",")) {

‎src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoIT.java

Copy file name to clipboardExpand all lines: src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoIT.java
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,11 @@ void include_object(MavenExecutionResult result) {
7575

7676
assertThatReportsAreGeneratedAsExpected(result, "sonar-test-report.xml", "coverage-sonar-report.xml");
7777
}
78+
79+
@MavenTest
80+
void ora_stuck_timeout(MavenExecutionResult result) {
81+
assertThat(result).isSuccessful();
82+
83+
assertThatReportsAreGeneratedAsExpected(result, "sonar-test-report.xml", "coverage-sonar-report.xml");
84+
}
7885
}

‎src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoTest.java

Copy file name to clipboardExpand all lines: src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoTest.java
+18-2Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ public void sources_tests_parameters() throws Exception {
8787
// check tests
8888
FileMapperOptions tests = utPlsqlMojo.buildTestsOptions();
8989
assertEquals(2, tests.getFilePaths().size());
90-
assertTrue(tests.getFilePaths().contains("te/st/file.bdy"));
91-
assertTrue(tests.getFilePaths().contains("te/st/spec.spc"));
90+
assertTrue(tests.getFilePaths().contains("te/st/file.pkb"));
91+
assertTrue(tests.getFilePaths().contains("te/st/spec.pks"));
9292
assertEquals("tests_owner", tests.getObjectOwner());
9393
assertEquals(".*/\\w+/(\\w+)/(\\w+)\\.\\w{3}", tests.getRegexPattern());
9494
assertEquals(Integer.valueOf(54), tests.getNameSubExpression());
@@ -272,6 +272,22 @@ public void skip_utplsql_tests() throws Exception {
272272
* <p>
273273
* Given : a pom.xml with dbmsOutput=true
274274
* When : pom is read
275+
* Then : Property is set
276+
*/
277+
@Test
278+
public void ora_stuck_timeout() throws Exception {
279+
UtPlsqlMojo utPlsqlMojo = createUtPlsqlMojo("ora_stuck_timeout");
280+
assertNotNull(utPlsqlMojo);
281+
282+
utPlsqlMojo.execute();
283+
}
284+
285+
286+
/**
287+
* Ora Stuck Timeout
288+
* <p>
289+
* Given : a pom.xml with ora-stuck-timeout set
290+
* When : pom is read
275291
* Then : DBMS_OUTPUT is enabled
276292
*/
277293
@Test

‎src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/include_object/scripts/sources/foo/packages/PKG_TEST_ME.sql

Copy file name to clipboardExpand all lines: src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/include_object/scripts/sources/foo/packages/PKG_TEST_ME.sql
-8Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.