如果父项目下有多个模块,如何指示jqassistant不扫描或分析特定模块?这是因为我在执行jqassistant时遇到错误:scan,使用父pom.xml进行分析。但是当单独运行时,扫描&分析是成功的。不确定失败的原因。那么有没有办法从jqassistant scan& amp跳过这个模块分析?
[错误]无法执行目标com.buschmais.jqassistant:jqassistant-> maven-plugin:1.3.0:analyze(default-cli)on project> myXYZProjectIntegrationTests:Execution default-cli of goal> com。 buschmais.jqassistant:jqassistant-maven-plugin:1.3.0:analyze failed:>找到Node [80826]的多个关系[DECLARES,INCOMING] - > > [帮助1]
[INFO]应用概念'customJU:LambdaMethods',严重程度为:'MINOR'。
[DEBUG] Executing query '
MATCH
(type:Type)-[:DECLARES]->(lambda:Method)
WHERE
exists(lambda.synthetic)
and exists(lambda.static)
and lambda.name starts with("lambda$")
SET
lambda:Lambda
WITH
type, lambda
MATCH
(type)-[:DECLARES]->(method:Method)
WHERE
method <> lambda
and method.firstLineNumber <= lambda.firstLineNumber
and method.lastLineNumber >= lambda.lastLineNumber
MERGE
(method)-[:DECLARES]->(lambda)
RETURN
method as lambdaMethod
' with parameters [{}]
似乎“MERGE(方法) - [:DECLARES] - &gt;(lambda)”如果任何一方为空则失败。如何在合并之前检查它是否是有效的合并?
答案 0 :(得分:1)
两个答案:
我在扩展演示应用程序时偶然发现了同样的问题,只需替换
MERGE
(method)-[:DECLARES]->(lambda)
与
MERGE
(method)-[:DECLARES_LAMBDA]->(lambda)
请注意,需要相应更改任何相关约束/概念,以使用DECLARES_LAMBDA而不是DECLARES。背后的原因是jLAssistant的报告机制无法处理DECLARES关系的模糊性。
您可以通过将以下插件配置添加到pom.xml来跳过单个Maven模块的执行:
<build>
<plugins>
<plugin>
<groupId>com.buschmais.jqassistant</groupId>
<artifactId>jqassistant-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
或只是
<properties>
<jqassistant.skip>true</jqassistant.skip>
</properties>