我有以下声纳的蚂蚁项目设置:
<!-- list of Sonar project related properties -->
<property name="sonar.projectName" value="bla bla" />
<property name="sonar.projectKey" value="com.my.project" />
<property name="sonar.projectVersion" value="7.3" />
<property name="sonar.language" value="java" />
<property name="sonar.modules" value="admin-api" />
<!-- all of the sub-modules -->
<property name="admin-api.sonar.projectName" value="admin-api" />
<property name="admin-api.sonar.projectBaseDir" location="server/admin/admin-api"/>
<property name="admin-api.sonar.sources" value="src" />
<property name="admin-api.sonar.binaries" value="build" />
<sonar:sonar xmlns:sonar="antlib:org.sonar.ant">
<!-- path to libraries (optional). These libraries are for example used by the Java Findbugs plugin -->
<libraries>
<path>
<fileset dir="server/third-party-jars" includes="*.jar" />
</path>
</libraries>
</sonar:sonar>
我收到 1 个警告:
[sonar:sonar] *****************************************************************************************************************************************
[sonar:sonar] /!\ Sonar Ant Task running in compatibility mode: please refer to the documentation to udpate your scripts to comply with the standards.
[sonar:sonar] *****************************************************************************************************************************************
还有以下错误:
The following mandatory information is missing:
- task attribute 'key'
- task attribute 'version'
我知道有迁移到新的更改,sonar ant task 2.0
但找不到指定更改的任何地方。
另外,我知道现在必须在父 build.xml
模块中指定所有模块设置,而不是在子模块 build.xml 文件中指定。那么为什么我会收到错误消息?我按照https://github.com/SonarSource/sonar-examples/tree/master/projects/multi-module/ant中的示例进行操作。我错过了什么吗?
谢谢