월요일, 5월 27, 2024
HomeLinuxSonar Scanner 설치

Sonar Scanner 설치

Sonar Scanner 설치

 

sonar-scanner download

wget http://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.8.zip
unzip sonar-scanner-2.8.zip

vi /etc/profile

PATH=$PATH:/sw/sonar-scanner-2.8/bin

vi sonar-scanner-2.8/conf/sonar-scanner.properties

sonar.host.url=http://localhost/sonarqube
 
sonar.sourceEncoding=UTF-8
sonar.links.scm=svn://10.0.0.10/svnroot

검사할 소스 코드 체크아웃

svn checkout svn://localhost/svnroot/branches/project

vi project/sonar-project.properties

sonar.projectKey=project:project
sonar.projectName=project
sonar.projectVersion=1.0
 
sonar.sources=src
sonar.sourceEncoding=UTF-8
sonar.java.binaries=target/classes
sonar.java.source=1.6

vi /sw/sonar-scanner-2.8/bin/sonar-scnner

export SONAR_SCANNER_OPTS="-Xmx3062m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=128m"
exec "$JAVA_CMD" \
  -Djava.awt.headless=true \
  $SONAR_SCANNER_OPTS \
  $SONAR_SCANNER_DEBUG_OPTS \
  -classpath  $JAR_FILE \
  "-Dscanner.home=${SONAR_SCANNER_HOME}" \
  "-Dproject.home=${PROJECT_HOME}" \
  org.sonarsource.scanner.cli.Main "$@"

sonar scanner 실행

cd svnroot/project
sonar-scnner

sonarqube011

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Time limit exceeded. Please complete the captcha once again.

Most Popular