Created
January 3, 2014 11:08
-
-
Save przodownikR1/8236286 to your computer and use it in GitHub Desktop.
Example sonar config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>pl.java.przodownik</groupId> | |
<artifactId>exampleSonar</artifactId> | |
<name>exampleSonar</name> | |
<packaging>war</packaging> | |
<version>1.0.0-SNAPSHOT</version> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | |
<maven.jetty.plugin>8.1.11.v20130520</maven.jetty.plugin> | |
<maven.tomcat.plugin>2.1</maven.tomcat.plugin> | |
<java.version>1.7</java.version> | |
<!-- spring --> | |
<spring.version>3.2.5.RELEASE</spring.version> | |
<json-path.version>0.9.1</json-path.version> | |
<jackson.version>1.9.12</jackson.version> | |
<spring.data.jpa.version>1.4.2.RELEASE</spring.data.jpa.version> | |
<spring.hateoas.version>0.7.0.RELEASE</spring.hateoas.version> | |
<aspectj.version>1.7.4</aspectj.version> | |
<c3p0.version>0.9.1.2</c3p0.version> | |
<bonecp.version>0.8.0.RELEASE</bonecp.version> | |
<bonecp-provider.version>0.8.0-alpha1</bonecp-provider.version> | |
<spring.security.version>3.1.4.RELEASE</spring.security.version> | |
<spring.social.version>1.0.2.RELEASE</spring.social.version> | |
<javax.validation.version>1.1.0.Final</javax.validation.version> | |
<hibernate.version>4.2.0.Final</hibernate.version> | |
<hibernate.validator.version>5.0.1.Final</hibernate.validator.version> <!-- 5.0.1.Final --> <!-- 4.3.1.Final --> | |
<javax.validation.version>1.1.0.Final</javax.validation.version> | |
<jpa2.version>1.0.1.Final</jpa2.version> | |
<hibernate-jpamodelgen.version>1.3.0.Final</hibernate-jpamodelgen.version> | |
<mysql-connector-java.version>5.1.27</mysql-connector-java.version> | |
<hsqldb.org.version>2.3.1</hsqldb.org.version> | |
<junit.version>4.11</junit.version> | |
<hamcrest.version>1.3</hamcrest.version> | |
<mockito.version>1.9.5</mockito.version> | |
<commons-dbcp.version>1.4</commons-dbcp.version> | |
<ehcache.version>2.6.5</ehcache.version> | |
<fest-assert.version>1.4</fest-assert.version> | |
<slf4j.version>1.7.5</slf4j.version> | |
<logback.version>1.0.13</logback.version> | |
<commons-lang.version>2.4</commons-lang.version> | |
<mail.version>1.4</mail.version> | |
<cglib.version>3.0</cglib.version> | |
<commons-io.version>1.4</commons-io.version> | |
<jackson-mapper-asl.version>1.9.9</jackson-mapper-asl.version> | |
<joda.version>2.3</joda.version> | |
<commons.fileupload.version>1.3</commons.fileupload.version> | |
<webjars-bootstrap.version>2.3.2</webjars-bootstrap.version> | |
<webjars-jquery-ui.version>1.10.2-1</webjars-jquery-ui.version> | |
<webjars-jquery.version>2.0.2</webjars-jquery.version> | |
<webjars-jqgrid.version>4.4.5</webjars-jqgrid.version> | |
<dandelion.datatables.version>0.9.2</dandelion.datatables.version> | |
<jaxb-api.version>2.2.11</jaxb-api.version> | |
<jaxb-xjc.version>2.2.7</jaxb-xjc.version> | |
<maven.ant.plugin>1.7</maven.ant.plugin> | |
<maven-war-plugin.version>2.3</maven-war-plugin.version> | |
<maven.aspectj.plugin>1.4</maven.aspectj.plugin> | |
<maven.assembly.plugin>2.4</maven.assembly.plugin> | |
<maven.build.helper.plugin>1.7</maven.build.helper.plugin> | |
<maven.clean.plugin>2.5</maven.clean.plugin> | |
<maven.compiler.plugin>3.1</maven.compiler.plugin> | |
<maven.dependency.plugin>2.5.1</maven.dependency.plugin> | |
<maven.deploy.plugin>2.7</maven.deploy.plugin> | |
<maven.eclipse.plugin>2.9</maven.eclipse.plugin> | |
<maven.enforcer.plugin>1.3</maven.enforcer.plugin> | |
<maven.exec.plugin>1.2</maven.exec.plugin> | |
<maven.failsafe.plugin>2.12</maven.failsafe.plugin> | |
<maven.jar.plugin>2.3.2</maven.jar.plugin> | |
<maven.release.plugin>2.2.2</maven.release.plugin> | |
<maven.resources.plugin>2.6</maven.resources.plugin> | |
<maven.sonar.plugin>2.10</maven.sonar.plugin> | |
<maven.source.plugin>2.1.2</maven.source.plugin> | |
<maven.surefire.plugin>2.4.3</maven.surefire.plugin> | |
<maven.site.plugin>3.3</maven.site.plugin> | |
<velocity.version>1.7</velocity.version> | |
<velocity-tools.version>2.0</velocity-tools.version> | |
<guava.version>15.0</guava.version><!-- 14.0.1 --> | |
<maven.versions.plugin>1.3.1</maven.versions.plugin> | |
<maven.querydsl-maven-plugin.version>3.2.1</maven.querydsl-maven-plugin.version> | |
<commons-io.version>2.4</commons-io.version> | |
<p6spy.version>1.3</p6spy.version> | |
<jsoup.version>1.7.2</jsoup.version> | |
<wro4j.version>1.7.0</wro4j.version> | |
<lombok.version>1.12.2</lombok.version> | |
<common-lang.version>3.1</common-lang.version> | |
<faster-xml.version>2.3.0</faster-xml.version> | |
<catch-exception.version>1.0.4</catch-exception.version> | |
<querydsl.version>3.2.4</querydsl.version> | |
<skip.integration.tests>true</skip.integration.tests> | |
<skip.unit.tests>false</skip.unit.tests> | |
<skip.acceptance.tests>false</skip.acceptance.tests> | |
<selenium-version>2.37.1</selenium-version> | |
<sonar.version>2.1</sonar.version> | |
<ehcache-web.version>2.0.4</ehcache-web.version> | |
</properties> | |
<profiles> | |
<profile> | |
<id>sonar</id> | |
<activation> | |
<activeByDefault>true</activeByDefault> | |
</activation> | |
<properties> | |
<sonar.jdbc.url>jdbc:mysql://localhost:3306/sonar</sonar.jdbc.url> | |
<sonar.jdbc.driver>com.mysql.jdbc.Driver</sonar.jdbc.driver> | |
<sonar.jdbc.username>sonar</sonar.jdbc.username> | |
<sonar.jdbc.password>sonar</sonar.jdbc.password> | |
<sonar.host.url>http://localhost:9000</sonar.host.url> | |
</properties> | |
</profile> | |
</profiles> | |
<build> | |
<finalName>sonarExamples</finalName> | |
<filters> | |
<filter>profiles/${env}/config.xml</filter> | |
</filters> | |
<resources> | |
<resource> | |
<directory>${basedir}/src/main/resources/</directory> | |
<filtering>true</filtering> | |
</resource> | |
<resource> | |
<directory>profiles/${env}</directory> | |
<filtering>true</filtering> | |
</resource> | |
</resources> | |
<plugins> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>build-helper-maven-plugin</artifactId> | |
<executions> | |
<execution> | |
<id>add-it-source</id> | |
<goals> | |
<goal>add-test-source</goal> | |
</goals> | |
<configuration> | |
<sources> | |
<source>src/it/java</source> | |
</sources> | |
</configuration> | |
</execution> | |
<execution> | |
<id>add-it-resource</id> | |
<goals> | |
<goal>add-test-resource</goal> | |
</goals> | |
<configuration> | |
<resources> | |
<resource> | |
<directory>src/it/resources</directory> | |
</resource> | |
</resources> | |
</configuration> | |
</execution> | |
<execution> | |
<id>add-source-jpa</id> | |
<phase>generate-sources</phase> | |
<goals> | |
<goal>add-source</goal> | |
</goals> | |
<configuration> | |
<sources> | |
<source>${build.directory}/generated-sources/apt</source> | |
</sources> | |
</configuration> | |
</execution> | |
<execution> | |
<id>add-source-dsl</id> | |
<phase>generate-sources</phase> | |
<goals> | |
<goal>add-source</goal> | |
</goals> | |
<configuration> | |
<sources> | |
<source>${build.directory}/generated-sources/java</source> | |
</sources> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>${maven.compiler.plugin}</version> | |
<configuration> | |
<compilerArguments> | |
<Xlint /> | |
</compilerArguments> | |
<verbose>true</verbose> | |
<source>${java.version}</source> | |
<target>${java.version}</target> | |
<showWarnings>true</showWarnings> | |
<!-- <compilerArgument>-proc:none</compilerArgument> --> | |
<!-- <compilerArguments> <processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor> | |
</compilerArguments> --> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-war-plugin</artifactId> | |
<version>${maven-war-plugin.version}</version> | |
<configuration> | |
<warName>performanceSpring</warName> | |
<failonmissingwebxml>false</failonmissingwebxml> | |
<webResources> | |
<resource> | |
<filtering>true</filtering> | |
<directory>src/main/webapp</directory> | |
<includes> | |
<include>*/config.xml</include> | |
<!-- include any other file types you want to filter --> | |
</includes> | |
</resource> | |
</webResources> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-enforcer-plugin</artifactId> | |
<version>${maven.enforcer.plugin}</version> | |
<executions> | |
<execution> | |
<id>enforce-banned-dependencies</id> | |
<goals> | |
<goal>enforce</goal> | |
</goals> | |
<configuration> | |
<rules> | |
<bannedDependencies> | |
<excludes> | |
<!-- <<exclude>commons-logging:commons-logging</exclude> <exclude>log4j:log4j</exclude> --> | |
<exclude>org.slf4j:1.5*</exclude> | |
<exclude>org.hibernate:3.*</exclude> | |
<exclude>org.springframework:2.*</exclude> | |
<exclude>org.springframework:3.0.*</exclude> | |
</excludes> | |
</bannedDependencies> | |
<!-- <requireMavenVersion> <version>${maven.version.range}</version> | |
</requireMavenVersion> --> | |
<requireJavaVersion> | |
<version>${java.version}</version> | |
</requireJavaVersion> | |
</rules> | |
<fail>true</fail> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.tomcat.maven</groupId> | |
<artifactId>tomcat7-maven-plugin</artifactId> | |
<version>${maven.tomcat.plugin}</version> | |
<configuration> | |
<server>tomcat-development-server</server> | |
<port>9966</port> | |
<path>/performanceSpring</path> | |
<protocol>org.apache.coyote.http11.Http11NioProtocol</protocol> | |
<systemProperties> | |
<com.sun.management.jmxremote>true</com.sun.management.jmxremote> | |
<com.sun.management.jmxremote.port>8050</com.sun.management.jmxremote.port> | |
<com.sun.management.jmxremote.ssl>false</com.sun.management.jmxremote.ssl> | |
<com.sun.management.jmxremote.authenticate>false</com.sun.management.jmxremote.authenticate> | |
<java.util.logging.manager>org.apache.juli.ClassLoaderLogManager</java.util.logging.manager> | |
<logback.ContextSelector>JNDI</logback.ContextSelector> | |
</systemProperties> | |
</configuration> | |
<dependencies> | |
<dependency> | |
<groupId>org.slf4j</groupId> | |
<artifactId>slf4j-api</artifactId> | |
<version>${slf4j.version}</version> | |
<scope>runtime</scope> | |
</dependency> | |
<dependency> | |
<groupId>ch.qos.logback</groupId> | |
<artifactId>logback-classic</artifactId> | |
<version>${logback.version}</version> | |
<scope>runtime</scope> | |
</dependency> | |
<dependency> | |
<groupId>ch.qos.logback</groupId> | |
<artifactId>logback-access</artifactId> | |
<version>${logback.version}</version> | |
<scope>runtime</scope> | |
</dependency> | |
</dependencies> | |
</plugin> | |
<plugin> | |
<artifactId>maven-failsafe-plugin</artifactId> | |
<configuration> | |
<systemPropertyVariables> | |
<environment>${environment}</environment> | |
</systemPropertyVariables> | |
<includes> | |
<include>**/*IT.java</include> | |
</includes> | |
<skipTests>${skip.integration.tests}</skipTests> | |
</configuration> | |
<executions> | |
<execution> | |
<id>integration-test</id> | |
<goals> | |
<goal>integration-test</goal> | |
</goals> | |
</execution> | |
<execution> | |
<id>verify</id> | |
<goals> | |
<goal>verify</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<groupId>com.mysema.maven</groupId> | |
<artifactId>maven-apt-plugin</artifactId> | |
<executions> | |
<execution> | |
<id>dsl</id> | |
<goals> | |
<goal>process</goal> | |
</goals> | |
<configuration> | |
<logOnlyOnError>true</logOnlyOnError> | |
<outputDirectory>target/generated-sources/java</outputDirectory> | |
<processor>com.mysema.query.apt.QuerydslAnnotationProcessor</processor> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>sonar-maven-plugin</artifactId> | |
<version>${sonar.version}</version> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-site-plugin</artifactId> | |
<version>${maven.site.plugin}</version> | |
<configuration> | |
<reportPlugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-project-info-reports-plugin</artifactId> | |
<reports> | |
<report>index</report> | |
<report>project-team</report> | |
<report>license</report> | |
<report>mailing-list</report> | |
<report>dependencies</report> | |
<report>dependency-convergence</report> | |
<report>plugin-management</report> | |
<report>cim</report> | |
<report>issue-tracking</report> | |
<report>scm</report> | |
<report>summary</report> | |
</reports> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-surefire-report-plugin</artifactId> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-javadoc-plugin</artifactId> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-checkstyle-plugin</artifactId> | |
<configuration> | |
<configLocation>config/sun_checks.xml</configLocation> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>jdepend-maven-plugin</artifactId> | |
</plugin> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>cobertura-maven-plugin</artifactId> | |
</plugin> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>taglist-maven-plugin</artifactId> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jxr-plugin</artifactId> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-pmd-plugin</artifactId> | |
<configuration> | |
<linkXref>true</linkXref> | |
<minimumTokens>100</minimumTokens> | |
<minimumPriority>3</minimumPriority> | |
<targetJdk>${java.version}</targetJdk> | |
</configuration> | |
</plugin> | |
</reportPlugins> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.pitest</groupId> | |
<artifactId>pitest-maven</artifactId> | |
<version>0.29</version> | |
<configuration> | |
<threads>4</threads> | |
<historyInputLocation>target/pitHistory.txt</historyInputLocation> | |
<historyOutputLocation>target/pitHistory.txt</historyOutputLocation> | |
</configuration> | |
</plugin> | |
</plugins> | |
<pluginManagement> | |
<plugins> | |
<plugin> | |
<groupId>org.projectlombok</groupId> | |
<artifactId>lombok-maven-plugin</artifactId> | |
<version>0.11.8.0</version> | |
</plugin> | |
</plugins> | |
</pluginManagement> | |
</build> | |
<dependencies> | |
</dependencies> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment