update source elements to format better
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115571 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -27,17 +27,11 @@
|
||||
<faq id="change-template">
|
||||
<question>How do I change the template used to generate <code>cruisecontrol.xml</code> configuration file?</question>
|
||||
<answer>
|
||||
If you specify your own maven.cruisecontrol.template, then that will be used
|
||||
If you specify your own <code>maven.cruisecontrol.template</code>, then that will be used
|
||||
instead. If you want to wrap all of your logic up in your own plugin so that
|
||||
you don't have to set each project individually, then specify it like this:
|
||||
<code>maven.cruisecontrol.template=${maven.home}/plugins/my-company-plugin-0.1/plugin-resources/cruisecontrol.jsl</code>
|
||||
and add to your plugin.xml this:
|
||||
<source><![CDATA[
|
||||
<preGoal name="build:start">
|
||||
<ant:property name="maven.cruisecontrol.template" value="${anite.cruisecontrol.template}"/>
|
||||
<maven:pluginVar plugin="maven-cruisecontrol-plugin" property="maven.cruisecontrol.template" var="loc"/>
|
||||
</preGoal>]]></source>
|
||||
Note, this is a very brittle solution and suggestions on how to not hardcode the path would be appreciated!
|
||||
<source><![CDATA[
|
||||
maven.cruisecontrol.template=${plugin.resources}/my-cc-template.jsl]]></source>
|
||||
</answer>
|
||||
</faq>
|
||||
|
||||
|
||||
@@ -62,11 +62,8 @@
|
||||
maven 1.0-rc1), you issue the following command to maven to
|
||||
download the version of your choice.
|
||||
</p>
|
||||
<source>
|
||||
<![CDATA[
|
||||
$ maven -DgroupId=maven -DartifactId=maven-pmd-plugin -Dtype=plugin -Dversion=1.3 plugin:download
|
||||
]]>
|
||||
</source>
|
||||
<source><![CDATA[
|
||||
$ maven -DgroupId=maven -DartifactId=maven-pmd-plugin -Dtype=plugin -Dversion=1.3 plugin:download]]></source>
|
||||
<p>
|
||||
This command will download the plugin, remove the other versions of
|
||||
the maven-pmd-plugin and make this recently downloaded version
|
||||
@@ -94,15 +91,12 @@
|
||||
project descriptor</a>.
|
||||
</p>
|
||||
|
||||
<source>
|
||||
<![CDATA[
|
||||
<reports>
|
||||
...
|
||||
<report>maven-pmd-plugin</report>
|
||||
...
|
||||
</reports>
|
||||
]]>
|
||||
</source>
|
||||
<source><![CDATA[
|
||||
<reports>
|
||||
...
|
||||
<report>maven-pmd-plugin</report>
|
||||
...
|
||||
</reports>]]></source>
|
||||
</answer>
|
||||
</faq>
|
||||
|
||||
@@ -117,29 +111,23 @@
|
||||
maven.xml:
|
||||
</p>
|
||||
|
||||
<source>
|
||||
<![CDATA[
|
||||
<source><![CDATA[
|
||||
<?xml version="1.0"?>
|
||||
<preGoal name="site:generate">
|
||||
<attainGoal name="pmd"/>
|
||||
</preGoal>
|
||||
]]>
|
||||
</source>
|
||||
</preGoal>]]></source>
|
||||
|
||||
<p>
|
||||
The generated report has to be added manually to the
|
||||
website which is usually done with navigation.xml.
|
||||
</p>
|
||||
|
||||
<source>
|
||||
<![CDATA[
|
||||
<source><![CDATA[
|
||||
<?xml version="1.0"?>
|
||||
<menu name="Custom Reports">
|
||||
<item name="PMD Report" href="/pmd-report.html"/>
|
||||
<!-- Add more custom reports here -->
|
||||
</menu>
|
||||
]]>
|
||||
</source>
|
||||
</menu>]]></source>
|
||||
</answer>
|
||||
</faq>
|
||||
|
||||
@@ -210,11 +198,8 @@
|
||||
<p>
|
||||
The default setting for the <code>maven.pmd.rulesetfiles</code>
|
||||
property is:
|
||||
<source>
|
||||
<![CDATA[
|
||||
maven.pmd.rulesetfiles = rulesets/basic.xml,rulesets/unusedcode.xml,rulesets/imports.xml
|
||||
]]>
|
||||
</source>
|
||||
<source><![CDATA[
|
||||
maven.pmd.rulesetfiles = rulesets/basic.xml,rulesets/unusedcode.xml,rulesets/imports.xml]]></source>
|
||||
</p>
|
||||
<p>
|
||||
The following list of default pmd rulesets was obtained from
|
||||
@@ -245,8 +230,7 @@
|
||||
<p>
|
||||
Example of a custom ruleset, saved as file called
|
||||
<code>favorite-pmd.xml</code> in your project root.
|
||||
<source>
|
||||
<![CDATA[
|
||||
<source><![CDATA[
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<ruleset name="Favorites">
|
||||
@@ -267,18 +251,13 @@
|
||||
<rule ref="rulesets/controversial.xml/NullAssignment" />
|
||||
<rule ref="rulesets/controversial.xml/UnusedModifier" />
|
||||
|
||||
</ruleset>
|
||||
]]>
|
||||
</source>
|
||||
</ruleset>]]></source>
|
||||
</p>
|
||||
<p>
|
||||
How it's referenced in your <code>project.properties</code>
|
||||
file.
|
||||
<source>
|
||||
<![CDATA[
|
||||
maven.pmd.rulesetfiles = ${basedir}/favorite-pmd.xml
|
||||
]]>
|
||||
</source>
|
||||
<source><![CDATA[
|
||||
maven.pmd.rulesetfiles = ${basedir}/favorite-pmd.xml]]></source>
|
||||
</p>
|
||||
</li>
|
||||
</ol>
|
||||
@@ -295,7 +274,12 @@
|
||||
The JAR picked up the plugin is defined in
|
||||
$MAVEN_HOME/plugins/pmd/project.xml and can be
|
||||
changed.
|
||||
</p>
|
||||
</p>
|
||||
<p>
|
||||
Alternatively, you can specify the following in your ~/build.properties file:
|
||||
<source><![CDATA[maven.jar.override=on
|
||||
maven.jar.pmd=1.4]]></source>
|
||||
</p>
|
||||
</answer>
|
||||
|
||||
</faq>
|
||||
|
||||
Reference in New Issue
Block a user