cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [cloudstack] branch CLOUDSTACK-10012 updated: pkg size improvements and fixes
Date Tue, 17 Oct 2017 07:45:29 GMT
This is an automated email from the ASF dual-hosted git repository.

bhaisaab pushed a commit to branch CLOUDSTACK-10012
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/CLOUDSTACK-10012 by this push:
     new ae8f00e  pkg size improvements and fixes
ae8f00e is described below

commit ae8f00e60823fc574db24b03f7307c9a376c3eca
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
AuthorDate: Tue Oct 17 13:14:38 2017 +0530

    pkg size improvements and fixes
    
    Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
---
 client/pom.xml                                  | 49 +++++++++++++++++--------
 debian/rules                                    |  1 +
 packaging/centos63/cloud.spec                   |  3 +-
 packaging/centos7/cloud.spec                    |  5 ++-
 packaging/debian/init/cloud-management          |  3 +-
 packaging/systemd/cloudstack-management.default |  2 +-
 pom.xml                                         | 25 ++-----------
 7 files changed, 46 insertions(+), 42 deletions(-)

diff --git a/client/pom.xml b/client/pom.xml
index 1b9a422..1dd7852 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -38,11 +38,11 @@
     </dependency>
     <dependency>
       <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-servlet</artifactId>
+      <artifactId>jetty-webapp</artifactId>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-servlets</artifactId>
+      <artifactId>jetty-annotations</artifactId>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jetty</groupId>
@@ -53,18 +53,6 @@
       <artifactId>jetty-util</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-webapp</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-annotations</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-security</artifactId>
-    </dependency>
-    <dependency>
       <groupId>com.fasterxml.jackson.dataformat</groupId>
       <artifactId>jackson-dataformat-yaml</artifactId>
       <version>${cs.jackson.version}</version>
@@ -526,13 +514,23 @@
         <groupId>org.eclipse.jetty</groupId>
         <artifactId>jetty-maven-plugin</artifactId>
         <version>${cs.jetty.version}</version>
-         <dependencies>
+        <dependencies>
           <!-- specify the dependent jdbc driver here -->
           <dependency>
             <groupId>mysql</groupId>
             <artifactId>mysql-connector-java</artifactId>
             <version>${cs.mysql.version}</version>
           </dependency>
