Skip to content

Commit 1b0fa02

Browse files
committed
Added some documentation
1 parent 7f6cf27 commit 1b0fa02

4 files changed

Lines changed: 52 additions & 37 deletions

File tree

‎utplsql-maven-plugin/src/main/java/org/utplsql/UtPLSQLMojo.java‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@
3333
import org.utplsql.model.ReporterConfiguration;
3434
import org.utplsql.model.ReporterParameter;
3535

36-
36+
/**
37+
* This class expose the {@link TestRunner} interface to Maven.
38+
*
39+
* @author Alberto Hernández
40+
*
41+
*/
3742
@Mojo(name = "test", defaultPhase = LifecyclePhase.TEST)
3843
public class UtPLSQLMojo extends AbstractMojo {
3944
@Parameter(defaultValue = "jdbc:oracle:thin:@localhost:1521:ut3")

‎utplsql-maven-plugin/src/main/java/org/utplsql/helper/PluginDefault.java‎

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,47 @@
55
import org.apache.maven.model.Resource;
66

77
/**
8+
* This class provides methods to retrieve the list of resources in the default <source> and <test> directories.
89
*
910
* @author Alberto Hernández
1011
*
1112
*/
12-
public class PluginDefault
13-
{
13+
public class PluginDefault {
1414

15-
// Source Directory
16-
private static final String SOURCE_DIRECTORY = "src/main/plsql";
15+
// Source Directory
16+
private static final String SOURCE_DIRECTORY = "src/main/plsql";
1717

18-
// Test Directory
19-
private static final String TEST_DIRECTORY = "src/test/plsql";
18+
// Test Directory
19+
private static final String TEST_DIRECTORY = "src/test/plsql";
2020

21-
/**
22-
*
23-
* @return
24-
*/
25-
private static Resource buildDirectory(String directory, String includes)
26-
{
27-
Resource resource = new Resource();
21+
private PluginDefault() {
22+
// NA
23+
}
2824

29-
// Configure Resources
30-
resource.setDirectory(directory);
31-
resource.setIncludes(Arrays.asList(includes));
32-
33-
return resource;
34-
}
35-
36-
/**
37-
*
38-
* @return
39-
*/
40-
public static Resource buildDefaultSource()
41-
{
25+
/**
26+
* This method returns {@link Resource} for the default {@code source} directory
27+
*
28+
* @return a {@link Resource}
29+
*/
30+
public static Resource buildDefaultSource() {
4231
return buildDirectory(SOURCE_DIRECTORY, "**/*.*");
43-
}
44-
45-
/**
46-
*
47-
* @return
48-
*/
49-
public static Resource buildDefaultTest()
50-
{
32+
}
33+
34+
/**
35+
* This method returns {@link Resource} for the default {@code test} directory
36+
*
37+
* @return a {@link Resource}
38+
*/
39+
public static Resource buildDefaultTest() {
5140
return buildDirectory(TEST_DIRECTORY, "**/*.pkg");
52-
}
41+
}
42+
43+
44+
private static Resource buildDirectory(String directory, String includes) {
45+
Resource resource = new Resource();
46+
resource.setDirectory(directory);
47+
resource.setIncludes(Arrays.asList(includes));
48+
return resource;
49+
}
5350

5451
}

‎utplsql-maven-plugin/src/main/java/org/utplsql/helper/ReporterDefault.java‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
package org.utplsql.helper;
22

3+
import org.utplsql.api.reporter.Reporter;
4+
5+
/**
6+
* This class is an enumeration of all the known reporter in {@code utPLSQL}. It further more defines the default output
7+
* file for each {@link Reporter}. In case the output file is set to {@code -}, it will mean the stdout of the process.
8+
*
9+
* @author Alberto Hernández
10+
*
11+
*/
312
public enum ReporterDefault {
413

5-
UT_DOCUMENTATION_REPORTER(""),
14+
UT_DOCUMENTATION_REPORTER("-"),
615
UT_COVERAGE_HTML_REPORTER("utplsql/coverage-html-reporter.html"),
716
UT_TEAMCITY_REPORTER("utplsql/teamcity-reporter.txt"),
817
UT_XUNIT_REPORTER("utplsql/xunit-reporter.xml"),

‎utplsql-maven-plugin/src/main/java/org/utplsql/helper/SQLScannerHelper.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
public class SQLScannerHelper
1818
{
1919

20+
private SQLScannerHelper() {
21+
// NA
22+
}
23+
2024
/**
2125
*
2226
* @param resouces

0 commit comments

Comments
 (0)