File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 140140 -->
141141 </junit >
142142 </target >
143+
144+ <target name =" sonar-scan" depends =" compile" unless =" skipSonarScan" >
145+ <property environment =" env" />
146+
147+ <fail message =" SONAR_HOST_URL environment variable not set" unless =" env.SONAR_HOST_URL" />
148+ <fail message =" SONAR_TOKEN environment variable not set" unless =" env.SONAR_TOKEN" />
149+
150+ <path id =" sonar.lib.path" >
151+ <fileset dir =" lib" includes =" *.jar" />
152+ </path >
153+ <pathconvert property =" sonar.libraries.list" refid =" sonar.lib.path" pathsep =" ," />
154+
155+ <echo message =" Running SonarQube scan for ical4j-0.9.16-patched" />
156+
157+ <exec executable =" sonar-scanner" failonerror =" true" >
158+ <arg value =" -Dsonar.projectKey=ical4j-0.9.16-patched" />
159+ <arg value =" -Dsonar.projectName=ical4j-0.9.16-patched" />
160+ <arg value =" -Dsonar.java.source=1.5" />
161+ <arg value =" -Dsonar.sources=${ source.dir } " />
162+
163+ <arg value =" -Dsonar.java.binaries=${ output.dir } " />
164+
165+ <arg value =" -Dsonar.java.libraries=${ sonar.libraries.list } " />
166+ <arg value =" -Dsonar.java.test.libraries=${ sonar.libraries.list } " />
167+
168+ <arg value =" -Dsonar.tests=${ test.source.dir } " />
169+
170+ <arg value =" -Dsonar.host.url=${ env.SONAR_HOST_URL } " />
171+ <arg value =" -Dsonar.token=${ env.SONAR_TOKEN } " />
172+ </exec >
173+ </target >
143174</project >
You can’t perform that action at this time.
0 commit comments