My Java-Maven project is implemented in Java 1.8. I have integrated my Maven build with Fortify SCA, by installing Fortify and adding the dependancies in my project's pom.xml. However, during the scans, it gives me the below log
[INFO] --- sca-maven-plugin:4.30:scan (default-cli) @ projectname ---
[INFO] Packaging -> jar
[INFO] Top-Level Artifact ID -> null
[INFO] Build Label -> projectname-0.1.SNAPSHOT
[INFO] Build Version -> 0.1.SNAPSHOT
[INFO] Build Project Name -> projectname
[INFO] Build ID -> projectname-0.1.SNAPSHOT
[INFO] Results File -> /Users/workspaceneon/projectname/target/projectname-0.1.SNAPSHOT.fpr
[INFO] Location of SCA Executable -> sourceanalyzer
[INFO] Scan Log -> /Users/workspaceneon/projectname/target/sca-scan.log
[INFO] FindBugs Results -> true
[INFO] Fail on Error -> true
[INFO] Upload to SSC -> false
[INFO] Issues will not be tracked and trended without uploading to SSC.
[INFO] *** !! Scanning individual sub-project - projectname !! ***
[INFO] Created output dir /Users/workspaceneon/projectname/target
[INFO] cmd: "/bin/sh -c sourceanalyzer -scan -Xmx800M @/Users/workspaceneon/projectname/target/sca-scan-args.txt"
Fortify Static Code Analyzer 6.30.0086
Fortify Static Code Analyzer 6.30.0086
Also, the Java version is reported to be
[INFO] Source Version -> 1.6
You can see the version of my Fortify in the above console log.
I feel Fortify is scanning my project assuming it to be a Java 1.6 project. My question is, how can I tell Fortify to scan it as a 1.8 project, and report errors accordingly?
Use the command line parameter
or with Maven:
In your projects:
And in the Maven integration: