diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-05-26 09:43:25 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-05-28 09:28:59 +0200 |
commit | 48dc03e1ff340af6ecb9f3bea6c5310f90af8df8 (patch) | |
tree | 02b07efd690560729c019709b3d06b505b00949c | |
parent | 419bb7fc18e6e8f427f54792fd63f10754d683ce (diff) | |
download | sonarqube-48dc03e1ff340af6ecb9f3bea6c5310f90af8df8.tar.gz sonarqube-48dc03e1ff340af6ecb9f3bea6c5310f90af8df8.zip |
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.
-rw-r--r-- | pom.xml | 1 | ||||
-rw-r--r-- | sonar-api-deps/pom.xml | 64 | ||||
-rw-r--r-- | sonar-core/pom.xml | 33 |
3 files changed, 98 insertions, 0 deletions
@@ -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> diff --git a/sonar-api-deps/pom.xml b/sonar-api-deps/pom.xml new file mode 100644 index 00000000000..5c2290160a6 --- /dev/null +++ b/sonar-api-deps/pom.xml @@ -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> diff --git a/sonar-core/pom.xml b/sonar-core/pom.xml index 00599ab710c..91eb277c578 100644 --- a/sonar-core/pom.xml +++ b/sonar-core/pom.xml @@ -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> @@ -187,6 +195,31 @@ </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> <executions> <execution> |