Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The directory name is the plugin name
  • The groupId is org.codehaus.sonar-plugins and artifactId sonar-<name>-plugin. For example the plugin "foo" is stored in the directory foo and its artifact id is sonar-foo-plugin.
  • Set the following properties:

    Code Block
    titlepom.xml
    langxml
    <project>
      <parent>
        <groupId>org.codehaus.sonar-plugins</groupId>
        <artifactId>parent</artifactId>
        <!-- 
             The latest version can be found by looking at 
             http://search.maven.org/#search|gav|1|g%3A%22org.codehaus.sonar-plugins%22%20AND%20a%3A%22parent%22
        -->
        <version>REPLACE_BY_LATEST_VERSION</version>
      </parent>
      <artifactId>sonar-foo-plugin</artifactId>
      <version>1.0-SNAPSHOT</version>
      <packaging>sonar-plugin</packaging>
      <name>Plugin name</name>
      <description>Plugin description</description>
      <url>http://docs.codehaus.org/display/SONAR/MY+PLUGIN</url>
      <inceptionYear>2014</inceptionYear>
      <organization>
        <name>My Organization</name>
        <url>http://www.my-organization.com</url>
      </organization>
      <issueManagement>
        <system>JIRA</system>
        <url>http://jira.codehaus.org/browse/SONARPLUGINS/component/MY-PLUGINJIRA-COMPONENT-ID</url>
      </issueManagement>
      <scm>
        <connection>scm:git:git@github.com:SonarCommunity/MY-PLUGIN.git</connection>
        <developerConnection>scm:git:git@github.com:SonarCommunity/MY-PLUGIN.git</developerConnection>
        <url>https://github.com/SonarCommunity/MY-PLUGIN</url>
        <tag>HEAD</tag>
      </scm>
      ...
    </project>
    



  • Configure your pom by overriding values provided by parent - see SonarQube Plugins Forge Parent POM. Default license is LGPL3.
  • Follow Maven POM conventions
  • Add the plugin to the main pom of the forge

...