Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
iconfalse
titleTable of Contents
Table of Contents
maxLevel31

How to

...

Use

Just add the following parent declaration in your project parent POM:

Code Block
titlepom.xml
langxml
<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.codehaus.sonar-plugins</groupId>
    <artifactId>parent</artifactId>
    <version>12<<version>REPLACE_WITH_LATEST_VERSION</version>
    <relativePath>../parent</relativePath>
  </parent>
  ...
</project>

How to

...

Upgrade

Just change Change the version of the parent pom you used previously. Have a look at each the release note of notes for each version you upgrade to see if there are some any notable changes which will require you to modify something in your project.

How to

...

Configure

The parent defines and uses a set of custom properties that can be reused and/or overrided overridden by projects to customize the default behavior of maven Maven defined in the parent pom.

License

Define licenses, inceptionYear and organization:

Code Block
titlepom.xml
langxml
<inceptionYear>2010</inceptionYear>
<organization>
  <name>MyCompany</name>
  <url>http://mycompany.com</url>
</organization>
<licenses>
  <license>
    <name>GNU LGPL v3</name>
    <url>http://www.gnu.org/licenses/lgpl.txt</url>
    <distribution>repo</distribution>
  </license>
</licenses>

You can change the values of the following properties to control license headers of your source files:

...

Now you can add/update headers of your source files using with the following command:

Code Block
mvn license:format

Maven plugins versions

The parent pom defines in a set of properties recommended for all recommended versions of maven Maven plugins to use.

Note

This isn't recommended, but could it may be useful to use a new newer version of a plugin not yet available Maven plugin than is specified in the parent POM or to workaround a bug by using another version. In all cases don it may be necessary to use another version of a plugin in order to work around a bug. If you must do so, do not forget to report to us the change you need. If it's good for one project, it could be useful for others.

Each project/module can override a version of a plugin to use a different from one than the one defined in parent. For example to change the version of sonar-packaging-maven-plugin you can use following code snippet:

Code Block
titlepom.xml
langxml
<properties>
  <version.sonar-packaging.plugin>1.2</version.sonar-packaging.plugin>
</properties>

Profiles

NameIdentifierActivationDescription
Release profilereleaseDeactivated by default. Activated during release. Can be activated with -PreleaseGenerates javadoc artifacts.
Integration testsintegration-testsDeactivated by default. Can be activated with -Pintegration-testsLaunch integration tests from JUnit using the failsafe plugin.

Known

...

Issues

Deployment is not possible if you are behind proxy - see SONARPLUGINS-1457

Development

All plugins specified in the POM , must be compatible with "maven.min.version" and " and java.min.version". This and available plugins plugin updates can be checked with help of versions-maven-plugin.

Changelog

JIRA Issues
anonymoustrue
titleVersion 12
height120
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=18364&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

JIRA Issues
anonymoustrue
titleVersion 11
height120
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+SONARPLUGINS+AND+fixVersion+%3D+PARENT-11+AND+status+%3D+Closed+ORDER+BY+priority+DESC&tempMax=1000

JIRA Issues
anonymoustrue
titleVersion 10
height120
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=17363&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

JIRA Issues
anonymoustrue
titleVersion 9
height120
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=17041&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

JIRA Issues
anonymoustrue
titleVersion 8
height180
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16925&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

JIRA Issues
anonymoustrue
titleVersion 7
height300
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16768&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000