1818import org .utplsql .api .TestRunner ;
1919import org .utplsql .api .reporter .Reporter ;
2020import org .utplsql .api .reporter .ReporterFactory ;
21- import org .utplsql .helper .PluginDefault ;
2221import org .utplsql .helper .SQLScannerHelper ;
2322
2423@ Mojo (name = "test" , defaultPhase = LifecyclePhase .TEST )
2524public class UtPLSQLMojo extends AbstractMojo
2625{
27-
28- @ Parameter (required = true )
26+ @ Parameter (defaultValue = "jdbc:oracle:thin:@localhost:1521:ut3" )
2927 private String url ;
3028
31- @ Parameter (required = true )
29+ @ Parameter (defaultValue = "ut3" )
3230 private String user ;
3331
34- @ Parameter (required = true )
32+ @ Parameter (defaultValue = "XNtxj8eEgA6X6b6f" )
3533 private String password ;
3634
37- @ Parameter
35+ // This parameter should honor the -Dmaven.test.failure.ignore=false
36+ @ Parameter (defaultValue = "false" )
3837 private boolean failOnErrors ;
3938
40- @ Parameter
39+ @ Parameter ( defaultValue = "false" )
4140 private boolean colorConsole ;
4241
43- @ Parameter
42+ @ Parameter ( defaultValue = "UT_DOCUMENTATION_REPORTER" )
4443 private List <String > reporters ;
4544
46- // Configuration of Sources, Testing
45+ @ Parameter
46+ private List <String > paths ;
4747
48- @ Parameter
48+ @ Parameter
4949 private List <Resource > sources = new ArrayList <>();
5050
51- @ Parameter
52- private List <Resource > tests = new ArrayList <>();
53-
5451 @ Parameter
55- private List <String > reports = new ArrayList <>();
52+ private List <Resource > tests = new ArrayList <>();
5653
5754 /**
5855 *
@@ -64,9 +61,9 @@ public void execute() throws MojoExecutionException
6461 {
6562 // List<String> testPaths = Arrays.asList(new String[] { "tests" });
6663
67- FileMapperOptions sourceMappingOptions = buildOptions ( sources ,
68- PluginDefault . buildDefaultSource ());
69- FileMapperOptions testMappingOptions = buildOptions ( tests , PluginDefault .buildDefaultTest ());
64+ FileMapperOptions sourceMappingOptions = new FileMapperOptions ( new ArrayList <>());
65+ FileMapperOptions testMappingOptions = new FileMapperOptions ( new ArrayList <> ()); // buildOptions(tests,
66+ // PluginDefault.buildDefaultTest());
7067
7168 Connection connection = null ;
7269 List <Reporter > reporterList = null ;
@@ -113,7 +110,7 @@ public void accept(String t) {
113110 }
114111
115112 TestRunner runner = new TestRunner ()
116- // .addPathList(testPaths )
113+ .addPathList (paths )
117114 .addReporterList (reporterList )
118115 .sourceMappingOptions (sourceMappingOptions )
119116 .testMappingOptions (testMappingOptions )
@@ -133,7 +130,7 @@ public void accept(String t) {
133130 try
134131 {
135132 for (Reporter reporter : reporterList ) {
136- new OutputBuffer (reporter ).printAvailable (connection , reporter . outputFile () );
133+ new OutputBuffer (reporter ).printAvailable (connection , System . out );
137134 }
138135 if (connection != null ) {
139136 connection .close ();
@@ -160,7 +157,7 @@ private FileMapperOptions buildOptions(List<Resource> resources, Resource defaul
160157 }
161158
162159 List <String > scripts = SQLScannerHelper .findSQLs (resources );
163- return new FileMapperOptions (scripts );
160+ return new FileMapperOptions (scripts );
164161 }
165162
166163 /**
0 commit comments