+          <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcprov-jdk15on</artifactId>
+            <version>${cs.bcprov.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcpkix-jdk15on</artifactId>
+            <version>${cs.bcprov.version}</version>
+          </dependency>
         </dependencies>
         <configuration>
           <scanIntervalSeconds>0</scanIntervalSeconds>
@@ -694,6 +692,18 @@
                   <overWrite>false</overWrite>
                   <outputDirectory>${project.build.directory}/pythonlibs</outputDirectory>
                 </artifactItem>
+                <artifactItem>
+                  <groupId>org.bouncycastle</groupId>
+                  <artifactId>bcprov-jdk15on</artifactId>
+                  <overWrite>false</overWrite>
+                  <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.bouncycastle</groupId>
+                  <artifactId>bcpkix-jdk15on</artifactId>
+                  <overWrite>false</overWrite>
+                  <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                </artifactItem>
               </artifactItems>
             </configuration>
           </execution>
@@ -729,9 +739,17 @@
                 </includes>
                 <excludes>
                   <exclude>junit:junit</exclude>
+                  <exclude>com.tngtech.java:junit-dataprovider</exclude>
+                  <exclude>org.mockito:mockito-all</exclude>
+                  <exclude>org.hamcrest:hamcrest-all</exclude>
+                  <exclude>org.powermock:powermock-module-junit4</exclude>
+                  <exclude>org.powermock:powermock-api-mockito</exclude>
+                  <exclude>org.springframework:spring-test</exclude>
                   <exclude>org.apache.tomcat.embed:tomcat-embed-core</exclude>
                   <exclude>org.apache.geronimo.specs:geronimo-servlet_3.0_spec</exclude>
                   <exclude>org.apache.geronimo.specs:geronimo-javamail_1.4_spec</exclude>
+                  <exclude>org.bouncycastle:bcprov-jdk15on</exclude>
+                  <exclude>org.bouncycastle:bcpkix-jdk15on</exclude>
                   <exclude>mysql:mysql-connector-java</exclude>
                 </excludes>
               </artifactSet>
@@ -758,6 +776,7 @@
                     <exclude>META-INF/*.DSA</exclude>
                     <exclude>META-INF/*.RSA</exclude>
                     <exclude>META-INF/MANIFEST.MF</exclude>
+                    <exclude>META-INF/maven/**</exclude>
                   </excludes>
                 </filter>
               </filters>
diff --git a/debian/rules b/debian/rules
index 5c21639..87f96b8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -78,6 +78,7 @@ override_dh_auto_install:
 	cp server/target/conf/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/server/
 	cp client/target/conf/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/
 	cp client/target/cloud-client-ui-$(VERSION).jar $(DESTDIR)/usr/share/$(PACKAGE)-management/lib/cloudstack.jar
+	cp client/target/lib/*jar $(DESTDIR)/usr/share/$(PACKAGE)-management/lib/
 
 	# To make jetty happy from the 1st line of log
 	ln -s log4j-cloud.xml $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/log4j.xml
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index f4a14cf..c4e8c60 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -286,6 +286,7 @@ install -D client/target/utilities/bin/cloud-update-xenserver-licenses
${RPM_BUI
 cp -r client/target/utilities/scripts/db/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/setup
 cp -r client/target/classes/META-INF/webapp ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapp
 cp client/target/cloud-client-ui-%{_maventag}.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/lib/cloudstack.jar
+cp client/target/lib/*jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/lib/
 
 # Don't package the scripts in the management webapp
 rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/scripts
@@ -541,7 +542,7 @@ pip install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
 %attr(0755,root,root) %{_bindir}/%{name}-set-guest-sshkey
 %attr(0755,root,root) %{_bindir}/%{name}-sysvmadm
 %attr(0755,root,root) %{_bindir}/%{name}-setup-encryption
-%{_datadir}/%{name}-management/cloud-management-server.jar
+%{_datadir}/%{name}-management/lib/*jar
 %{_datadir}/%{name}-management/setup/*.sql
 %{_datadir}/%{name}-management/setup/db/*.sql
 %{_datadir}/%{name}-management/setup/*.sh
diff --git a/packaging/centos7/cloud.spec b/packaging/centos7/cloud.spec
index 5f0e8e6..350c178 100644
--- a/packaging/centos7/cloud.spec
+++ b/packaging/centos7/cloud.spec
@@ -256,7 +256,8 @@ cp -r client/target/utilities/scripts/db/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-
 
 cp -r client/target/cloud-client-ui-%{_maventag}.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/
 cp -r client/target/classes/META-INF/webapp ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapp
-mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/cloud-client-ui-%{_maventag}.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/lib/cloudstack.jar
+cp client/target/cloud-client-ui-%{_maventag}.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/lib/cloudstack.jar
+cp client/target/lib/*jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/lib/
 
 # Don't package the scripts in the management webapp
 rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/scripts
@@ -491,7 +492,7 @@ pip install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
 %attr(0755,root,root) %{_bindir}/%{name}-set-guest-sshkey
 %attr(0755,root,root) %{_bindir}/%{name}-sysvmadm
 %attr(0755,root,root) %{_bindir}/%{name}-setup-encryption
-%{_datadir}/%{name}-management/cloud-management-server.jar
+%{_datadir}/%{name}-management/lib/*jar
 %{_datadir}/%{name}-management/setup/*.sql
 %{_datadir}/%{name}-management/setup/db/*.sql
 %{_datadir}/%{name}-management/setup/*.sh
diff --git a/packaging/debian/init/cloud-management b/packaging/debian/init/cloud-management
index 439cffb..fe275dd 100755
--- a/packaging/debian/init/cloud-management
+++ b/packaging/debian/init/cloud-management
@@ -39,6 +39,7 @@ USER="cloud"
 GROUP="cloud"
 CLOUDSTACK_PID="/var/run/$NAME.pid"
 JARS=$(ls /usr/share/cloudstack-management/lib/*.jar | tr '\n' ':' | sed s'/.$//')
+CLASSPATH="$JARS:/etc/cloudstack/management:/usr/share/cloudstack-common:/usr/share/cloudstack-management/setup:/usr/share/cloudstack-management:/usr/share/cloudstack-management/lib/cloudstack.jar:/usr/share/java/mysql-connector-java.jar:$CLASSPATH"
 
 # We have to explicitly set the HOME variable to the homedir from the user "cloud"
 # This is because various scripts run by the management server read the HOME variable
@@ -99,7 +100,7 @@ case "$1" in
 		umask 000
 		start-stop-daemon --start --quiet --pidfile "$CLOUDSTACK_PID" \
 		--user $USER --group $GROUP --exec $DAEMON -- -user "$USER" -server \
-		-home "$JAVA_HOME" -cp "$JARS:$CLASSPATH" \
+		-home "$JAVA_HOME" -cp "$CLASSPATH" \
 		-outfile SYSLOG -errfile $LOGDIR/$NAME.err \
 		-pidfile "$CLOUDSTACK_PID" $JAVA_OPTS "$BOOTSTRAP_CLASS"
 		log_end_msg $?
diff --git a/packaging/systemd/cloudstack-management.default b/packaging/systemd/cloudstack-management.default
index 13487df..baa20aa 100644
--- a/packaging/systemd/cloudstack-management.default
+++ b/packaging/systemd/cloudstack-management.default
@@ -45,6 +45,6 @@ CLOUDSTACK_PID="/var/run/cloudstack-management.pid"
 
 LOGDIR="/var/log/cloudstack/management"
 
-CLASSPATH="/etc/cloudstack/management:/usr/share/cloudstack-common:/usr/share/cloudstack-management/setup:/usr/share/cloudstack-management:/usr/share/cloudstack-management/lib/cloudstack.jar:/usr/share/java/mysql-connector-java.jar"
+CLASSPATH="/etc/cloudstack/management:/usr/share/cloudstack-common:/usr/share/cloudstack-management/setup:/usr/share/cloudstack-management:/usr/share/java/mysql-connector-java.jar"
 
 BOOTSTRAP_CLASS=org.apache.cloudstack.ServerDaemon
diff --git a/pom.xml b/pom.xml
index 01158e2..db57457 100644
--- a/pom.xml
+++ b/pom.xml
@@ -490,42 +490,22 @@
       </dependency>
       <dependency>
         <groupId>org.eclipse.jetty</groupId>
-        <artifactId>jetty-servlet</artifactId>
-        <version>${cs.jetty.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.eclipse.jetty</groupId>
-        <artifactId>jetty-servlets</artifactId>
-        <version>${cs.jetty.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.eclipse.jetty</groupId>
         <artifactId>jetty-webapp</artifactId>
         <version>${cs.jetty.version}</version>
       </dependency>
       <dependency>
         <groupId>org.eclipse.jetty</groupId>
-        <artifactId>jetty-jmx</artifactId>
-        <version>${cs.jetty.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.eclipse.jetty</groupId>
-        <artifactId>jetty-util</artifactId>
-        <version>${cs.jetty.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.eclipse.jetty</groupId>
         <artifactId>jetty-annotations</artifactId>
         <version>${cs.jetty.version}</version>
       </dependency>
       <dependency>
         <groupId>org.eclipse.jetty</groupId>
-        <artifactId>jetty-io</artifactId>
+        <artifactId>jetty-jmx</artifactId>
         <version>${cs.jetty.version}</version>
       </dependency>
       <dependency>
         <groupId>org.eclipse.jetty</groupId>
-        <artifactId>jetty-security</artifactId>
+        <artifactId>jetty-util</artifactId>
         <version>${cs.jetty.version}</version>
       </dependency>
     </dependencies>
@@ -1009,6 +989,7 @@
           <version>2.5</version>
           <configuration>
             <archive>
+              <addMavenDescriptor>false</addMavenDescriptor>
               <manifest>
                 <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                 <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>

-- 
To stop receiving notification emails like this one, please contact
['"commits@cloudstack.apache.org" <commits@cloudstack.apache.org>'].

Mime
View raw message