我知道如何在Maven (在本地Eclipse或Jenkins中)中使用三叶草,问题是要求每个人都将三叶草许可证放在同一个目录中并不是一个好主意。对此有什么建议吗?
<properties>
<clover.version>3.1.8</clover.version>
<clover.license>C:\xxx\clover_license</clover.license>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<version>${clover.version}</version>
<configuration>
<license>${clover.license}</license>
</configuration>
</plugin>
</plugins>
</build>我认为使用Maven参数传递变量是可能的,但我需要在Jenkins中的每个项目中设置它。如果我更改了Jenkins服务器中的文件,我需要修改每个项目。
-Dclover.license=C:\xxx\clover_license发布于 2013-08-08 21:51:29
有关建议,请参阅How to configure your clover.license。我建议您“设置您的.m2/settings.xml文件”,这样您就可以一次定义该属性:
<profiles>
<profile>
<id>my-clover-profile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- You can define the path to a license file: -->
<maven.clover.licenseLocation>/path/to/clover.license</maven.clover.licenseLocation>
<!-- Or you can embed license key (remember to keep newline characters): -->
<maven.clover.license><![CDATA[
...
]]></maven.clover.license>
</properties>
</profile>
</profiles>https://stackoverflow.com/questions/18106329
复制相似问题