1 |
|
package org.apache.torque.mojo; |
2 |
|
|
3 |
|
import java.io.File; |
4 |
|
import java.io.IOException; |
5 |
|
|
6 |
|
import org.apache.commons.io.FileUtils; |
7 |
|
import org.apache.maven.plugin.MojoExecutionException; |
8 |
|
import org.kuali.core.db.torque.KualiTorqueDataDumpTask; |
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
|
|
| 0% |
Uncovered Elements: 21 (21) |
Complexity: 8 |
Complexity Density: 0.62 |
|
16 |
|
public class ExportDataMojo extends ExportMojo { |
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
private String dateFormat; |
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
private File dataXMLDir; |
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
37 |
0
|
protected void configureTask() throws MojoExecutionException {... |
38 |
0
|
KualiTorqueDataDumpTask task = new KualiTorqueDataDumpTask(); |
39 |
0
|
setAntTask(task); |
40 |
0
|
super.configureTask(); |
41 |
0
|
makeOutputDir(); |
42 |
|
} |
43 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 3 |
Complexity Density: 0.6 |
|
44 |
0
|
protected void makeOutputDir() throws MojoExecutionException {... |
45 |
0
|
if (getDataXMLDir().exists()) { |
46 |
0
|
return; |
47 |
|
} |
48 |
0
|
try { |
49 |
0
|
FileUtils.forceMkdir(getDataXMLDir()); |
50 |
|
} catch (IOException e) { |
51 |
0
|
throw new MojoExecutionException("Error creating output directory", e); |
52 |
|
} |
53 |
|
} |
54 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
55 |
0
|
public File getDataXMLDir() {... |
56 |
0
|
return dataXMLDir; |
57 |
|
} |
58 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
59 |
0
|
public void setDataXMLDir(File outputDir) {... |
60 |
0
|
this.dataXMLDir = outputDir; |
61 |
|
} |
62 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
63 |
0
|
public String getDateFormat() {... |
64 |
0
|
return dateFormat; |
65 |
|
} |
66 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
67 |
0
|
public void setDateFormat(String dateFormat) {... |
68 |
0
|
this.dateFormat = dateFormat; |
69 |
|
} |
70 |
|
} |