Last active
February 22, 2018 19:11
-
-
Save nochmu/1f640b01a685f3f83a349de2db8a8882 to your computer and use it in GitHub Desktop.
call utPLSQL-CLI with exec-maven-plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project> | |
... | |
<properties> | |
<!-- Datbase --> | |
<db.host>oradev</db.host> | |
<db.port>1521</db.port> | |
<db.service>dev.loc</db.service> | |
<db.user.test>TEST</db.user.test> | |
<db.pw.test>test</db.pw.test> | |
<!-- Path to utplsql (see https://github.com/utPLSQL/utPLSQL-cli) --> | |
<utplsql.cli>${basedir}/lib/utPLSQL-cli/bin/utplsql</utplsql.cli> | |
<!-- ConnectionURL --> | |
<utplsql.url>${db.user.test}/${db.pw.test}@//${db.host}/${db.service}</utplsql.url> | |
<!-- Output directory --> | |
<utplsql.out>${project.build.directory}/utplsql/</utplsql.out> | |
</properties> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>exec-maven-plugin</artifactId> | |
<version>1.6.0</version> | |
<executions> | |
<execution> | |
<id>utplsql-mkdir</id> <!-- create the output directory --> | |
<phase>process-test-classes</phase> | |
<goals> | |
<goal>exec</goal> | |
</goals> | |
<configuration> | |
<longModulepath>false</longModulepath> | |
<executable>mkdir</executable> | |
<arguments> | |
<argument>-p</argument> | |
<argument>${utplsql.out}</argument> | |
</arguments> | |
</configuration> | |
</execution> | |
<execution> | |
<id>utplsql-run</id> <!-- run utPLSQL --> | |
<phase>test</phase> | |
<goals> | |
<goal>exec</goal> | |
</goals> | |
<configuration> | |
<executable>${utplsql.cli}</executable> | |
<workingDirectory>${project.build.directory}</workingDirectory> | |
<arguments> | |
<argument>run</argument> | |
<argument>${utplsql.url}</argument> | |
<argument>-f=ut_documentation_reporter</argument> | |
<argument>-s</argument> | |
<argument>-f=ut_xunit_reporter</argument> | |
<argument>-o=${utplsql.out}/xunit.xml</argument> | |
<argument>-f=ut_coverage_html_reporter</argument> | |
<argument>-o=${utplsql.out}/coverage.html</argument> | |
<argument>--failure-exit-code=1</argument> | |
</arguments> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
... | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome idea. Thanks for sharing this.