Skip to content

Instantly share code, notes, and snippets.

@MatthieuScarset
Created June 10, 2017 10:43
Show Gist options
  • Save MatthieuScarset/1b3db308ef7ad000f6c6ea842a5f298e to your computer and use it in GitHub Desktop.
Save MatthieuScarset/1b3db308ef7ad000f6c6ea842a5f298e to your computer and use it in GitHub Desktop.
SonarQube pom.xml example for Drupal 7 project (mvn sonar:sonar)
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>APPNO</groupId>
<artifactId>AVALERE</artifactId>
<name>AVAL003</name>
<version>1.0</version>
<packaging>pom</packaging>
<build>
<!--
Quality Profile: Drupal
@see http://localhost:9000/profiles
-->
<!--
Excluded sources for coverage:
**/*.features.*
**/*.strongarm.*
**/*.views.*
**/*.views_default.*
**/*.fields.*
**/*.field_group.*
@see http://localhost:9000/settings?category=exclusions
-->
<directory>sonar</directory>
<sourceDirectory>${basedir}/docroot/sites/all/modules/custom</sourceDirectory>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>2.7.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-php-plugin</artifactId>
<version>2.10.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/docroot/sites/all/modules/custom</source>
<source>${basedir}/docroot/sites/all/themes</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment