-
Notifications
You must be signed in to change notification settings - Fork 11
First approach to increase the functionality of the maven plugin #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5938316
Rebuild the Mojo Plugin in order to add parameters the the Java UtPLSQL
alberto-hernandez e612ad2
Adding report handling
rostskadat 3cb6bee
Adding handling of <paths>
rostskadat 2193755
Exposing more parameters
rostskadat 6324461
Fixed path attribute.
rostskadat 963e128
Added some output when writing report
rostskadat a0c0fd1
Using lambda function for dumping parameters
rostskadat 7f6cf27
Adding possibility to output to stdout
rostskadat 1b0fa02
Added some documentation
rostskadat 3c59e97
Removed handling of <includeObject> and <excludeObject>.
rostskadat 16b60d8
Log which report logs to the stdout
rostskadat 37d4591
Added friendly message for invalid <sources> and <tests> resources
rostskadat d74cbb4
Update README.md
alberto-hernandez b214363
Added Optional parameters to plugin
alberto-hernandez 6b179c0
Update README.md
alberto-hernandez bdb8c10
* Modified Reporters Configuration
alberto-hernandez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,101 @@ | ||
| # utPLSQL-maven-plugin | ||
| A maven plugin for running Unit Tests with utPLSQL v3+ | ||
|
|
||
| ### Compatibility | ||
|
|
||
| This plugin is compatible with the Java-API 3.0.4. | ||
|
|
||
| ### Prerequisites | ||
| You have to be a fully utPLSQL environment available compatible with the Java API. | ||
|
|
||
|
|
||
| ### Plugin Parameters | ||
|
|
||
| * `url` | ||
| * URL of the Connection to the database | ||
| * Default: `${dbURL}` | ||
| * `user` | ||
| * Credential of the connection to the database | ||
| * Default: `${dbUser}` | ||
| * `password` | ||
| * Password of the connection to the database | ||
| * Default: `${dbPass}` | ||
| * `ignoreFailure` | ||
| * Ignore or continue when a test fail | ||
| * Default: `${maven.test.failure.ignore}` | ||
| * `skipCompatibilityCheck` | ||
| * Skip the Compatibility Checks | ||
| * `true` | `false` (default: `false`) | ||
| * `reporters` | ||
| * List of the Reporters (Check the example below). | ||
| * You can pass the name of the reporter and/or the output file of the reporter and/or if the report is logged to the console | ||
| * This is a current list of the names of the reporters (See UtPLSQL documentation in order to check the final list): `UT_DOCUMENTATION_REPORTER`, `UT_COVERAGE_HTML_REPORTER`, `UT_TEAMCITY_REPORTER`, `UT_XUNIT_REPORTER`, `UT_COVERALLS_REPORTER`, `UT_COVERAGE_SONAR_REPORTER`, `UT_SONAR_TEST_REPORTER` | ||
| * Check the example below | ||
|
|
||
| * `paths` | ||
| * Paths of the resources | ||
| * `sources` | ||
| * Sources of the scripts at the style of the maven resources | ||
| * `tests` | ||
| * Test fo the scripts at the style of the maven resources | ||
| * `targetDir` | ||
| * Target dir, this is a readonly property | ||
| * Default: `${project.build.directory}` | ||
| * `includeObject` | ||
| * Include Object | ||
| * `excludeObject` | ||
| * Exclude Objects | ||
|
|
||
|
|
||
|
|
||
| ### Sample of use | ||
| The next snippet is a sample of declaration of the pom | ||
| ```xml | ||
| <plugin> | ||
| <groupId>org.utplsql</groupId> | ||
| <artifactId>utplsql-maven-plugin</artifactId> | ||
| <version>1.0.0-SNAPSHOT</version> | ||
| <goals> | ||
| <goal>test</goal> | ||
| </goals> | ||
| <configuration> | ||
| <url>url_of_connection</url> | ||
| <user>user</user> | ||
| <password>password</password> | ||
| <failOnErrors>false</failOnErrors> | ||
| <reporters> | ||
| <reporter> | ||
| <name>UT_COVERAGE_SONAR_REPORTER</name> | ||
| <fileOutput>utplsql/coverage-sonar-reporter.xml</fileOutput> | ||
| <consoleOutput>true</consoleOutput> | ||
| </reporter> | ||
| <reporter> | ||
| <name>UT_SONAR_TEST_REPORTER</name> | ||
| <fileOutput>utplsql/sonar-test-reporter.xml</fileOutput> | ||
| <consoleOutput>false</consoleOutput> | ||
| </reporter> | ||
| <reporter> | ||
| <name>UT_TEAMCITY_REPORTER</name> | ||
| </reporter> | ||
| </reporters> | ||
| <sources> | ||
| <source> | ||
| <directory>src/test/resources/scripts/sources</directory> | ||
| <includes> | ||
| <include>**/*pkg</include> | ||
| <include>**/*pkb</include> | ||
| </includes> | ||
| </source> | ||
| </sources> | ||
| <tests> | ||
| <test> | ||
| <directory>src/test/resources/scripts/test</directory> | ||
| <includes> | ||
| <include>**/*pkg</include> | ||
| <include>**/*pkb</include> | ||
| </includes> | ||
| </test> | ||
| </tests> | ||
| </configuration> | ||
| </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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,110 +1,126 @@ | ||
| <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> | ||
|
|
||
| <parent> | ||
| <groupId>org.utplsql</groupId> | ||
| <artifactId>utplsql-maven-plugin-build</artifactId> | ||
| <version>1.0-SNAPSHOT</version> | ||
| </parent> | ||
|
|
||
| <artifactId>utplsql-maven-plugin</artifactId> | ||
| <packaging>maven-plugin</packaging> | ||
|
|
||
| <name>utplsql-maven-plugin Maven Plugin</name> | ||
|
|
||
| <!-- FIXME change it to the project's website --> | ||
| <url>http://maven.apache.org</url> | ||
|
|
||
| <properties> | ||
| </properties> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.utplsql</groupId> | ||
| <artifactId>java-api</artifactId> | ||
| <version>1.0-SNAPSHOT</version> | ||
| <scope>compile</scope> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.apache.maven</groupId> | ||
| <artifactId>maven-plugin-api</artifactId> | ||
| <version>${maven.version}</version> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.apache.maven</groupId> | ||
| <artifactId>maven-core</artifactId> | ||
| <version>${maven.version}</version> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.apache.maven.plugin-tools</groupId> | ||
| <artifactId>maven-plugin-annotations</artifactId> | ||
| <version>3.5</version> | ||
| <scope>provided</scope> | ||
| </dependency> | ||
|
|
||
| <!-- test dependencies --> | ||
|
|
||
| <dependency> | ||
| <groupId>org.apache.maven.plugin-testing</groupId> | ||
| <artifactId>maven-plugin-testing-harness</artifactId> | ||
| <version>3.3.0</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.apache.maven</groupId> | ||
| <artifactId>maven-compat</artifactId> | ||
| <version>${maven.version}</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>junit</groupId> | ||
| <artifactId>junit</artifactId> | ||
| <version>4.12</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.assertj</groupId> | ||
| <artifactId>assertj-core</artifactId> | ||
| <version>3.8.0</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-compiler-plugin</artifactId> | ||
| <version>3.7.0</version> | ||
| <configuration> | ||
| <source>1.8</source> | ||
| <target>1.8</target> | ||
| </configuration> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-plugin-plugin</artifactId> | ||
| <version>3.5</version> | ||
| <executions> | ||
| <execution> | ||
| <id>default-descriptor</id> | ||
| <phase>process-classes</phase> | ||
| </execution> | ||
| <execution> | ||
| <id>help-goal</id> | ||
| <goals> | ||
| <goal>helpmojo</goal> | ||
| </goals> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| 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</artifactId> | ||
| <packaging>maven-plugin</packaging> | ||
|
|
||
| <version>1.0.0-SNAPSHOT</version> | ||
|
|
||
| <name>utplsql-maven-plugin Maven Plugin</name> | ||
|
|
||
| <!-- FIXME change it to the project's website --> | ||
| <url>http://maven.apache.org</url> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| <properties> | ||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| <java.version>1.8</java.version> | ||
| </properties> | ||
|
|
||
| <dependencies> | ||
|
|
||
| <dependency> | ||
| <groupId>org.utplsql</groupId> | ||
| <artifactId>java-api</artifactId> | ||
| <version>3.0.4</version> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.apache.maven</groupId> | ||
| <artifactId>maven-model</artifactId> | ||
| <version>3.0.2</version> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.apache.maven</groupId> | ||
| <artifactId>maven-plugin-api</artifactId> | ||
| <version>3.5.2</version> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.codehaus.plexus</groupId> | ||
| <artifactId>plexus-utils</artifactId> | ||
| <version>3.0.8</version> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.apache.maven.plugin-tools</groupId> | ||
| <artifactId>maven-plugin-annotations</artifactId> | ||
| <version>3.5</version> | ||
| <scope>provided</scope> | ||
| </dependency> | ||
|
|
||
| <!-- test dependencies --> | ||
|
|
||
| <dependency> | ||
| <groupId>org.apache.maven.plugin-testing</groupId> | ||
| <artifactId>maven-plugin-testing-harness</artifactId> | ||
| <version>3.3.0</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.apache.maven</groupId> | ||
| <artifactId>maven-compat</artifactId> | ||
| <version>3.5.2</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>junit</groupId> | ||
| <artifactId>junit</artifactId> | ||
| <version>4.12</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.assertj</groupId> | ||
| <artifactId>assertj-core</artifactId> | ||
| <version>3.8.0</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
|
|
||
|
|
||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-compiler-plugin</artifactId> | ||
| <version>3.7.0</version> | ||
| <configuration> | ||
| <source>${java.version}</source> | ||
| <target>${java.version}</target> | ||
| <encoding>${project.build.sourceEncoding}</encoding> | ||
| </configuration> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-plugin-plugin</artifactId> | ||
| <version>3.5</version> | ||
| <configuration> | ||
| <goalPrefix>utplsql</goalPrefix> | ||
| <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound> | ||
| </configuration> | ||
| <executions> | ||
| <execution> | ||
| <id>mojo-descriptor</id> | ||
| <goals> | ||
| <goal>descriptor</goal> | ||
| </goals> | ||
| </execution> | ||
| <execution> | ||
| <id>help-goal</id> | ||
| <goals> | ||
| <goal>helpmojo</goal> | ||
| </goals> | ||
| </execution> | ||
| </executions> | ||
|
|
||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
|
|
||
| </project> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we give support for sources (file mapping), we will also need to have:
One thin that needs improvement on utPLSQL side is documentation of those options - currently it's vague and insufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Insted of adding more modification for the plugin will not be more useful release this version as is and open a new one aligned with the last version of the java-api(3.0.5)?