@@ -105,31 +105,30 @@ def build_jars ():
105105 Implementation_Version = bld .env .VERSION
106106
107107 # this is to trigger recompilation / cache avoidance if the relevant environment for ant changes
108- ant_args = [
109- "build-all " ,
108+ mvn_args = [
109+ "package " ,
110110 "-Dimpl.version=%s" % Implementation_Version ,
111111 "-Dtarget.dir=%s" % targetdir ,
112112 "-Ddist.dir=%s" % distdir ,
113- "-Dbase.dir=%s" % sourcedir ,
114- "-f %s" % Utils .relpath (_join (sourcedir , "build.xml" )),
113+ "-Dbase.dir=%s" % sourcedir
115114 ]
116115
117116 if buildpremium :
118- ant_args .append ("-Dbuild.premium=true" )
117+ mvn_args .append ("-Dbuild.premium=true" )
119118
120119 tgen = bld (features = 'subst' , name = 'version-info' , source = "version-info.in" , target = "version-info" )
121- tgen .dict = { "Implementation_Version" :Implementation_Version ,"ant_args" : ant_args }
120+ tgen .dict = { "Implementation_Version" :Implementation_Version ,"mvn_args" : mvn_args }
122121 bld .install_files ("${DOCDIR}" ,"version-info" )
123122
124123 bld .srcnode .ensure_dir_node_from_path ("target/jar" )
125124 bld .srcnode .ensure_dir_node_from_path ("dist" )
126125
127- tgen = bld .new_task_gen (rule = Utils .runant ,
128- name = "runant " ,
129- antargs = ant_args )
126+ tgen = bld .new_task_gen (rule = Utils .runmvn ,
127+ name = "runmvn " ,
128+ mvnargs = mvn_args )
130129
131- jarnode = bld .srcnode .find_dir ('target/jar ' )
132- jars_str = jarnode .ant_glob ('*.jar' ).split ()
130+ jarnode = bld .srcnode .find_dir ('. ' )
131+ jars_str = jarnode .ant_glob ('**/target/* .jar' ).split ()
133132 ant_jars = []
134133 excludes = ["cloud-xstream-1.3.1.jar" , "cloud-commons-dbcp-1.2.2.jar" ,
135134 "cloud-commons-httpclient-3.1.jar" , "cloud-commons-pool-1.4.jar" ,
@@ -146,7 +145,6 @@ def build_jars ():
146145
147146 bld .install_files ('${JAVADIR}' , ant_jars )
148147
149-
150148def build_premium ():
151149 if buildpremium : bld .recurse (["cloudstack-proprietary/" ],'build' )
152150
@@ -201,9 +199,9 @@ def build_patches ():
201199def build_systemvm_patch ():
202200 if bld .env .DISTRO not in ["Windows" ,"Mac" ]:
203201 # patch creation
204- bld .install_files ("${AGENTLIBDIR}/vms" , "%s/ systemvm.zip" % distdir )
202+ bld .install_files ("${AGENTLIBDIR}/vms" , "console-proxy/dist/ systemvm.zip" )
205203 # ISO creation
206- bld .install_as ("${AGENTLIBDIR}/vms/systemvm.iso" , "%s/ systemvm.iso" % distdir )
204+ bld .install_as ("${AGENTLIBDIR}/vms/systemvm.iso" , "console-proxy/dist/ systemvm.iso" )
207205
208206def build_systemvm_iso ():
209207 if buildpremium :
@@ -361,13 +359,14 @@ def build_xml_api_description ():
361359 relationship = Utils .relpath (sourcedir ,os .getcwd ())
362360 cp = [ _join (relationship ,x ) for x in task .generator .env .CLASSPATH .split (pathsep ) ]
363361
364- jarnames = ['utils' ,'server' ,'core' , 'api' , 'server-extras' ]
362+ jarnames = ['utils' ,'server' ,'core' , 'api' ]
365363 props = ["client/tomcatconf/commands.properties.in" ]
366364
367365 sources = []
368366 for i in jarnames :
369- str = 'target/jar/cloud-%s.jar' % i
370- sources .append (str )
367+ str = _glob ("../%s/target/*jar" % i )
368+ for j in str :
369+ sources .append ("%s/target/%s" % (i , os .path .basename (j )))
371370 sources .append ("client/tomcatconf/commands.properties.in" )
372371 if buildpremium :
373372 sources .append ("client/tomcatconf/commands-ext.properties.in" )
0 commit comments