File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed
test/maven-plugin/src/it/noPropertiesFile Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -2,24 +2,26 @@ import java.io.*;
2
2
3
3
println " start verify.groovy"
4
4
5
- File entity = new File (basedir, " build.log" )
5
+ File buildLog = new File (basedir, " build.log" )
6
+
7
+ if (! buildLog. isFile()) {
8
+
9
+ println " '" + buildLog. absolutePath + " ' is not a file."
10
+
11
+ throw new FileNotFoundException (" Could not find build log file: '" + buildLog + " '" )
6
12
7
- if (! entity. isFile()) {
8
-
9
- throw new FileNotFoundException (" Could not find generated JPA Entity: " + entity)
10
-
11
13
} else {
12
-
14
+
15
+ println " inspecting build log lines"
16
+
13
17
boolean found = false
14
- String searchString =
15
- " [INFO] Property file '" +
16
- basedir. absolutePath +
17
- " /src/main/resources/hibernate.properties' cannot be found, aborting..."
18
- entity. eachLine {
19
- line -> if (line. startsWith(searchString)) found = true
18
+ String startString = " [INFO] Property file '"
19
+ String endString = " src/main/resources/hibernate.properties' cannot be found, aborting..."
20
+ buildLog. eachLine {
21
+ line -> if (line. startsWith(startString) && line. endsWith(endString)) found = true
20
22
}
21
23
return found
22
-
24
+
23
25
}
24
26
25
27
You can’t perform that action at this time.
0 commit comments