Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
Cadet 3rd Class Cadet 3rd Class
Cadet 3rd Class
343 views

Executable not found: mvn" in fortifyTranslate

Hi, I have some problem with Jenkins "Executable not found:mvn" piplines

This is error I got

[Pipeline] fortifyTranslateRunning FortifyTranslate step Fortify Jenkins plugin v 19.2.30 Launching Fortify SCA translate command found executable: /usr/lib/fortify/Fortify_SCA_and_Apps_18.20/bin/sourceanalyzer Running Maven 3 translation executable not found: mvn fortify_home: null path: null workspace: /var/lib/jenkins/workspace/pipeline [pipeline] $ /usr/lib/fortify/Fortify_SCA_and_Apps_18.20/bin/sourceanalyzer -Dcom.fortify.sca.ProjectRoot=/var/lib/jenkins/workspace/pipeline/.fortify -b test-1.0.0-BUILD-SNAPSHOT -logfile ./translate.log mvn SCA translation returned exitcode=0

 

 

I already set not only Global Tool Configuration but also Global properties

1) Global Tool Configuration

 

Global_Tool_Configuration__Jenkins_.png

 

 

2) Global properties

 
 

Configure_System__Jenkins_.png

 

and this is my piplines

 

pipeline {

agent any
 tools{
 maven 'maven-3'

 }

stages{


stage('Preparation'){
steps{
echo "Current workspace: ${workspace}"

git credentialsId: 'hailey', url: '**PERSONAL INFORMATION REMOVED**:hailey-han/SqlInjectionTest.git'
sh '''
echo "PATH=${PATH}"
echo "M2_HOME=${M2_HOME}"
'''



sh "mvn install:install-file -Dfile=/usr/lib/fortify/Fortify_SCA_and_Apps_18.20/plugins/maven/sca-maven-plugin/sca-maven-plugin-18.20.jar -DpomFile=/usr/lib/fortify/Fortify_SCA_and_Apps_18.20/plugins/maven/sca-maven-plugin/pom.xml"
sh "mvn install:install-file -Dfile=/usr/lib/fortify/Fortify_SCA_and_Apps_18.20/plugins/maven/pom.xml -DpomFile=/usr/lib/fortify/Fortify_SCA_and_Apps_18.20/plugins/maven/pom.xml"
// sh "'${mvnHome}/bin/mvn' install:install-file -Dfile=/usr/lib/fortify/Fortify_SCA_and_Apps_18.20/plugins/maven/xcodebuild/pom.xml -DpomFile=/usr/lib/fortify/Fortify_SCA_and_Apps_18.20/plugins/maven/xcodebuild/pom.xml"

}


}

stage('Clean'){

steps{
sh "mvn -U clean install"
fortifyClean addJVMOptions: '', buildID: 'test-1.0.0-BUILD-SNAPSHOT', logFile: '', maxHeap: ''

//sh "'${mvnHome}/bin/mvn' com.fortify.sca.plugins.maven:sca-maven-plugin:18.20:clean -DskipTests"
//sh "'${mvnHome}/bin/mvn' com.fortify.sca.plugins.maven:sca-maven-plugin:18.20:translate -DskipTests"

}


}

stage('Translate'){
steps{
//sh "'${mvnHome}/bin/mvn' com.fortify.sca.plugins.maven:sca-maven-plugin:18.20:translate -DskipTests"
//
//sh "/usr/lib/fortify/Fortify_SCA_and_Apps_18.20/bin/sourceanalyzer -Dcom.fortify.sca.ProjectRoot=/var/lib/jenkins/workspace/pipeline/.fortify -b test-1.0.0-BUILD-SNAPSHOT '${mvnHome}/bin/mvn'"
fortifyTranslate addJVMOptions: '', buildID: 'test-1.0.0-BUILD-SNAPSHOT', excludeList: '', logFile: './translate.log', maxHeap: '', projectScanType: fortifyMaven3(mavenOptions: '')
}

}

stage('scan'){
steps{
fortifyScan addJVMOptions: '', addOptions: '', buildID: 'test-1.0.0-BUILD-SNAPSHOT', customRulepacks: '', logFile: '', maxHeap: '', resultsFile: ''
}

}
// stage('CloudScan'){
// fortifyCloudScan buildId: 'test-1.0.0-BUILD-SNAPSHOT', buildLabel: '', buildProject: '', buildVersion: '', disableSnippets: false, disableSourceRendering: false, filter: '', noDefaultRules: false, quick: false, rmiWorkerMaxHeap: '', rules: '', scanArgs: '', sensorPool: '', sscToken: '', upToken: '', useAutoHeap: false, useParallelAnalysis: true, useSsc: false, versionId: '', xmx: ''
// }

}
}

 

I have no idea what is wrong...

Can you help me?

 

0 Likes
1 Reply
Micro Focus Expert
Micro Focus Expert

Hi

Have you installed the Fortify Maven Plugin before kicking this off?

You can find it in the samples directory of your SCA install

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.