sonar-ant-task 1.4でサポートされていたbuild.xmlファイルをAnt 2.5のSonarQube Scannerのbuild.xmlに変更しています。 SonarQube 5.6.3。 salesforce languageカスタムプラグインのカスタムプラグインを作成して、それを最新バージョンにアップグレードしました。 build.xmlのは、私はどこ私はそれが間違って取得しています教えてください Sonar-Scanner for Ant発行
<!-- Define the Sonar task -->
<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
<classpath path="sonar-ant-task-2.5.jar" />
</taskdef>
<!-- define the force versions task -->
<taskdef name='scm' classname='com.villagechief.codescan.versions.ant.ScmCommitterTask'>
<classpath path="force-versions-0.2-SNAPSHOT.jar" />
</taskdef>
<!-- Define the Salesforce task -->
<taskdef uri="salesforce" resource="com/salesforce/antlib.xml">
<classpath path="ant-salesforce.jar" />
</taskdef>
<!-- Add the target -->
<target name="sonar">
<!--java srcdir="sonar-project-template\src" target="sonar-project-template\src" bootclasspath="C:\Program Files\Java\jdk1.8.0_145\jre\lib\rt.jar"/-->
<property name="sonar.host.url" value="Link to another server/" />
<property Name="sonar.login" value="****"/>
<property Name="sonar.password" value="****"/>
<!-- db properties -->
<property name="sonar.jdbc.url" value="jdbc:sqlserver://<serverip>;databaseName=sonar" />
<property name="sonar.jdbc.username" value="****" />
<property name="sonar.jdbc.password" value="****" />
<!-- location properties -->
<property name="sonar.sources" value="${user.dir}/src" />
<property name="sonar.binaries" value="${user.dir}/bin" />
<property name="sonar.tests" value="${user.dir}/tests" />
<property name="sonar.libraries" value="${user.dir}/" />
<!-- define if not already defined properties -->
<property name="sonar.language" value="sf" />
<property name="salesforce.url" value="https://www.salesforce.com" />
<property name="sonar.projectVersion" value="1.0-SNAPSHOT" />
<sonar:sonar key="${sonar.projectKey}" version="${sonar.projectVersion}" xmlns:sonar="antlib:org.sonar.ant"/>
</target>
<target name="commit">
<scm username="${salesforce.username}" password="${salesforce.password}" serverurl="${salesforce.url}" repository="${scm}" >
<fileset dir="${user.dir}/src">
<include name="**/*"/>
</fileset>
</scm>
</target>
<target name="deletesrc">
<delete dir="${user.dir}/src">
<include name="**/*"/>
<exclude name="package.xml"/>
</delete>
</target>
<target name="download">
<!-- Retrieve the contents listed in the file codepkg/package.xml into the codepkg directory -->
<sf:retrieve username="${salesforce.username}" password="${salesforce.password}" serverurl="${salesforce.url}"
retrieveTarget="src" unpackaged="src/package.xml"/>
<!--
<sf:retrieve username="${salesforce.username}" password="${salesforce.password}" serverurl="${salesforce.url}"
retrieveTarget="src" packageNames=""/>-->
</target>
<target name="deploy">
<!-- Retrieve the contents listed in the file codepkg/package.xml into the codepkg directory -->
<sf:deploy username="${salesforce.username}" password="${salesforce.password}" serverurl="${salesforce.url}"
deployroot="src"/>
</target>
<target name="commitall">
<exec executable="git" dir="${user.dir}">
<arg value="add"/>
<arg value="-A"/>
</exec>
<exec executable="git" dir="${user.dir}">
<arg value="commit"/>
<arg value="-a"/>
<arg value="-m"/>
<arg value="<automcommit: all>"/>
</exec>
</target>
<!-- <target name="analyse" depends="deletesrc, download, commit, commitall, sonar" /> -->
<!--target name="analyse" depends="deletesrc, download, sonar" /-->
<target name="analyse" depends=" download, sonar" />
</project>
`
`
を下回るようです。 #!/ bin/sh ant -f ../build.xml analyze 分析がログに正しく実行されていることを示すサーバーに送信されていません。だから、私はbuild.xmlに何か問題があると思う。だから私は助けが必要です。
これは私がコマンドを実行した後に取得するログです:アリ-fは、事前に
Buildfile: C:\runner\runner\antbuild.xml
deletesrc:
download:
[sf:retrieve] Request for a retrieve submitted successfully.
[sf:retrieve] Request Id for the current retrieve task: 04s90000003elivAAA
[sf:retrieve] Waiting for server to finish processing the request...
[sf:retrieve] Request Status: Completed
[sf:retrieve] Finished request 04s90000003elivAAA successfully.
sonar:
analyse:
BUILD SUCCESSFUL
Total time: 15 seconds
感謝を分析するbuild.xml!
私はあなたの解析資格情報をStackOverflowに投稿しただけではありませんでした。それにもかかわらず私はそれらを脱いだ。しかし、十分な担当者を持つ人々は編集履歴でそれらを見ることができます。あなたがこれを投稿したときにあなたのコーヒーを持っていなかったという機会に、あなたは今あなたの資格情報を更新するべきです。 –
また、問題の内容を実際には述べていません。 –
分析結果がサーバーに送信されていないことをどのように知っていますか?分析ログのエラー?他に何か?また、SonarQubeのバージョンを含むように質問を編集してください –