mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 15:53:36 +01:00
changed the coordinates according to the pom file details
This commit is contained in:
@@ -125,6 +125,28 @@ public class ReportGenerator {
|
||||
context.put("version", Settings.getString(Settings.KEYS.APPLICATION_VERSION, "Unknown"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new ReportGenerator.
|
||||
*
|
||||
* @param applicationName the application name being analyzed
|
||||
* @param applicationVersion the application version being analyzed
|
||||
* @param artifactID the application version being analyzed
|
||||
* @param applicationVersion the application version being analyzed
|
||||
* @param dependencies the list of dependencies
|
||||
* @param analyzers the list of analyzers used
|
||||
* @param properties the database properties (containing timestamps of the
|
||||
* NVD CVE data)
|
||||
*/
|
||||
|
||||
public ReportGenerator(String applicationName,String applicationVersion,String artifactID,String groupID, List<Dependency> dependencies, List<Analyzer> analyzers, DatabaseProperties properties) {
|
||||
|
||||
this(applicationName,dependencies,analyzers,properties);
|
||||
context.put("applicationVersion",applicationVersion);
|
||||
context.put("artifactID",artifactID);
|
||||
context.put("groupID",groupID);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new Velocity Engine.
|
||||
*
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="version" type="xs:string" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="artifactID" type="xs:string" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="groupID" type="xs:string" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="reportDate" type="xs:string" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="credits" type="xs:string" minOccurs="1" maxOccurs="1" />
|
||||
</xs:sequence>
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
<xs:complexType name="projectInfo">
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="version" type="xs:string" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="artifactID" type="xs:string" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="groupID" type="xs:string" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="reportDate" type="xs:string" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="credits" type="xs:string" minOccurs="1" maxOccurs="1" />
|
||||
</xs:sequence>
|
||||
|
||||
@@ -31,6 +31,9 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
</scanInfo>
|
||||
<projectInfo>
|
||||
<name>$enc.xml($applicationName)</name>
|
||||
<version>$enc.xml($version)</version>
|
||||
<artifactID>$enc.xml($artifactID)</artifactID>
|
||||
<groupID>$enc.xml($groupID)</groupID>
|
||||
<reportDate>$scanDateXML</reportDate>
|
||||
<credits>This report contains data retrieved from the National Vulnerability Database: http://nvd.nist.gov</credits>
|
||||
</projectInfo>
|
||||
|
||||
@@ -146,8 +146,8 @@ public class ReportGeneratorIntegrationTest extends BaseDBTestCase {
|
||||
|
||||
CveDB cveDB = CveDB.getInstance();
|
||||
DatabaseProperties dbProp = cveDB.getDatabaseProperties();
|
||||
|
||||
ReportGenerator generator = new ReportGenerator("Test Report", engine.getDependencies(), engine.getAnalyzers(), dbProp);
|
||||
|
||||
ReportGenerator generator = new ReportGenerator("Test Report","1.4.7","dependency-check-core","org.owasp", engine.getDependencies(), engine.getAnalyzers(), dbProp);
|
||||
generator.generateReport(templateName, writeTo);
|
||||
|
||||
engine.cleanup();
|
||||
|
||||
@@ -1016,7 +1016,7 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
||||
getLog().debug("Unable to retrieve DB Properties", ex);
|
||||
}
|
||||
}
|
||||
final ReportGenerator r = new ReportGenerator(p.getName(), engine.getDependencies(), engine.getAnalyzers(), prop);
|
||||
final ReportGenerator r = new ReportGenerator(p.getName(),p.getVersion(),p.getArtifactId(),p.getGroupId(), engine.getDependencies(), engine.getAnalyzers(), prop);
|
||||
try {
|
||||
r.generateReports(outputDir.getAbsolutePath(), format);
|
||||
} catch (ReportException ex) {
|
||||
|
||||
Reference in New Issue
Block a user