/
verify.bsh
45 lines (39 loc) · 1.17 KB
/
verify.bsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import java.io.*;
import org.codehaus.plexus.util.FileUtils;
import java.util.regex.*;
try
{
File file = new File( basedir, "build.log" );
String buf = FileUtils.fileRead( file );
Pattern p;
Matcher m;
p = Pattern.compile( "\\Qlocalhost:dummy-api\\E\\s*\\.*\\s*1\\.1\\s+->\\s+3\\.0" );
m = p.matcher( buf.toString() );
if ( !m.find() )
{
System.out.println( "Did not suggest updating dummy-api to version 3.0" );
return false;
}
System.out.println( m.group( 0 ) );
p = Pattern.compile( "\\Qlocalhost:dummy-impl\\E\\s*\\.*\\s*1\\.2\\s+->\\s+2\\.2" );
m = p.matcher( buf.toString() );
if ( !m.find() )
{
System.out.println( "Did not suggest updating dummy-impl to version 2.2" );
return false;
}
System.out.println( m.group( 0 ) );
p = Pattern.compile( "\\Qlocalhost:dummy-api-impl-bom-pom\\E\\s*\\.*\\s*1\\.0\\s+->\\s+2\\.0" );
m = p.matcher( buf.toString() );
if ( m.find() )
{
System.out.println( "Did suggest updating dummy-api-impl-bom-pom to version 2.0" );
return false;
}
}
catch( Throwable t )
{
t.printStackTrace();
return false;
}
return true;