The builder step of the Dependency-Check Jenkins plugin is there for convenience. Build integration should be performed using the Ant or Maven plugin.

However, I've done some preliminary research and it does not appear that this feature is possible, as Dependency-Check maven usage requires org.apache.maven.project.MavenProject and org.apache.maven.artifact.Artifact.

In a org.apache.maven.project.MavenProject, a list of org.apache.maven.artifact.Artifact can be obtained by calling getArtifacts(). This returns a list of all dependencies for the MavenProject including a File object reference to the file - not just metadata.

By contrast, Jenkins will expose a Maven build via a plugin that extends AbstractBuild like this:

MavenModuleSetBuild mavenBuild = (MavenModuleSetBuild)build;
MavenModuleSet mavenModuleSet = mavenBuild.getProject();
Collection<MavenModule> mavenModules = mavenModuleSet.getModules();
for (MavenModule mavenModule: mavenModules) { /** There is no method to retrieve a Collection of <ModuleDependency>, even though a Set of them are defined. Additionally, ModuleDependency only contains artifactid, groupid and version metadata without any reference to the file on the filesystem. */ }

There are methods to retrieve artifacts created as a result of a Maven/Jenkins job and methods to retrieve artifacts that have been archived as a result of a Jenkins job, but there doesn't appear to be any way to retrieve org.apache.maven.artifact.Artifact from a org.apache.maven.project.MavenProject using a plugin.

This functionality will have to be requested to the Jenkins core team.

Outstanding question posted to mailing list:
https://groups.google.com/forum/#!topic/jenkinsci-dev/5Of5P8YsPMY

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to