Skip to content

Commit 8eef742

Browse files
authored
Merge pull request #2 from alberto-hernandez/develop
First approach to increase the functionality of the maven plugin
2 parents 6dd94d1 + bdb8c10 commit 8eef742

17 files changed

Lines changed: 1207 additions & 321 deletions

File tree

README.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,101 @@
11
# utPLSQL-maven-plugin
22
A maven plugin for running Unit Tests with utPLSQL v3+
3+
4+
### Compatibility
5+
6+
This plugin is compatible with the Java-API 3.0.4.
7+
8+
### Prerequisites
9+
You have to be a fully utPLSQL environment available compatible with the Java API.
10+
11+
12+
### Plugin Parameters
13+
14+
* `url`
15+
* URL of the Connection to the database
16+
* Default: `${dbURL}`
17+
* `user`
18+
* Credential of the connection to the database
19+
* Default: `${dbUser}`
20+
* `password`
21+
* Password of the connection to the database
22+
* Default: `${dbPass}`
23+
* `ignoreFailure`
24+
* Ignore or continue when a test fail
25+
* Default: `${maven.test.failure.ignore}`
26+
* `skipCompatibilityCheck`
27+
* Skip the Compatibility Checks
28+
* `true` | `false` (default: `false`)
29+
* `reporters`
30+
* List of the Reporters (Check the example below).
31+
* 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
32+
* 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`
33+
* Check the example below
34+
35+
* `paths`
36+
* Paths of the resources
37+
* `sources`
38+
* Sources of the scripts at the style of the maven resources
39+
* `tests`
40+
* Test fo the scripts at the style of the maven resources
41+
* `targetDir`
42+
* Target dir, this is a readonly property
43+
* Default: `${project.build.directory}`
44+
* `includeObject`
45+
* Include Object
46+
* `excludeObject`
47+
* Exclude Objects
48+
49+
50+
51+
### Sample of use
52+
The next snippet is a sample of declaration of the pom
53+
```xml
54+
<plugin>
55+
<groupId>org.utplsql</groupId>
56+
<artifactId>utplsql-maven-plugin</artifactId>
57+
<version>1.0.0-SNAPSHOT</version>
58+
<goals>
59+
<goal>test</goal>
60+
</goals>
61+
<configuration>
62+
<url>url_of_connection</url>
63+
<user>user</user>
64+
<password>password</password>
65+
<failOnErrors>false</failOnErrors>
66+
<reporters>
67+
<reporter>
68+
<name>UT_COVERAGE_SONAR_REPORTER</name>
69+
<fileOutput>utplsql/coverage-sonar-reporter.xml</fileOutput>
70+
<consoleOutput>true</consoleOutput>
71+
</reporter>
72+
<reporter>
73+
<name>UT_SONAR_TEST_REPORTER</name>
74+
<fileOutput>utplsql/sonar-test-reporter.xml</fileOutput>
75+
<consoleOutput>false</consoleOutput>
76+
</reporter>
77+
<reporter>
78+
<name>UT_TEAMCITY_REPORTER</name>
79+
</reporter>
80+
</reporters>
81+
<sources>
82+
<source>
83+
<directory>src/test/resources/scripts/sources</directory>
84+
<includes>
85+
<include>**/*pkg</include>
86+
<include>**/*pkb</include>
87+
</includes>
88+
</source>
89+
</sources>
90+
<tests>
91+
<test>
92+
<directory>src/test/resources/scripts/test</directory>
93+
<includes>
94+
<include>**/*pkg</include>
95+
<include>**/*pkb</include>
96+
</includes>
97+
</test>
98+
</tests>
99+
</configuration>
100+
</plugin>
101+
```

utplsql-maven-plugin/pom.xml

Lines changed: 124 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,126 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3-
<modelVersion>4.0.0</modelVersion>
4-
5-
<parent>
6-
<groupId>org.utplsql</groupId>
7-
<artifactId>utplsql-maven-plugin-build</artifactId>
8-
<version>1.0-SNAPSHOT</version>
9-
</parent>
10-
11-
<artifactId>utplsql-maven-plugin</artifactId>
12-
<packaging>maven-plugin</packaging>
13-
14-
<name>utplsql-maven-plugin Maven Plugin</name>
15-
16-
<!-- FIXME change it to the project's website -->
17-
<url>http://maven.apache.org</url>
18-
19-
<properties>
20-
</properties>
21-
22-
<dependencies>
23-
<dependency>
24-
<groupId>org.utplsql</groupId>
25-
<artifactId>java-api</artifactId>
26-
<version>1.0-SNAPSHOT</version>
27-
<scope>compile</scope>
28-
</dependency>
29-
30-
<dependency>
31-
<groupId>org.apache.maven</groupId>
32-
<artifactId>maven-plugin-api</artifactId>
33-
<version>${maven.version}</version>
34-
</dependency>
35-
36-
<dependency>
37-
<groupId>org.apache.maven</groupId>
38-
<artifactId>maven-core</artifactId>
39-
<version>${maven.version}</version>
40-
</dependency>
41-
42-
<dependency>
43-
<groupId>org.apache.maven.plugin-tools</groupId>
44-
<artifactId>maven-plugin-annotations</artifactId>
45-
<version>3.5</version>
46-
<scope>provided</scope>
47-
</dependency>
48-
49-
<!-- test dependencies -->
50-
51-
<dependency>
52-
<groupId>org.apache.maven.plugin-testing</groupId>
53-
<artifactId>maven-plugin-testing-harness</artifactId>
54-
<version>3.3.0</version>
55-
<scope>test</scope>
56-
</dependency>
57-
58-
<dependency>
59-
<groupId>org.apache.maven</groupId>
60-
<artifactId>maven-compat</artifactId>
61-
<version>${maven.version}</version>
62-
<scope>test</scope>
63-
</dependency>
64-
65-
<dependency>
66-
<groupId>junit</groupId>
67-
<artifactId>junit</artifactId>
68-
<version>4.12</version>
69-
<scope>test</scope>
70-
</dependency>
71-
72-
<dependency>
73-
<groupId>org.assertj</groupId>
74-
<artifactId>assertj-core</artifactId>
75-
<version>3.8.0</version>
76-
<scope>test</scope>
77-
</dependency>
78-
</dependencies>
79-
80-
<build>
81-
<plugins>
82-
<plugin>
83-
<groupId>org.apache.maven.plugins</groupId>
84-
<artifactId>maven-compiler-plugin</artifactId>
85-
<version>3.7.0</version>
86-
<configuration>
87-
<source>1.8</source>
88-
<target>1.8</target>
89-
</configuration>
90-
</plugin>
91-
<plugin>
92-
<groupId>org.apache.maven.plugins</groupId>
93-
<artifactId>maven-plugin-plugin</artifactId>
94-
<version>3.5</version>
95-
<executions>
96-
<execution>
97-
<id>default-descriptor</id>
98-
<phase>process-classes</phase>
99-
</execution>
100-
<execution>
101-
<id>help-goal</id>
102-
<goals>
103-
<goal>helpmojo</goal>
104-
</goals>
105-
</execution>
106-
</executions>
107-
</plugin>
108-
</plugins>
109-
</build>
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>org.utplsql</groupId>
6+
<artifactId>utplsql-maven-plugin</artifactId>
7+
<packaging>maven-plugin</packaging>
8+
9+
<version>1.0.0-SNAPSHOT</version>
10+
11+
<name>utplsql-maven-plugin Maven Plugin</name>
12+
13+
<!-- FIXME change it to the project's website -->
14+
<url>http://maven.apache.org</url>
15+
16+
<properties>
17+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18+
<java.version>1.8</java.version>
19+
</properties>
20+
21+
<dependencies>
22+
23+
<dependency>
24+
<groupId>org.utplsql</groupId>
25+
<artifactId>java-api</artifactId>
26+
<version>3.0.4</version>
27+
</dependency>
28+
29+
<dependency>
30+
<groupId>org.apache.maven</groupId>
31+
<artifactId>maven-model</artifactId>
32+
<version>3.0.2</version>
33+
</dependency>
34+
35+
<dependency>
36+
<groupId>org.apache.maven</groupId>
37+
<artifactId>maven-plugin-api</artifactId>
38+
<version>3.5.2</version>
39+
</dependency>
40+
41+
<dependency>
42+
<groupId>org.codehaus.plexus</groupId>
43+
<artifactId>plexus-utils</artifactId>
44+
<version>3.0.8</version>
45+
</dependency>
46+
47+
<dependency>
48+
<groupId>org.apache.maven.plugin-tools</groupId>
49+
<artifactId>maven-plugin-annotations</artifactId>
50+
<version>3.5</version>
51+
<scope>provided</scope>
52+
</dependency>
53+
54+
<!-- test dependencies -->
55+
56+
<dependency>
57+
<groupId>org.apache.maven.plugin-testing</groupId>
58+
<artifactId>maven-plugin-testing-harness</artifactId>
59+
<version>3.3.0</version>
60+
<scope>test</scope>
61+
</dependency>
62+
63+
<dependency>
64+
<groupId>org.apache.maven</groupId>
65+
<artifactId>maven-compat</artifactId>
66+
<version>3.5.2</version>
67+
<scope>test</scope>
68+
</dependency>
69+
70+
<dependency>
71+
<groupId>junit</groupId>
72+
<artifactId>junit</artifactId>
73+
<version>4.12</version>
74+
<scope>test</scope>
75+
</dependency>
76+
77+
<dependency>
78+
<groupId>org.assertj</groupId>
79+
<artifactId>assertj-core</artifactId>
80+
<version>3.8.0</version>
81+
<scope>test</scope>
82+
</dependency>
83+
84+
85+
</dependencies>
86+
87+
<build>
88+
<plugins>
89+
<plugin>
90+
<groupId>org.apache.maven.plugins</groupId>
91+
<artifactId>maven-compiler-plugin</artifactId>
92+
<version>3.7.0</version>
93+
<configuration>
94+
<source>${java.version}</source>
95+
<target>${java.version}</target>
96+
<encoding>${project.build.sourceEncoding}</encoding>
97+
</configuration>
98+
</plugin>
99+
<plugin>
100+
<groupId>org.apache.maven.plugins</groupId>
101+
<artifactId>maven-plugin-plugin</artifactId>
102+
<version>3.5</version>
103+
<configuration>
104+
<goalPrefix>utplsql</goalPrefix>
105+
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
106+
</configuration>
107+
<executions>
108+
<execution>
109+
<id>mojo-descriptor</id>
110+
<goals>
111+
<goal>descriptor</goal>
112+
</goals>
113+
</execution>
114+
<execution>
115+
<id>help-goal</id>
116+
<goals>
117+
<goal>helpmojo</goal>
118+
</goals>
119+
</execution>
120+
</executions>
121+
122+
</plugin>
123+
</plugins>
124+
</build>
125+
110126
</project>

0 commit comments

Comments
 (0)