mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 07:43:40 +01:00
fix for Jenkins integration, updates to commit f47c6b0
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
3
pom.xml
3
pom.xml
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user