Add Maven profile for Sonarqube scans
diff --git a/pom.xml b/pom.xml
index 40b56d0..ef0e8b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,6 +49,64 @@
     </dependency>
   </dependencies>
   <profiles>
+    
+    <!-- for scanning code using Sonarqube: `mvn test -P sonarqube` -->
+    <profile>
+      <id>sonarqube</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.jacoco</groupId>
+            <artifactId>jacoco-maven-plugin</artifactId>
+            <version>0.7.5.201505241946</version>
+            <executions>
+              <execution>
+                <id>pre-unit-test</id>
+                <goals>
+                  <goal>prepare-agent</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <version>2.19.1</version>
+            <configuration>
+              <properties>
+                <property>
+                  <name>listener</name>
+                  <value>org.sonar.java.jacoco.JUnitListener</value>
+                </property>
+              </properties>
+            </configuration>
+          </plugin>
+          <plugin>
+            <groupId>org.sonarsource.scanner.maven</groupId>
+            <artifactId>sonar-maven-plugin</artifactId>
+            <version>3.0.1</version>
+            <executions>
+              <execution>
+                <phase>test</phase>
+                <goals>
+                  <goal>sonar</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+      <dependencies>
+        <dependency>
+          <groupId>org.codehaus.sonar-plugins.java</groupId>
+          <artifactId>sonar-jacoco-listeners</artifactId>
+          <version>3.2</version>
+          <scope>test</scope>
+        </dependency>
+      </dependencies>
+    </profile>
+    
+    <!-- to deploy to Maven Central: `mvn deploy -P ossrh` -->
     <profile>
       <id>ossrh</id>
       <build>