incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject [2/2] git commit: fix rpmbuild
Date Wed, 05 Sep 2012 05:34:32 GMT
fix rpmbuild


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/aa1c8073
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/aa1c8073
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/aa1c8073

Branch: refs/heads/4.0
Commit: aa1c8073abf07ef3dc758dbed7b8058698d6dd6f
Parents: 0c617c2
Author: Edison Su <sudison@gmail.com>
Authored: Tue Sep 4 21:34:52 2012 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Tue Sep 4 22:34:05 2012 -0700

----------------------------------------------------------------------
 awsapi/pom.xml |   55 --------------
 cloud.spec     |  194 ++++++++++++---------------------------------------
 wscript        |   28 +-------
 wscript_build  |   60 ++++++----------
 4 files changed, 70 insertions(+), 267 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/aa1c8073/awsapi/pom.xml
----------------------------------------------------------------------
diff --git a/awsapi/pom.xml b/awsapi/pom.xml
index 2909376..cf91033 100644
--- a/awsapi/pom.xml
+++ b/awsapi/pom.xml
@@ -22,7 +22,6 @@
   <artifactId>cloud-awsapi</artifactId>
   <version>4.0.0-SNAPSHOT</version>
   <name>Apache CloudStack AWS API Bridge</name>
-  <packaging>war</packaging>
   <parent>
     <groupId>org.apache.cloudstack</groupId>
     <artifactId>cloudstack</artifactId>
@@ -107,60 +106,6 @@
         </excludes>
       </resource>
     </resources>
