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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@ All parameters are optional:
<!-- Default: 0 (no timeout) -->
<oraStuckTimeout>0</oraStuckTimeout>

<!-- Print the utPLSQL support line in the documentation, TAP and HTML coverage reports. -->
<!-- Requires utPLSQL 3.2.4 or newer. Default: true -->
<supportInfo>true</supportInfo>

<!-- Reporters and their output. -->
<!-- Default: UT_DOCUMENTATION_REPORTER to the console. -->
<reporters>
Expand Down Expand Up @@ -484,6 +488,7 @@ The plugin's integration tests double as examples, in
| `-r`, `--random-test-order` | `randomTestOrder` |
| `-seed`, `--random-test-order-seed` | `randomTestOrderSeed` |
| `--ora-stuck-timeout` | `oraStuckTimeout` |
| `--no-support-info` | `supportInfo` set to `false` |
| `-include` | `includeObject` |
| `-exclude` | `excludeObject` |
| `-include-schema-expr` | `includeSchemaExpr` |
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>17</maven.compiler.release>

<utplsql-java-api.version>3.2.5</utplsql-java-api.version>
<utplsql-java-api.version>3.2.6-SNAPSHOT</utplsql-java-api.version>

<!-- Minimum Maven API version required to run this plugin -->
<maven.version>3.9.9</maven.version>
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/org/utplsql/maven/plugin/UtPlsqlMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ public class UtPlsqlMojo extends AbstractMojo {
@Parameter(defaultValue = "0")
Integer oraStuckTimeout;

@Parameter(defaultValue = "true")
boolean supportInfo;

private final SqlFileScanner sqlFileScanner = new SqlFileScanner();

@Override
Expand Down Expand Up @@ -183,7 +186,8 @@ public void execute() throws MojoExecutionException {
.randomTestOrder(randomTestOrder)
.randomTestOrderSeed(randomTestOrderSeed)
.failOnErrors(!ignoreFailure)
.oraStuckTimeout(oraStuckTimeout);
.oraStuckTimeout(oraStuckTimeout)
.supportInfo(supportInfo);

if (isNotBlank(excludeObject)) {
if (excludeObject.contains(",")) {
Expand Down
26 changes: 26 additions & 0 deletions src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,32 @@ public void info(CharSequence content) {
return infoMessages;
}

/**
* Support info
* <p>
* Given : a pom.xml with supportInfo=false
* When : pom is read
* Then : Property is set
*/
@Test
@Basedir(UNIT_TESTS + "support_info")
void support_info(@InjectMojo(goal = "test", pom = "pom.xml") UtPlsqlMojo utPlsqlMojo) {
assertFalse(utPlsqlMojo.supportInfo);
}

/**
* Support info default
* <p>
* Given : a pom.xml without supportInfo
* When : pom is read
* Then : Property is true
*/
@Test
@Basedir(UNIT_TESTS + "ora_stuck_timeout")
void support_info_default(@InjectMojo(goal = "test", pom = "pom.xml") UtPlsqlMojo utPlsqlMojo) {
assertTrue(utPlsqlMojo.supportInfo);
}

/**
* Set ORA Stuck Timeout
* <p>
Expand Down
55 changes: 55 additions & 0 deletions src/test/resources/unit-tests/support_info/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.utplsql</groupId>
<artifactId>utplsql-maven-plugin-test</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>pom</packaging>

<properties>
<dbUrl>jdbc:oracle:thin:@//localhost:1521/FREEPDB1</dbUrl>
<dbUser>UT3</dbUser>
<dbPass>ut3</dbPass>
</properties>

<build>
<directory>../../../target</directory>
<plugins>
<plugin>
<groupId>org.utplsql</groupId>
<artifactId>utplsql-maven-plugin</artifactId>
<version>@project.version@</version>
<goals>
<goal>test</goal>
</goals>
<configuration>
<supportInfo>false</supportInfo>
<ignoreFailure>false</ignoreFailure>
<paths>
<path>app</path>
</paths>
<reporters>
<reporter>
<name>UT_DOCUMENTATION_REPORTER</name>
</reporter>
<reporter>
<name>UT_DOCUMENTATION_REPORTER</name>
<consoleOutput>false</consoleOutput>
</reporter>
<reporter>
<name>UT_COVERAGE_SONAR_REPORTER</name>
<fileOutput>coverage-sonar-report.xml</fileOutput>
</reporter>
<reporter>
<name>UT_SONAR_TEST_REPORTER</name>
<fileOutput>utplsql/sonar-test-report.xml</fileOutput>
<consoleOutput>true</consoleOutput>
</reporter>
</reporters>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading