fix for Jenkins integration, updates to commit f47c6b0

This commit is contained in:
Jeremy Long
2017-01-08 07:55:35 -05:00
parent 1fb74e1a27
commit 8d63ee19ed
3 changed files with 13 additions and 4 deletions

View File

@@ -105,7 +105,7 @@ public class ReportGenerator {
velocityEngine.init();
final EscapeTool enc = new EscapeTool();
final DateTime dt = DateTime.now();
final DateTime dt = new DateTime();//.now();
final DateTimeFormatter dateFormat = DateTimeFormat.forPattern("MMM d, yyyy 'at' HH:mm:ss z");
final DateTimeFormatter dateFormatXML = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ");

View File

@@ -47,12 +47,20 @@ public class EngineVersionCheckTest extends BaseTest {
// }
/**
* Converts a date in the form of yyyy-MM-dd into the epoch milliseconds.
*
* @param date a date in the format of yyyy-MM-dd
* @return milliseconds
*/
private long dateToMilliseconds(String date) {
DateTimeFormatter dtf = DateTimeFormat.forPattern("yyyy-MM-dd");
return DateTime.parse(date, dtf).toInstant().getMillis();
//removed for compatability with joda-time 1.6
//DateTimeFormatter dtf = DateTimeFormat.forPattern("yyyy-MM-dd");
//return DateTime.parse(date, dtf).toInstant().getMillis();
String[] dp = date.split("-");
int y = Integer.parseInt(dp[0]);
int m = Integer.parseInt(dp[1]);
int d = Integer.parseInt(dp[2]);
DateTime dt = new DateTime(y, m, d, 0, 0, 0, 0);
return dt.toInstant().getMillis();
}
/**

View File

@@ -586,10 +586,11 @@ Copyright (c) 2012 - Jeremy Long
</reporting>
<dependencyManagement>
<dependencies>
<!-- analysis core (used by Jenkins) uses 1.6-->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.7</version>
<version>1.6</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>