darkjune 发表于 2013-2-4 19:50:27

Maven与Clover集成总结,license问题

在maven项目的pom.xml中加入Clover的plugin,如下:
            <plugin>            <artifactId>maven-clover-plugin</artifactId>            <groupId>com.atlassian.maven.plugins</groupId>            <configuration>                <licenseLocation>${clover.licenseLocation}</licenseLocation>                <targetPercentage>50%</targetPercentage>            </configuration>            </plugin>   
此处的clover.licenseLocation是指Maven安装后本地repository配置目录的settings.xml中licenseLocation的位置.Maven的本地repository一般是在windows用户目录下
,(这个licenseLocation中不可以指定成C:/clover.license的样式,Maven找不到这个格式的地址,这个地方是个trap.)如C:\Documents and Settings\user\.m2中,在这个全局settings中需要配置clover的license的东西,具体是在profile节点中配置,设置如下
<profiles><profile>    <id>myprofile</id>    <activation>      <activeByDefault>true</activeByDefault>    </activation>      <properties>      <clover.licenseLocation>C:/clover.license</clover.licenseLocation>      </properties>      <pluginRepositories>      <pluginRepository>      <id>atlassian-m2-repository</id>      <name>Atlassian Maven 2.x Repository</name>      <url>http://repository.atlassian.com/maven2</url>      </pluginRepository>    </pluginRepositories>   </profile></profiles>
页: [1]
查看完整版本: Maven与Clover集成总结,license问题