diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-09-06 17:47:59 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-09-13 15:50:55 +0200 |
commit | a444ad1e6bef78386f960acadb0fee7e0b4d8224 (patch) | |
tree | a1711c1c6ec701781882571e9f791c1e37876eeb /sonar-application | |
parent | 7e778849d1c669cd87c90de21cb3d1ea6494e759 (diff) | |
download | sonarqube-a444ad1e6bef78386f960acadb0fee7e0b4d8224.tar.gz sonarqube-a444ad1e6bef78386f960acadb0fee7e0b4d8224.zip |
SONAR-9587 use classpath rather than fat jar for sonar-application
Diffstat (limited to 'sonar-application')
-rw-r--r-- | sonar-application/assembly-common.xml | 19 | ||||
-rw-r--r-- | sonar-application/assembly.xml | 13 | ||||
-rw-r--r-- | sonar-application/pom.xml | 48 | ||||
-rw-r--r-- | sonar-application/src/main/assembly/conf/wrapper.conf | 3 |
4 files changed, 43 insertions, 40 deletions
diff --git a/sonar-application/assembly-common.xml b/sonar-application/assembly-common.xml new file mode 100644 index 00000000000..8d85b77149b --- /dev/null +++ b/sonar-application/assembly-common.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<assembly> + <id>common-lib-dir</id> + <formats> + <format>dir</format> + </formats> + <baseDirectory>/</baseDirectory> + <dependencySets> + + <dependencySet> + <outputDirectory>/</outputDirectory> + <useTransitiveFiltering>true</useTransitiveFiltering> + <useProjectArtifact>false</useProjectArtifact> + <scope>runtime</scope> + </dependencySet> + + </dependencySets> + +</assembly> diff --git a/sonar-application/assembly.xml b/sonar-application/assembly.xml index 5d5e0b47947..16e91b4d690 100644 --- a/sonar-application/assembly.xml +++ b/sonar-application/assembly.xml @@ -28,14 +28,6 @@ <scope>provided</scope> </dependencySet> - - <dependencySet> - <outputDirectory>lib/common</outputDirectory> - <useTransitiveFiltering>true</useTransitiveFiltering> - <useProjectArtifact>false</useProjectArtifact> - <scope>runtime</scope> - </dependencySet> - <dependencySet> <outputDirectory>lib/server</outputDirectory> <useProjectArtifact>false</useProjectArtifact> @@ -122,6 +114,11 @@ </dependencySets> <fileSets> + <!-- common directory --> + <fileSet> + <directory>target/common</directory> + <outputDirectory>lib/common</outputDirectory> + </fileSet> <!-- wrapper binaries --> <fileSet> <directory>src/main/assembly</directory> diff --git a/sonar-application/pom.xml b/sonar-application/pom.xml index c50e6d785d1..709e73367ad 100644 --- a/sonar-application/pom.xml +++ b/sonar-application/pom.xml @@ -1,5 +1,7 @@ <?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"> +<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> @@ -180,7 +182,8 @@ <archive> <index>true</index> <manifest> - <addClasspath>false</addClasspath> + <addClasspath>true</addClasspath> + <classpathPrefix>common</classpathPrefix> <mainClass>org.sonar.application.App</mainClass> </manifest> <manifestEntries> @@ -191,41 +194,24 @@ </configuration> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> + <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> - <phase>package</phase> + <id>assemble-common-lib-dir</id> + <phase>prepare-package</phase> <goals> - <goal>shade</goal> + <goal>single</goal> </goals> <configuration> - <keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope> - <artifactSet> - <!--excluding some transitive dependencies which are not necessary to the main process to create--> - <!--a smaller jar and use less memory--> - <excludes> - <exclude>org.apache.lucene:lucene-analyzers-common</exclude> - <exclude>org.apache.lucene:lucene-backward-codecs</exclude> - <exclude>org.apache.lucene:lucene-grouping</exclude> - <exclude>org.apache.lucene:lucene-memory</exclude> - <exclude>org.apache.lucene:lucene-misc</exclude> - <exclude>org.apache.lucene:lucene-spatial-extras</exclude> - <exclude>org.apache.lucene:lucene-spatial3d</exclude> - <exclude>org.elasticsearch.plugin:reindex-client</exclude> - <exclude>org.elasticsearch.plugin:lang-mustache-client</exclude> - <exclude>org.elasticsearch.plugin:percolator-client</exclude> - <exclude>org.elasticsearch.plugin:transport-netty3-client</exclude> - </excludes> - </artifactSet> + <appendAssemblyId>false</appendAssemblyId> + <finalName>common</finalName> + <descriptors> + <descriptor>assembly-common.xml</descriptor> + </descriptors> </configuration> </execution> - </executions> - </plugin> - <plugin> - <artifactId>maven-assembly-plugin</artifactId> - <executions> <execution> + <id>assemble-distribution-zip</id> <phase>package</phase> <goals> <goal>single</goal> @@ -254,8 +240,8 @@ <configuration> <rules> <requireFilesSize> - <minsize>200000000</minsize> - <maxsize>215000000</maxsize> + <minsize>165000000</minsize> + <maxsize>180000000</maxsize> <files> <file>${project.build.directory}/sonarqube-${project.version}.zip</file> </files> diff --git a/sonar-application/src/main/assembly/conf/wrapper.conf b/sonar-application/src/main/assembly/conf/wrapper.conf index 8fb972ab0b1..6b7e2eff1c7 100644 --- a/sonar-application/src/main/assembly/conf/wrapper.conf +++ b/sonar-application/src/main/assembly/conf/wrapper.conf @@ -16,7 +16,8 @@ wrapper.java.additional.1=-Dsonar.wrapped=true wrapper.java.additional.2=-Djava.awt.headless=true wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp wrapper.java.classpath.1=../../lib/jsw/*.jar -wrapper.java.classpath.2=../../lib/*.jar +wrapper.java.classpath.2=../../lib/common/*.jar +wrapper.java.classpath.3=../../lib/*.jar wrapper.java.library.path.1=./lib wrapper.app.parameter.1=org.sonar.application.App wrapper.java.initmemory=8 |