且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我可以使用不同的排除集在声纳中分析同一个 Maven 项目两次吗?

更新时间:2023-10-28 08:03:22

您的编辑是正确的.使用 sonar.branch 属性创建一个不同的 Id,即从 Sonar 的角度来看一个不同的项目.

Your edit is correct. Using the sonar.branch property creates a different Id, i.e. from the Sonar point of view a different project.

您可以在bar"-profile 中包含 sonar.branch 属性(当然,您需要在第二份工作中调用该配置文件),从而确保您的数据库不会损坏.

You could include the sonar.branch property in your "bar"-profile (of course you need to call the profile in your second job) and thus make sure that your database does not get corrupted.

确实,您需要对项目进行两次分析,但这样会更简洁(您以后可以选择为您的酒吧配置文件使用不同的规则).

True, you would need to analyze the project twice, but is much more cleaner that way (and you could later choose to use different rules for your bar profile).

但是,您不一定需要创建两个作业,您可以将声纳分析用作构建操作,而不是构建后操作.

However you would not necessarily need to create two jobs, you can use a Sonar analysis as a build action instead of a post build action.

您可能无需使用商业视图插件构建两次即可实现您的效果.

You might be able to achieve your effect without building twice using the commerical Views plugin.