我有一个具有以下结构的多模块 maven 项目
myProject
+ parent
- pom.xml
+ moduleA
- pom.xml
+ moduleB
- pom.xml
我将在父目录中配置jqassistant,就像在一个简单项目中一样。但我想,它不会找到任何类。我真的必须再次声明所有模块引用吗
<scanIncludes>
<scanInclude>
<path>../moduleA/target/classes</path>
<scope>java:classpath</scope>
</scanInclude>
</scanIncludes>
还是有更清洁的方法?我是否必须执行其他步骤?
不需要特殊的扫描包含。但是有必要设置jqassistant.useExecutionRootAsProjectRoot
为true
. 这可以通过系统属性-Djqassistant.useExecutionRootAsProjectRoot
或<useExecutionRootAsProjectRoot>true</useExecutionRootAsProjectRoot>
在 pom.xml 的配置部分中完成。例如,如果您直接运行 jquasssitant 目标,则jqassistant:server
必须设置系统属性。如果您经常使用mvn clean install
,将 neo4j 数据库存储在目标目录之外很重要。否则最后一次清理将失败。您可以使用<storeDirectory>${project.build.directory}/../../store</storeDirectory>
. 有了-DstoreDirectory
它似乎并不工作。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句