-    <plugins>
-<plugin>
-  <groupId>org.apache.maven.plugins</groupId>
-  <artifactId>maven-dependency-plugin</artifactId>
-  <executions>
-    <execution>
-      <id>unpack-my-lib</id>
-      <phase>process-resources</phase>
-      <goals>
-        <goal>unpack</goal>
-      </goals>
-      <configuration>
-        <artifactItems>
-          <artifactItem>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-webapp</artifactId>
-            <version>${cs.axis2.version}</version>
-            <type>war</type>
-            <overWrite>false</overWrite>
-          </artifactItem>
-        </artifactItems>
-        <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}</outputDirectory>
-        <overWriteReleases>false</overWriteReleases>
-      </configuration>
-    </execution>
-  </executions>
-</plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-war-plugin</artifactId>
-        <version>2.2</version>
-        <configuration>
-          <webXml>web/web.xml</webXml>
-          <excludes>**/client/*.class</excludes>
-          <webResources>
-            <resource>
-              <directory>conf</directory>
-            </resource>
-            <resource>
-              <directory>resource/Axis2</directory>
-              <targetPath>WEB-INF/conf</targetPath>
-            </resource>
-            <resource>
-              <directory>resource/AmazonEC2</directory>
-              <targetPath>WEB-INF/classes</targetPath>
-              <includes>
-                <include>crypto.properties</include>
-                <include>xes.keystore</include>
-              </includes>
-            </resource>
-          </webResources>
-        </configuration>
-      </plugin>
-    </plugins>
     <!--
         <testSourceDirectory>test</testSourceDirectory>
         <plugins>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/aa1c8073/cloud.spec
----------------------------------------------------------------------
diff --git a/cloud.spec b/cloud.spec
index d0bf0c6..d6e2151 100644
--- a/cloud.spec
+++ b/cloud.spec
@@ -18,13 +18,6 @@
 %define __os_install_post %{nil}
 %global debug_package %{nil}
 
-%if "%{?_nonoss}" != ""
-%define _wafargs %{nil}
-%else
-%define _wafargs "--oss"
-%endif
-
-
 # DISABLE the post-percentinstall java repacking and line number stripping
 # we need to find a way to just disable the java repacking and line number stripping, but
not the autodeps
 
@@ -34,10 +27,8 @@ Version:   %{_ver}
 #http://fedoraproject.org/wiki/PackageNamingGuidelines#Pre-Release_packages
 %if "%{?_prerelease}" != ""
 Release:   0.%{_build_number}%{dist}.%{_prerelease}
-%define _maven_ver %{_ver}-SNAPSHOT
 %else
 Release:   %{_rel}%{dist}
-%define _maven_ver %{_ver}
 %endif
 License:   Apache License 2.0
 Vendor:    CloudStack <engineering@cloud.com>
@@ -90,18 +81,6 @@ Group:     System Environment/Libraries
 %description server
 The CloudStack server libraries provide a set of Java classes for CloudStack.
 
-%if "%{?_nonoss}" != ""
-%package server-nonoss
-Summary:   CloudStack server library with non-oss dependencies
-Requires: java >= 1.6.0
-Obsoletes: vmops-server < %{version}-%{release}
-Requires: %{name}-utils = %{version}, %{name}-core = %{version}, %{name}-deps = %{version},
%{name}-server = %{version}, tomcat6-servlet-2.5-api
-Group:     System Environment/Libraries
-%description server-nonoss
-The CloudStack server libraries provide a set of Java classes for CloudStack. This package
contain the classes ther require
-external non-oss libraries.
-%endif
-
 %package agent-scripts
 Summary:   CloudStack agent scripts
 # FIXME nuke the archdependency
@@ -322,94 +301,17 @@ echo Doing CloudStack build
 # this fixes the /usr/com bug on centos5
 %define _localstatedir /var
 %define _sharedstatedir /var/lib
-./waf configure --prefix=%{_prefix} --libdir=%{_libdir} --bindir=%{_bindir} --javadir=%{_javadir}
--sharedstatedir=%{_sharedstatedir} --localstatedir=%{_localstatedir} --sysconfdir=%{_sysconfdir}
--mandir=%{_mandir} --docdir=%{_docdir}/%{name}-%{version} --with-tomcat=%{_datadir}/tomcat6
--tomcat-user=%{name} --fast --build-number=%{_ver}-%{release} --package-version=%{_ver} %{_wafargs}
-./waf build --build-number=%{?_build_number} --package-version=%{_ver} %{_wafargs}
+./waf configure --prefix=%{_prefix} --libdir=%{_libdir} --bindir=%{_bindir} --javadir=%{_javadir}
--sharedstatedir=%{_sharedstatedir} --localstatedir=%{_localstatedir} --sysconfdir=%{_sysconfdir}
--mandir=%{_mandir} --docdir=%{_docdir}/%{name}-%{version} --with-tomcat=%{_datadir}/tomcat6
--tomcat-user=%{name} --fast --build-number=%{_ver}-%{release} --package-version=%{_ver}
+./waf build --build-number=%{?_build_number} --package-version=%{_ver}
 
 %install
 [ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
 # we put the build number again here, otherwise state checking will cause an almost-full
recompile
-./waf install --destdir=$RPM_BUILD_ROOT --nochown --build-number=%{?_build_number} %{_wafargs}
+./waf install --destdir=$RPM_BUILD_ROOT --nochown --build-number=%{?_build_number}
 rm $RPM_BUILD_ROOT/etc/rc.d/init.d/cloud-console-proxy
 rm $RPM_BUILD_ROOT/usr/bin/cloud-setup-console-proxy
 rm $RPM_BUILD_ROOT/usr/libexec/console-proxy-runner
-#
-# Remove a lot of deps that maven pulled in, dirty fix
-#
-rm $RPM_BUILD_ROOT/usr/share/java/XmlSchema-1.4.2.jar
-rm $RPM_BUILD_ROOT/usr/share/java/activation-1.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/annogen-0.1.0.jar
-rm $RPM_BUILD_ROOT/usr/share/java/ant-1.7.0.jar
-rm $RPM_BUILD_ROOT/usr/share/java/ant-launcher-1.7.0.jar
-rm $RPM_BUILD_ROOT/usr/share/java/antlr-2.7.6.jar
-rm $RPM_BUILD_ROOT/usr/share/java/asm-3.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/axiom-api-1.2.8.jar
-rm $RPM_BUILD_ROOT/usr/share/java/axiom-dom-1.2.7.jar
-rm $RPM_BUILD_ROOT/usr/share/java/axiom-impl-1.2.7.jar
-rm $RPM_BUILD_ROOT/usr/share/java/axis-jaxrpc-1.4.jar
-rm $RPM_BUILD_ROOT/usr/share/java/axis2-1.5.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/axis2-adb-1.4.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/axis2-adb-codegen-1.4.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/axis2-ant-plugin-1.4.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/axis2-codegen-1.4.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/axis2-java2wsdl-1.4.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/axis2-kernel-1.4.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/cglib-nodep-2.2.2.jar
-rm $RPM_BUILD_ROOT/usr/share/java/cloud-agent-4.0.0-SNAPSHOT-tests.jar
-rm $RPM_BUILD_ROOT/usr/share/java/cloud-com.thoughtworks.selenium-1.0.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/cloud-console-proxy-4.0.0-SNAPSHOT.jar
-rm $RPM_BUILD_ROOT/usr/share/java/cloud-iControl.jar
-rm $RPM_BUILD_ROOT/usr/share/java/cloud-manageontap.jar
-rm $RPM_BUILD_ROOT/usr/share/java/cloud-netscaler-sdx.jar
-rm $RPM_BUILD_ROOT/usr/share/java/cloud-netscaler.jar
-rm $RPM_BUILD_ROOT/usr/share/java/cloud-patches-4.0.0-SNAPSHOT.jar
-rm $RPM_BUILD_ROOT/usr/share/java/cloud-utils-4.0.0-SNAPSHOT-tests.jar
-rm $RPM_BUILD_ROOT/usr/share/java/commons-collections-3.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/commons-collections-3.2.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/commons-fileupload-1.2.jar
-rm $RPM_BUILD_ROOT/usr/share/java/commons-io-1.4.jar
-rm $RPM_BUILD_ROOT/usr/share/java/commons-logging-1.0.4.jar
-rm $RPM_BUILD_ROOT/usr/share/java/commons-logging-1.1.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/dom4j-1.6.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/geronimo-activation_1.1_spec-1.0.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/geronimo-javamail_1.4_spec-1.2.jar
-rm $RPM_BUILD_ROOT/usr/share/java/geronimo-jms_1.1_spec-1.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/geronimo-stax-api_1.0_spec-1.0.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/hamcrest-core-1.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/hibernate-annotations-3.5.1-Final.jar
-rm $RPM_BUILD_ROOT/usr/share/java/hibernate-commons-annotations-3.2.0.Final.jar
-rm $RPM_BUILD_ROOT/usr/share/java/hibernate-core-3.5.1-Final.jar
-rm $RPM_BUILD_ROOT/usr/share/java/hibernate-entitymanager-3.5.1-Final.jar
-rm $RPM_BUILD_ROOT/usr/share/java/httpcore-nio-4.0-beta1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/icontrol-1.0.jar
-rm $RPM_BUILD_ROOT/usr/share/java/javassist-3.9.0.GA.jar
-rm $RPM_BUILD_ROOT/usr/share/java/jaxen-1.1.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/json-simple-1.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/jsr107cache-1.0.jar
-rm $RPM_BUILD_ROOT/usr/share/java/jta-1.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/manageontap-1.0.jar
-rm $RPM_BUILD_ROOT/usr/share/java/mysql-connector-java-5.1.21.jar
-rm $RPM_BUILD_ROOT/usr/share/java/neethi-2.0.4.jar
-rm $RPM_BUILD_ROOT/usr/share/java/netscaler-1.0.jar
-rm $RPM_BUILD_ROOT/usr/share/java/netscaler-sdx-1.0.jar
-rm $RPM_BUILD_ROOT/usr/share/java/selenium-server-1.0.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/servlet-api-2.3.jar
-rm $RPM_BUILD_ROOT/usr/share/java/servlet-api-2.5-20081211.jar
-rm $RPM_BUILD_ROOT/usr/share/java/slf4j-api-1.5.8.jar
-rm $RPM_BUILD_ROOT/usr/share/java/stax-api-1.0.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/woden-api-1.0M8.jar
-rm $RPM_BUILD_ROOT/usr/share/java/woden-impl-dom-1.0M8.jar
-rm $RPM_BUILD_ROOT/usr/share/java/ws-commons-util-1.0.2.jar
-rm $RPM_BUILD_ROOT/usr/share/java/wstx-asl-3.2.4.jar
-rm $RPM_BUILD_ROOT/usr/share/java/xalan-2.7.0.jar
-rm $RPM_BUILD_ROOT/usr/share/java/xercesImpl-2.6.2.jar
-rm $RPM_BUILD_ROOT/usr/share/java/xercesImpl-2.8.1.jar
-rm $RPM_BUILD_ROOT/usr/share/java/xml-apis-1.0.b2.jar
-rm $RPM_BUILD_ROOT/usr/share/java/xml-apis-1.3.04.jar
-rm $RPM_BUILD_ROOT/usr/share/java/xmlParserAPIs-2.6.0.jar
-rm $RPM_BUILD_ROOT/usr/share/java/xpp3_min-1.1.4c.jar
-rm $RPM_BUILD_ROOT/usr/share/java/xstream-1.3.1.jar
-# TODO: This is for awsapi, need to think about this
-#./tools/ant/apache-ant-1.7.1/bin/ant deploy-rpm-install -Drpm.install.dir=$RPM_BUILD_ROOT
+./tools/ant/apache-ant-1.7.1/bin/ant deploy-rpm-install -Drpm.install.dir=$RPM_BUILD_ROOT
 
 %clean
 
@@ -513,8 +415,8 @@ fi
 
 %files utils
 %defattr(0644,root,root,0755)
-%{_javadir}/%{name}-utils-%{_maven_ver}.jar
-%{_javadir}/%{name}-api-%{_maven_ver}.jar
+%{_javadir}/%{name}-utils.jar
+%{_javadir}/%{name}-api.jar
 %attr(0755,root,root) %{_bindir}/cloud-sccs
 %attr(0755,root,root) %{_bindir}/cloud-gitrevs
 %doc %{_docdir}/%{name}-%{version}/version-info
@@ -529,33 +431,27 @@ fi
 
 %files server
 %defattr(0644,root,root,0755)
-%{_javadir}/%{name}-server-%{_maven_ver}.jar
-%{_javadir}/%{name}-vmware-base-%{_maven_ver}.jar
-%{_javadir}/%{name}-plugin-hypervisor-ovm-%{_maven_ver}.jar
-%{_javadir}/%{name}-plugin-hypervisor-xen-%{_maven_ver}.jar
-%{_javadir}/%{name}-plugin-planner-user-concentrated-pod-%{_maven_ver}.jar
-%{_javadir}/%{name}-plugin-planner-user-dispersing-%{_maven_ver}.jar
-%{_javadir}/%{name}-plugin-host-allocator-random-%{_maven_ver}.jar
-%{_javadir}/%{name}-plugin-network-ovs-%{_maven_ver}.jar
-%{_javadir}/%{name}-plugin-network-nvp-%{_maven_ver}.jar
-%{_javadir}/%{name}-plugin-network-elb-%{_maven_ver}.jar
-%{_javadir}/%{name}-plugin-storage-allocator-random-%{_maven_ver}.jar
-%{_javadir}/%{name}-plugin-user-authenticator-ldap-%{_maven_ver}.jar
-%{_javadir}/%{name}-plugin-user-authenticator-md5-%{_maven_ver}.jar
-%{_javadir}/%{name}-plugin-user-authenticator-plaintext-%{_maven_ver}.jar
+%{_javadir}/%{name}-server.jar
+%{_javadir}/%{name}-vmware-base.jar
+%{_javadir}/%{name}-ovm.jar
+%{_javadir}/%{name}-dp-user-concentrated-pod.jar
+%{_javadir}/%{name}-dp-user-dispersing.jar
+%{_javadir}/%{name}-host-allocator-random.jar
+%{_javadir}/%{name}-plugin-f5.jar
+%{_javadir}/%{name}-plugin-netscaler.jar
+%{_javadir}/%{name}-plugin-ovs.jar
+%{_javadir}/%{name}-plugin-srx.jar
+%{_javadir}/%{name}-storage-allocator-random.jar
+%{_javadir}/%{name}-user-authenticator-ldap.jar
+%{_javadir}/%{name}-user-authenticator-md5.jar
+%{_javadir}/%{name}-user-authenticator-plaintext.jar
+%{_javadir}/%{name}-vmware.jar
+%{_javadir}/%{name}-xen.jar
+%{_javadir}/%{name}-plugin-nicira-nvp.jar
+%{_javadir}/%{name}-plugin-elb.jar
+%{_javadir}/%{name}-plugin-netapp.jar
 %config(noreplace) %{_sysconfdir}/%{name}/server/*
 
-%if "%{?_nonoss}" != ""
-%files server-nonoss
-%defattr(0644,root,root,0755)
-%{_javadir}/%{name}-plugin-hypervisor-kvm-4.0.0-SNAPSHOT.jar
-%{_javadir}/%{name}-plugin-hypervisor-vmware-4.0.0-SNAPSHOT.jar
-%{_javadir}/%{name}-plugin-netapp-4.0.0-SNAPSHOT.jar
-%{_javadir}/%{name}-plugin-network-f5-4.0.0-SNAPSHOT.jar
-%{_javadir}/%{name}-plugin-network-netscaler-4.0.0-SNAPSHOT.jar
-%{_javadir}/%{name}-plugin-network-srx-4.0.0-SNAPSHOT.jar
-%endif
-
 %files agent-scripts
 %defattr(-,root,root,-)
 %{_libdir}/%{name}/agent/scripts/*
@@ -569,44 +465,43 @@ fi
 %{_javadir}/commons-codec-1.6.jar
 %{_javadir}/commons-dbcp-1.4.jar
 %{_javadir}/commons-pool-1.6.jar
-%{_javadir}/commons-httpclient-3.1.jar
 %{_javadir}/gson-1.7.1.jar
-%{_javadir}/apache-log4j-extras-1.1.jar
+%{_javadir}/netscaler-1.0.jar
+%{_javadir}/netscaler-sdx-1.0.jar
 %{_javadir}/backport-util-concurrent-3.1.jar
 %{_javadir}/ehcache-1.5.0.jar
-%{_javadir}/mail-1.4.jar
 %{_javadir}/httpcore-4.0.jar
-%{_javadir}/libvirt-0.4.8.jar
-%{_javadir}/log4j-1.2.16.jar
+%{_javadir}/mail-1.4.jar
+%{_javadir}/activation-1.1.jar
+%{_javadir}/mysql-connector-java-5.1.21.jar
+%{_javadir}/hibernate-jpa-2.0-api-1.0.0.Final.jar
+%{_javadir}/hibernate-entitymanager-3.5.1-Final.jar
+%{_javadir}/hibernate-core-3.5.1-Final.jar
+%{_javadir}/hibernate-commons-annotations-3.2.0.Final.jar
+%{_javadir}/hibernate-annotations-3.5.1-Final.jar
+%{_javadir}/asm-3.1.jar
+%{_javadir}/xapi-5.6.100-1-20120825.123319-1.jar
+%{_javadir}/log4j-*.jar
 %{_javadir}/trilead-ssh2-build213-svnkit-1.3-patch.jar
 %{_javadir}/cglib-2.2.jar
-%{_javadir}/xapi-5.6.100-1-SNAPSHOT.jar
 %{_javadir}/xmlrpc-common-3.*.jar
 %{_javadir}/xmlrpc-client-3.*.jar
-%{_javadir}/jstl-1.2.jar
-%{_javadir}/jetty-6.1.26.jar
-%{_javadir}/jetty-util-6.1.26.jar
 %{_javadir}/axis-1.4.jar
-%{_javadir}/commons-discovery-0.5.jar
 %{_javadir}/wsdl4j-1.6.2.jar
 %{_javadir}/bcprov-jdk16-1.46.jar
 %{_javadir}/jsch-0.1.42.jar
+%{_javadir}/icontrol-1.0.jar
+%{_javadir}/manageontap-1.0.jar
 %{_javadir}/vmware*.jar
-%{_javadir}/junit-4.10.jar
-%{_javadir}/jasypt-1.9.0.jar
+%{_javadir}/jasypt-1.*.jar
 %{_javadir}/commons-configuration-1.8.jar
 %{_javadir}/commons-lang-2.6.jar
 %{_javadir}/ejb-api-3.0.jar
-%{_javadir}/hibernate-jpa-2.0-api-1.0.0.Final.jar
-#%{_javadir}/%{name}-netscaler.jar
-#%{_javadir}/%{name}-netscaler-sdx.jar
-#%{_javadir}/%{name}-iControl.jar
-#%{_javadir}/%{name}-manageontap.jar
 
 
 %files core
 %defattr(0644,root,root,0755)
-%{_javadir}/%{name}-core-%{_maven_ver}.jar
+%{_javadir}/%{name}-core.jar
 
 %files python
 %defattr(0644,root,root,0755)
@@ -653,7 +548,8 @@ fi
 
 %files agent-libs
 %defattr(0644,root,root,0755)
-%{_javadir}/%{name}-agent-%{_maven_ver}.jar
+%{_javadir}/%{name}-agent.jar
+%{_javadir}/%{name}-plugin-hypervisor-kvm.jar
 
 %files agent
 %defattr(0644,root,root,0755)
@@ -680,7 +576,7 @@ fi
 
 %files usage
 %defattr(0644,root,root,0775)
-%{_javadir}/%{name}-usage-%{_maven_ver}.jar
+%{_javadir}/%{name}-usage.jar
 %attr(0755,root,root) %{_initrddir}/%{name}-usage
 %dir %attr(0770,root,%{name}) %{_localstatedir}/log/%{name}/usage
 %config(noreplace) %{_sysconfdir}/%{name}/usage/usage-components.xml

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/aa1c8073/wscript
----------------------------------------------------------------------
diff --git a/wscript b/wscript
index ce73e99..561c770 100644
--- a/wscript
+++ b/wscript
@@ -307,26 +307,6 @@ def runant(tsk):
 	return ret
 Utils.runant = runant
 
-def runmvn(tsk):
-	environ = dict(os.environ)
-	environ["CATALINA_HOME"] = tsk.env.TOMCATHOME
-        if not "M2_HOME" in environ:
-                raise Utils.WafError("Maven not installed or M2_HOME not set")
-	if tsk.generator.env.DISTRO == "Windows":
-		stanzas = [
-			_join(environ["M2_HOME"],"bin","mvn.bat")
-		]
-	else:
-		stanzas = [
-			_join(environ["M2_HOME"],"bin","mvn")
-		]
-	stanzas += tsk.generator.mvnargs
-	ret = Utils.exec_command(" ".join(stanzas),cwd=tsk.generator.bld.srcnode.abspath(),env=environ,log=True)
-	if ret != 0: raise Utils.WafError("Maven phase %s failed with error value %s"%(stanzas,ret))
-	return ret
-Utils.runmvn = runmvn
-
-
 @throws_command_errors
 def run_java(classname,classpath,options=None,arguments=None):
 	if not options: options = []
@@ -642,10 +622,6 @@ def rpm(context):
 	else: ver = SHORTVERSION
 
 	packagever = ["--define", "_ver %s" % ver]
-
-        nonoss = [ ]
-        if not Options.options.OSS:
-                 nonoss = ["--define", "_nonoss 1"]
 	
 	# FIXME wrap the source tarball in POSIX locking!
 	if not Options.options.blddir: outputdir = _join(context.curdir,blddir,"rpmbuild")
@@ -660,8 +636,8 @@ def rpm(context):
 	shutil.move(tarball,_join(sourcedir,tarball))
 
 	specfile = "%s.spec"%APPNAME
-	checkdeps = lambda: c(["rpmbuild","--define","_topdir %s"%outputdir,"--nobuild",specfile]+packagever+releasever+nonoss)
-	dorpm = lambda: c(["rpmbuild","--define","_topdir %s"%outputdir,"-bb",specfile]+buildnumber+prerelease+packagever+releasever+nonoss)
+	checkdeps = lambda: c(["rpmbuild","--define","_topdir %s"%outputdir,"--nobuild",specfile]+packagever+releasever)
+	dorpm = lambda: c(["rpmbuild","--define","_topdir %s"%outputdir,"-bb",specfile]+buildnumber+prerelease+packagever+releasever)
 	try: checkdeps()
 	except (CalledProcessError,OSError),e:
 		Utils.pprint("YELLOW","Dependencies might be missing.  Trying to auto-install them...")

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/aa1c8073/wscript_build
----------------------------------------------------------------------
diff --git a/wscript_build b/wscript_build
index 77e37f9..c5a2595 100644
--- a/wscript_build
+++ b/wscript_build
@@ -105,41 +105,38 @@ def build_jars ():
 	Implementation_Version = bld.env.VERSION
 
 	# this is to trigger recompilation / cache avoidance if the relevant environment for ant
changes
-	mvn_args = [
-		"package",
+	ant_args = [
+		"build-all",
 		"-Dimpl.version=%s" % Implementation_Version,
 		"-Dtarget.dir=%s" % targetdir,
 		"-Ddist.dir=%s" % distdir,
-		"-Dbase.dir=%s" % sourcedir
+		"-Dbase.dir=%s" % sourcedir,
+		"-f %s" % Utils.relpath (_join(sourcedir, "build.xml")),
 	]
-   
-        if not Options.options.OSS:
-		mvn_args.append("-Dnonoss")
 
 	if buildpremium:
-		mvn_args.append("-Dbuild.premium=true")
+		ant_args.append("-Dbuild.premium=true")
 
 	tgen = bld(features='subst', name='version-info', source="version-info.in", target="version-info")
-	tgen.dict = { "Implementation_Version":Implementation_Version,"mvn_args":mvn_args }
+	tgen.dict = { "Implementation_Version":Implementation_Version,"ant_args":ant_args }
 	bld.install_files("${DOCDIR}","version-info")
 
 	bld.srcnode.ensure_dir_node_from_path("target/jar")
 	bld.srcnode.ensure_dir_node_from_path("dist")
 
-	tgen = bld.new_task_gen (rule = Utils.runmvn,
-							 name = "runmvn",
-							 mvnargs = mvn_args)
+	tgen = bld.new_task_gen (rule = Utils.runant,
+							 name = "runant",
+							 antargs = ant_args)
 
-	jarnode = bld.srcnode.find_dir ('.')
-	jars_str = jarnode.ant_glob ('**/target/*.jar').split ()
+	jarnode = bld.srcnode.find_dir ('target/jar')
+	jars_str = jarnode.ant_glob ('*.jar').split ()
 	ant_jars = []
 	excludes = ["cloud-xstream-1.3.1.jar", "cloud-commons-dbcp-1.2.2.jar", 
 			"cloud-commons-httpclient-3.1.jar", "cloud-commons-pool-1.4.jar",
 			"cloud-servlet-api.jar", "cloud-commons-logging-1.1.1.jar",
 			"cloud-ws-commons-util-1.0.2.jar",
 			"cloud-commons-collections-3.2.1.jar", "vmware*.jar", "cloud-secstorage-extras.jar",
-			"cloud-agent-simulator.jar", "cloud-awsapi.jar", "cloud-test.jar", "cloud-wsdl4j.jar",
"cloud-console-proxy.jar",
-                        "cloud-*tests.jar" ]
+			"cloud-agent-simulator.jar", "cloud-awsapi.jar", "cloud-test.jar", "cloud-wsdl4j.jar",
"cloud-console-proxy.jar"]
 
 	for a in jars_str:
 		if _basename (a).startswith ("cloud-") \
@@ -149,6 +146,7 @@ def build_jars ():
 	
 	bld.install_files ('${JAVADIR}', ant_jars)
 
+
 def build_premium ():
 	if buildpremium: bld.recurse(["cloudstack-proprietary/"],'build')
 
@@ -163,10 +161,10 @@ def build_dependences ():
 				"cloud-commons-collections-3.2.1.jar", "cloud-wsdl4j.jar"]
 
 	start_path = bld.path.find_dir ("deps")
-	bld.install_files('${JAVADIR}',start_path.ant_glob("*.jar", excl = excludes), cwd=start_path)
-	if buildpremium:
-		start_path = bld.path.find_dir ("cloudstack-proprietary/premium/deps")
-		bld.install_files('${JAVADIR}',start_path.ant_glob("*.jar", excl = excludes), cwd=start_path)
+
+        bld.install_files('${JAVADIR}',start_path.ant_glob(["xmlrpc-client-3.1.3.jar", "commons-dbcp-1.4.jar",
"commons-pool-1.6.jar", "gson-1.7.1.jar", 
+         "netscaler-1.0.jar", "netscaler-sdx-1.0.jar", "backport-util-concurrent-3.1.jar",
"ehcache-1.5.0.jar", "httpcore-4.0.jar", "log4j-1.2.16.jar", "trilead-ssh2-build213-svnkit-1.3-patch.jar",
"cglib-2.2.jar", "xmlrpc-common-3.*.jar", 
+         "xmlrpc-client-3.*.jar", "axis-1.4.jar", "wsdl4j-1.6.2.jar", "bcprov-jdk16-1.46.jar",
"jsch-0.1.42.jar", "icontrol-1.0.jar", "manageontap-1.0.jar", "vmware-vim-1.0.jar", "vmware-vim25-1.0.jar",
"jasypt-1.9.0.jar", "commons-configuration-1.8.jar", "commons-lang-2.6.jar", "ejb-api.3.0.jar",
"mail-1.4.jar", "activation-1.1.jar", "mysql-connector-java-5.1.21.jar", "hibernate-jpa-2.0-api-1.0.0.Final.jar",
"hibernate-entitymanager-3.5.1-Final.jar", "hibernate-core-3.5.1-Final.jar", "hibernate-commons-annotations-3.2.0.Final.jar",
"hibernate-annotations-3.5.1-Final.jar", "asm-3.1.jar", "xapi-5.6.100-1-20120825.123319-1.jar"],
excl = excludes), cwd=start_path)
 
 #def build_console_proxy ():
 	# binary unsubstitutable files:
@@ -203,9 +201,9 @@ def build_patches ():
 def build_systemvm_patch ():
 	if bld.env.DISTRO not in ["Windows","Mac"]:
 		# patch creation
-		bld.install_files ("${AGENTLIBDIR}/vms", "console-proxy/dist/systemvm.zip" )
+		bld.install_files ("${AGENTLIBDIR}/vms", "%s/systemvm.zip" % distdir)
 		# ISO creation
-		bld.install_as("${AGENTLIBDIR}/vms/systemvm.iso", "console-proxy/dist/systemvm.iso" )
+		bld.install_as("${AGENTLIBDIR}/vms/systemvm.iso", "%s/systemvm.iso" % distdir)
 
 def build_systemvm_iso ():
 	if buildpremium:
@@ -363,14 +361,13 @@ def build_xml_api_description ():
 		relationship = Utils.relpath(sourcedir,os.getcwd())
 		cp = [ _join(relationship,x) for x in task.generator.env.CLASSPATH.split(pathsep) ]
 
-		jarnames = ['utils','server','core', 'api']
+		jarnames = ['utils','server','core', 'api', 'server-extras']
 		props = ["client/tomcatconf/commands.properties.in"]
 
 		sources = []
 		for i in jarnames:
-                        str = _glob("../%s/target/*jar" % i )
-                        for j in str:
-			        sources.append ("%s/target/%s" % (i, os.path.basename(j)))
+			str = 'target/jar/cloud-%s.jar' % i
+			sources.append (str)
 		sources.append ("client/tomcatconf/commands.properties.in")
 		if buildpremium:
 			sources.append("client/tomcatconf/commands-ext.properties.in")
@@ -432,17 +429,7 @@ def build_usage_dir ():
 			Utils.subst_vars("${MSCONF}/db.properties",bld.env))
 	Utils.pprint ("GREEN", "Installed files of usage/")
 
-def build_awsapi():
-	start_path = bld.path.find_dir ("awsapi")
-	bld.install_files_filtered("${DATADIR}/cloud/bridge/conf","conf/*", cwd = start_path)
-	bld.install_files_filtered("${DATADIR}/cloud/bridge/lib","target/cloud-awsapi-*/WEB-INF/lib/*jar",
cwd = start_path)
-	bld.install_files_filtered("${DATADIR}/cloud/bridge/webapps7080/WEB-INF","web/*", cwd =
start_path)
-	start_path = bld.path.find_dir ("awsapi-setup")
-	bld.install_files_filtered("${DATADIR}/cloud/setup/bridge/db","db/mysql/*.sql", cwd = start_path)
-	bld.install_files_filtered("${DATADIR}/cloud/setup/bridge/db","db/mysql/*.sh", cwd = start_path)
-	bld.install_files_filtered("${BINDIR}","setup/*", cwd = start_path)
-	Utils.pprint ("GREEN", "Installed files of awsapi/")
-     
+
 
 # Get started to execute here
 build_utils_docs ()
@@ -465,7 +452,6 @@ build_xml_api_description ()
 build_ovm ()
 #build_test()
 build_usage_dir()
-build_awsapi()
 
 # ====================== Magic! =========================================
 bld.use_the_magic()


Mime
View raw message