3
import java.util.regex.*;
7
File file = new File( basedir, "target/classes/test.properties" );
8
Properties p = new Properties();
9
p.load( new FileInputStream( file ) );
10
String value = p.getProperty( "version" );
12
if ( value.indexOf( "${build.version}" ) >= 0 )
14
System.err.println( "Timestamp not set" );
17
Pattern regex = Pattern.compile( "\\d\\d:\\d\\d \\d\\d-\\d\\d-\\d\\d\\d\\d" );
18
if ( !regex.matcher( value ).find() )
20
System.err.println( "Formatted timestamp not in property" );