From ce417cceb5fda1f7fd9cb8a2ab51736a57724dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20G=C4=99bal?= Date: Tue, 1 Dec 2026 14:30:33 +0200 Subject: [PATCH] Add supportInfo configuration parameter false leaves out the utPLSQL support line from the documentation, TAP and HTML coverage reports. It defaults to true and needs utPLSQL 3.2.4 or newer and utPLSQL-java-api 3.2.6, whose snapshot the build depends on. --- README.md | 5 ++ pom.xml | 2 +- .../org/utplsql/maven/plugin/UtPlsqlMojo.java | 6 +- .../utplsql/maven/plugin/UtPlsqlMojoTest.java | 26 +++++++++ .../resources/unit-tests/support_info/pom.xml | 55 +++++++++++++++++++ 5 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 src/test/resources/unit-tests/support_info/pom.xml diff --git a/README.md b/README.md index f8f482f..124a927 100644 --- a/README.md +++ b/README.md @@ -346,6 +346,10 @@ All parameters are optional: 0 + + + true + @@ -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` | diff --git a/pom.xml b/pom.xml index 026859a..494ea15 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ UTF-8 17 - 3.2.5 + 3.2.6-SNAPSHOT 3.9.9 diff --git a/src/main/java/org/utplsql/maven/plugin/UtPlsqlMojo.java b/src/main/java/org/utplsql/maven/plugin/UtPlsqlMojo.java index 11830ec..0ea6bae 100644 --- a/src/main/java/org/utplsql/maven/plugin/UtPlsqlMojo.java +++ b/src/main/java/org/utplsql/maven/plugin/UtPlsqlMojo.java @@ -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 @@ -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(",")) { diff --git a/src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoTest.java b/src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoTest.java index 63a3ea9..9ef0748 100644 --- a/src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoTest.java +++ b/src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoTest.java @@ -321,6 +321,32 @@ public void info(CharSequence content) { return infoMessages; } + /** + * Support info + *

+ * 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 + *

+ * 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 *

diff --git a/src/test/resources/unit-tests/support_info/pom.xml b/src/test/resources/unit-tests/support_info/pom.xml new file mode 100644 index 0000000..e36460f --- /dev/null +++ b/src/test/resources/unit-tests/support_info/pom.xml @@ -0,0 +1,55 @@ + + 4.0.0 + + org.utplsql + utplsql-maven-plugin-test + 3.1.0-SNAPSHOT + pom + + + jdbc:oracle:thin:@//localhost:1521/FREEPDB1 + UT3 + ut3 + + + + ../../../target + + + org.utplsql + utplsql-maven-plugin + @project.version@ + + test + + + false + false + + app + + + + UT_DOCUMENTATION_REPORTER + + + UT_DOCUMENTATION_REPORTER + false + + + UT_COVERAGE_SONAR_REPORTER + coverage-sonar-report.xml + + + UT_SONAR_TEST_REPORTER + utplsql/sonar-test-report.xml + true + + + + + + +