有没有办法在Sonar中为一个项目提供多个配置文件?
例如,我们有一个Java EE项目:EJB和WebApp(JSP和Back Bean).我们有3个质量配置文件:Java,Web和XML.要在我们的项目中"执行"这3个配置文件,我们运行三个声纳分析并在Sonar中创建3个结果项目.
我们使用视图来重新组织这三个项目,有没有办法让一个项目使用3个配置文件而不使用视图?
我们希望使用视图来分组不同的项目,而不是在同一个项目上.
我使用带有m2e和m2e-wtp插件的Eclipse Kepler.
我需要自定义我的EAR模块的部署程序集,因为我正在使用Weblogic文件上的过滤,所以我想使用下面生成的文件/target/m2e-wtp/ear-resources
而不是下面的文件/src/main/application
.
为了做到这一点,我删除/src/main/application
了部署程序集选项卡的源代码.
但是,如果我在EAR项目上右键单击Maven/Update Project,则m2e(或m2e-wtp?)插件会再次添加/src/main/application
部署程序集选项卡中的目录.
有没有办法让插件部署配置不被插件覆盖?
pom.xml
如果能有所帮助,我会把我的EAR模块放进去.
问候,
燕姿
我的Pom.xml:
<artifactId>projetx-sph-ear</artifactId>
<packaging>ear</packaging>
<name>projetx-sph-ear</name>
<description></description>
<!-- Projet parent -->
<parent>
<artifactId>projetx-sph-parent</artifactId>
<groupId>fr.sihm.eand</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<!-- Dépendances -->
<dependencies>
<!-- EJB -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>projetx-sph-ejb</artifactId>
<version>${project.version}</version>
<classifier>${envClassifier}</classifier>
<type>ejb</type>
<!--<classifier>${envClassifier}</classifier> -->
</dependency>
<!-- WAR -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>projetx-sph-web</artifactId>
<version>${project.version}</version>
<classifier>${envClassifier}</classifier>
<type>war</type>
<!--<classifier>${envClassifier}</classifier> -->
</dependency>
</dependencies>
<!-- Paramètres de build -->
<build>
<resources>
<resource>
<directory>src/main/application</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<pluginManagement>
<plugins> …
Run Code Online (Sandbox Code Playgroud) 我认为我们在Sonar的安装中有误报(5.6和java插件4.0).应删除未使用的"私有"方法问题引发以下代码:
public boolean orderLineHasDetails(OrderLine orderLine) {
boolean result = orderLine.getContractDevices() != null && orderLine.getContractDevices().size() > 0;
if (result) {
result = asLeastOneUniqueId(orderLine.getContractDevices());
}
return result;
}
private boolean asLeastOneUniqueId(List<ContractDevice> contractDeviceList) {
Iterator<ContractDevice> contractDeviceIterator = contractDeviceList.iterator();
boolean result = false;
while (!result && contractDeviceIterator.hasNext()) {
result = StringUtils.isNotBlank(contractDeviceIterator.next().getDeviceUniqueId());
}
return result;
}
Run Code Online (Sandbox Code Playgroud)
这是一个已知的错误 ?
谢谢你的帮助.
问候,
斯特凡
我想知道是否可以导出/导入仪表板配置(小部件及其配置)?
其目的是在修改仪表板之前保存仪表板或在Sonar的测试实例上测试仪表板,并在完成Sonar的"生产"实例时导入仪表板.
问候,
斯特凡