Browse Source

SONAR-6370 Package deprecated API dependencies in a single JAR.

This JAR file contains Guava, GSON and commons-*. It will be declared
in the classloaders of "old" plugins that do not embed their own
versions of these libraries.
tags/5.2-RC1
Simon Brandhof 9 years ago
parent
commit
48dc03e1ff
3 changed files with 98 additions and 0 deletions
  1. 1
    0
      pom.xml
  2. 64
    0
      sonar-api-deps/pom.xml
  3. 33
    0
      sonar-core/pom.xml

+ 1
- 0
pom.xml View File

@@ -11,6 +11,7 @@
<description>Open source platform for continuous inspection of code quality</description>

<modules>
<module>sonar-api-deps</module>
<module>sonar-application</module>
<module>sonar-batch</module>
<module>sonar-batch-maven-compat</module>

+ 64
- 0
sonar-api-deps/pom.xml View File

@@ -0,0 +1,64 @@
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar</artifactId>
<version>5.2-SNAPSHOT</version>
</parent>

<artifactId>sonar-api-deps</artifactId>
<packaging>jar</packaging>

<name>SonarQube :: Plugin API Dependencies</name>
<description>Deprecated transitive dependencies of sonar-plugin-api</description>
<dependencies>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>false</minimizeJar>
<createDependencyReducedPom>true</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

+ 33
- 0
sonar-core/pom.xml View File

@@ -113,6 +113,14 @@
<artifactId>log4j-over-slf4j</artifactId>
</dependency>

<dependency>
<!-- sonar-api-deps.jar is copied into target JAR file -->
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-api-deps</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>


<!-- tests -->
<dependency>
@@ -185,6 +193,31 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-deprecated-api-deps</id>
<phase>process-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>sonar-api-deps</artifactId>
<destFileName>sonar-api-deps.jar</destFileName>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>

Loading…
Cancel
Save