From 7287de7b4b608170ed6f30b4fe1527ca0af95cbe Mon Sep 17 00:00:00 2001 From: Stephane Gamard Date: Wed, 23 Jul 2014 16:29:16 +0200 Subject: SONAR-4898 - Shaded sonar-application. Now app can run with "java -jar lib/sonar*.jar --- sonar-application/assembly.xml | 19 ++++-- sonar-application/pom.xml | 77 +++++++++++++++------- .../src/main/assembly/lib/jsw/wrapper.conf | 5 +- 3 files changed, 70 insertions(+), 31 deletions(-) diff --git a/sonar-application/assembly.xml b/sonar-application/assembly.xml index e0166150ec8..2304815d061 100644 --- a/sonar-application/assembly.xml +++ b/sonar-application/assembly.xml @@ -25,6 +25,7 @@ tanukisoft:wrapper + provided @@ -37,13 +38,15 @@ org.postgresql:postgresql net.sourceforge.jtds:jtds tanukisoft:wrapper + tanukisoft:wrapper org.codehaus.sonar:sonar-server-app org.codehaus.sonar:sonar-web org.codehaus.sonar:sonar-search org.codehaus.sonar.plugins:* org.codehaus.sonar-plugins.java:* - org.codehaus.sonar:sonar-batch-maven-compat + org.sonatype.jsw-binaries:jsw-binaries + runtime @@ -55,7 +58,7 @@ org.codehaus.sonar:sonar-search - runtime + provided @@ -65,7 +68,7 @@ org.codehaus.sonar:sonar-server-app - runtime + provided @@ -76,6 +79,7 @@ org.codehaus.sonar:sonar-batch-maven-compat + provided @@ -84,6 +88,7 @@ org.codehaus.sonar.plugins:* + provided lib/bundled-plugins @@ -91,6 +96,7 @@ org.codehaus.sonar-plugins.*:sonar-*-plugin + provided @@ -99,6 +105,7 @@ org.codehaus.sonar:sonar-web true + provided @@ -107,7 +114,7 @@ mysql:mysql-connector-java false - runtime + provided extensions/jdbc-driver/postgresql/ @@ -115,7 +122,7 @@ org.postgresql:postgresql false - runtime + provided extensions/jdbc-driver/mssql/ @@ -123,7 +130,7 @@ net.sourceforge.jtds:jtds false - runtime + provided diff --git a/sonar-application/pom.xml b/sonar-application/pom.xml index 14d129a9dfc..7bdaba42b25 100644 --- a/sonar-application/pom.xml +++ b/sonar-application/pom.xml @@ -22,6 +22,7 @@ sonar-process ${project.version} + com.google.code.findbugs jsr305 @@ -32,42 +33,42 @@ org.codehaus.sonar sonar-server-app ${project.version} - runtime + provided org.codehaus.sonar sonar-search ${project.version} - runtime + provided org.codehaus.sonar sonar-batch-maven-compat ${project.version} - runtime + provided org.codehaus.sonar sonar-web ${project.version} war - runtime + provided mysql mysql-connector-java - runtime + provided org.postgresql postgresql - runtime + provided net.sourceforge.jtds jtds - runtime + provided @@ -76,76 +77,76 @@ sonar-core-plugin ${project.version} sonar-plugin - runtime + provided org.codehaus.sonar.plugins sonar-design-plugin ${project.version} sonar-plugin - runtime + provided org.codehaus.sonar-plugins.java sonar-findbugs-plugin sonar-plugin - runtime + provided org.codehaus.sonar.plugins sonar-dbcleaner-plugin ${project.version} sonar-plugin - runtime + provided org.codehaus.sonar-plugins.java sonar-squid-java-plugin sonar-plugin - runtime + provided org.codehaus.sonar-plugins.java sonar-surefire-plugin sonar-plugin - runtime + provided org.codehaus.sonar.plugins sonar-cpd-plugin ${project.version} sonar-plugin - runtime + provided org.codehaus.sonar.plugins sonar-l10n-en-plugin ${project.version} sonar-plugin - runtime + provided org.codehaus.sonar.plugins sonar-email-notifications-plugin ${project.version} sonar-plugin - runtime + provided org.codehaus.sonar-plugins.java sonar-jacoco-plugin sonar-plugin - runtime + provided org.codehaus.sonar-plugins.java sonar-java-plugin sonar-plugin - runtime + provided - org.sonatype.jsw-binaries - jsw-binaries + org.sonatype.jsw-binaries + jsw-binaries 3.2.3.6 tar.gz provided @@ -155,7 +156,7 @@ tanukisoft wrapper 3.2.3 - runtime + provided @@ -188,6 +189,39 @@ + + org.apache.maven.plugins + maven-jar-plugin + 2.5 + + + true + + false + org.sonar.application.StartServer + + + distribution + ${project.url} + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + package + + shade + + + false + + + + maven-assembly-plugin @@ -250,7 +284,6 @@ - release diff --git a/sonar-application/src/main/assembly/lib/jsw/wrapper.conf b/sonar-application/src/main/assembly/lib/jsw/wrapper.conf index 922f9afec75..c4bb513a8a3 100644 --- a/sonar-application/src/main/assembly/lib/jsw/wrapper.conf +++ b/sonar-application/src/main/assembly/lib/jsw/wrapper.conf @@ -20,9 +20,8 @@ wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp # Java Classpath (include wrapper.jar) Add class path elements as # needed starting from 1 -wrapper.java.classpath.1=../../lib/common/*.jar -wrapper.java.classpath.2=../../lib/jsw/*.jar -wrapper.java.classpath.3=../../lib/*.jar +wrapper.java.classpath.1=../../lib/jsw/*.jar +wrapper.java.classpath.2=../../lib/*.jar # Java Library Path (location of Wrapper.DLL or libwrapper.so) wrapper.java.library.path.1=./lib -- cgit v1.2.3