sonarqube-ant-task

Used in: 0 components

Overview

Description

This is an Ant task allowing to start SonarQube analysis

Snippets

<dependency>
    <groupId>org.sonarsource.scanner.ant</groupId>
    <artifactId>sonarqube-ant-task</artifactId>
    <version>2.7.1.1951</version>
</dependency>

Maven POM File

<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>
  <parent>
    <groupId>org.sonarsource.scanner.ant</groupId>
    <artifactId>ant</artifactId>
    <version>2.7.1.1951</version>
  </parent>

  <artifactId>sonarqube-ant-task</artifactId>
  
  <name>SonarQube Scanner for Ant</name>
  <description>This is an Ant task allowing to start SonarQube analysis</description>
  <url>http://redirect.sonarsource.com/doc/ant-task.html</url>
  <inceptionYear>2011</inceptionYear>
  
  <properties>
    <ant.version>1.10.9</ant.version>
  </properties>

  <dependencies>
    <!-- Would be embedded in final JAR -->
    <dependency>
      <groupId>org.sonarsource.scanner.api</groupId>
      <artifactId>sonar-scanner-api</artifactId>
      <version>2.14.0.2002</version>
    </dependency>
    <!-- Would be provided by environment -->
    <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant</artifactId>
      <version>${ant.version}</version>
      <scope>provided</scope>
    </dependency>
    <!-- Not needed at runtime -->
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>3.0.2</version>
      <scope>provided</scope>
    </dependency>
    <!-- Unit tests -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>2.24.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>3.12.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <finalName>${project.artifactId}</finalName>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
            <createDependencyReducedPom>false</createDependencyReducedPom>
              <filters>
                <filter>
                  <artifact>com.google.code.findbugs:jsr305</artifact>
                  <includes>
                    <include>javax/annotation/ParametersAreNonnullByDefault.class</include>
                  </includes>
                </filter>
                <!-- Remove signatures from SQ Runner API -->
                <filter>
                  <artifact>org.sonarsource.sonar-runner:sonar-runner-api</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  
</project>