Scanning Projects Built with Maven or Gradle

Veracode Greenlight

Veracode Greenlight for Eclipse only supports Eclipse binaries, which means you may experience problems when scanning projects built with third-party build automation tools such as Maven or Gradle.

If you are compiling with Maven or Gradle, Veracode recommends that you use the Eclipse plugin for that build tool to import your files. After you import the project into Eclipse using the Maven or Gradle plugin, if you are still experiencing issues scanning your Eclipse project with Veracode Greenlight, try the following actions.
Note: Any project must build successfully outside of Eclipse. If you have problems such as classpath or buildpath errors, for example, Eclipse cannot build the files needed to submit a scan to Veracode Greenlight.

Gradle

If you compiled your files using Gradle, you must be using the java plugin. For example, the build.gradle file must contain apply plugin: 'java'.

Maven

If you compiled your files using Maven and then imported these files, the .project file should contain the java and maven natures. You can manually add them to the .project file as follows:
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>