mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-22 09:09:31 +01:00
fix for Jenkins integration, updates to commit f47c6b0
This commit is contained in:
@@ -105,7 +105,7 @@ public class ReportGenerator {
|
|||||||
velocityEngine.init();
|
velocityEngine.init();
|
||||||
final EscapeTool enc = new EscapeTool();
|
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 dateFormat = DateTimeFormat.forPattern("MMM d, yyyy 'at' HH:mm:ss z");
|
||||||
final DateTimeFormatter dateFormatXML = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
|
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.
|
* 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
|
* @param date a date in the format of yyyy-MM-dd
|
||||||
* @return milliseconds
|
* @return milliseconds
|
||||||
*/
|
*/
|
||||||
private long dateToMilliseconds(String date) {
|
private long dateToMilliseconds(String date) {
|
||||||
DateTimeFormatter dtf = DateTimeFormat.forPattern("yyyy-MM-dd");
|
//removed for compatability with joda-time 1.6
|
||||||
return DateTime.parse(date, dtf).toInstant().getMillis();
|
//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>
|
</reporting>
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- analysis core (used by Jenkins) uses 1.6-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>joda-time</groupId>
|
<groupId>joda-time</groupId>
|
||||||
<artifactId>joda-time</artifactId>
|
<artifactId>joda-time</artifactId>
|
||||||
<version>2.9.7</version>
|
<version>1.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
<groupId>com.google.code.findbugs</groupId>
|
||||||
|
|||||||
Reference in New Issue
Block a user