Hey Edison,

That should be easy to do once the build is "mavenized". I'm starting to 
seriously dislike waf already, so would be happy to see it go.

Cheers,

Hugo

Sent from my iPhone

On 6 sep. 2012, at 10:22, "Edison Su" <edison...@citrix.com> wrote:

> I just thought about how to get rid of waf, and how to package artifacts 
> build by maven. I don't want to hack on the waf stuff, which gets easy thing 
> done but to complicated. 
> If war build by maven contains all the files needed by packager, then we 
> probably just unzip the war, then call rpmbuild to build rpm. 
> Does war contain files under agent/distro? Or maybe write another assembly 
> plugin to package all these system level configuration files?
> 
> Sent from my iPhone
> 
> On Sep 5, 2012, at 11:37 PM, "Hugo Trippaers" <htrippa...@schubergphilis.com> 
> wrote:
> 
>> Yeah, I know ;-).  I'm doing builds and deployments for all software in our 
>> company. It's not that bad once you get to know it, but maven expects you to 
>> do things the maven way.
>> 
>> As for building packages, maven is designed to take care of all dependency 
>> problems directly. In the maven world the build would produce an artifact 
>> that would be packaged later on. So in our case the artifact would be a war 
>> file with all code for the server (including ui components) and several jar 
>> files with for example the agent and console-proxy. Currently our package 
>> system is designed to collect all loose jars itself and put it into a 
>> package. The "maven" way would be to take the war file and deploy that file.
>> 
>> If you build using the "mvn -P client" command, you will find the war file 
>> in "client/target/cloud-client-ui-4.0.0-SNAPSHOT.war". If you look inside 
>> that file it should contain everything needed to run the webapplication for 
>> the server (awsapi has a similar file). Technically you should be able to 
>> drop that webapplication in any java web container and run the UI without 
>> having to worry about dependencies.
>> 
>> I haven't checked all the libs yet, but with maven we can define which libs 
>> are required for various stages; compiling, testing, runtime, and a special 
>> for provided. This controls if a lib is added to the compile classpath, the 
>> runtime classpath or the test classpath. Provided means we need it for 
>> compilation but we expect that it is present when we install the 
>> application. Good examples of provided is the servlet api, you need it for 
>> compilation, but it is present on all web application containers.
>> 
>> Back to your original question, how about packaging the war file directly? 
>> Or having rpm install unpack the war and add it to the rpm, would that safe 
>> you work to check the rpms?
>> 
>> Cheers,
>> 
>> Hugo
>> 
>>> -----Original Message-----
>>> From: Edison Su [mailto:edison...@citrix.com]
>>> Sent: Wednesday, September 05, 2012 11:52 PM
>>> To: Hugo Trippaers
>>> Cc: cloudstack-dev@incubator.apache.org
>>> Subject: RE: RPM build is fixed, sort of...
>>> 
>>> I can understand why build engineer doesn't like maven from my yesterday's
>>> experience.
>>> Maven automatically downloads a bunch of jars for you, that's good for
>>> developer, but a nightmare for build engineer. How can I find out which jar 
>>> I
>>> should put into RPM/DEB?
>>> I need to manually test one by one.
>>> 
>>>> -----Original Message-----
>>>> From: Hugo Trippaers [mailto:htrippa...@schubergphilis.com]
>>>> Sent: Wednesday, September 05, 2012 1:52 PM
>>>> To: Edison Su
>>>> Cc: cloudstack-dev@incubator.apache.org
>>>> Subject: Re: RPM build is fixed, sort of...
>>>> 
>>>> That's maven. A snapshot dependency will get a build version number
>>>> depending on the time it was built. Only release versions have a fixed
>>>> version number.
>>>> 
>>>> Maven it self will automagically take this into account when building
>>>> classpaths, but for external tools it is a bit trickier.
>>>> 
>>>> Cheers,
>>>> 
>>>> Hugo
>>>> 
>>>> Sent from my iPhone
>>>> 
>>>> On 5 sep. 2012, at 19:00, "Edison Su" <edison...@citrix.com> wrote:
>>>> 
>>>>> When I "mvn install" under deps folder, I got:
>>>>> [INFO] Copying xapi-5.6.100-1-SNAPSHOT.jar to /root/incubator-
>>>> cloudstack/deps/xapi-5.6.100-1-20120825.123319-1.jar
>>>>> 
>>>>> Anybody knows why this happened?
>>>>> 
>>>>>> -----Original Message-----
>>>>>> From: Marcus Sorensen [mailto:shadow...@gmail.com]
>>>>>> Sent: Wednesday, September 05, 2012 9:36 AM
>>>>>> To: cloudstack-dev@incubator.apache.org
>>>>>> Cc: Hugo Trippaers
>>>>>> Subject: Re: RPM build is fixed, sort of...
>>>>>> 
>>>>>> I'm getting xapi-5.6.100-1-SNAPSHOT.jar from a fresh pull of the
>>>>>> 4.0 repo, then following the install-non-oss.sh instructions
>>>>>> 
>>>>>> On Wed, Sep 5, 2012 at 10:09 AM, Edison Su <edison...@citrix.com>
>>>> wrote:
>>>>>>> What the name of the jar for xapi under deps folder on your
>>>>>> environment?
>>>>>>> 
>>>>>>> Sent from my iPhone
>>>>>>> 
>>>>>>> On Sep 5, 2012, at 12:20 AM, "Hugo Trippaers"
>>>>>> <htrippa...@schubergphilis.com> wrote:
>>>>>>> 
>>>>>>>> Hey Edison,
>>>>>>>> 
>>>>>>>> I still get an error when building rpms with your changes:
>>>>>>>> 
>>>>>>>> Processing files: cloud-utils-4.0.0-0.1.el6.maven.x86_64
>>>>>>>> Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.kvoZ6x
>>>>>>>> + umask 022
>>>>>>>> + cd /home/spark/git-workdir/incubator-
>>>>>> cloudstack/artifacts/rpmbuild/BUILD
>>>>>>>> + cd cloud-4.0.0
>>>>>>>> + DOCDIR=/home/spark/git-workdir/incubator-
>>>>>> cloudstack/artifacts/rpmbuild/BUILDROOT/cloud-4.0.0-
>>>>>> 0.1.el6.maven.x86_64/usr/share/doc/cloud-utils-4.0.0
>>>>>>>> + export DOCDIR
>>>>>>>> + rm -rf /home/spark/git-workdir/incubator-
>>>>>> cloudstack/artifacts/rpmbuild/BUILDROOT/cloud-4.0.0-
>>>>>> 0.1.el6.maven.x86_64/usr/share/doc/cloud-utils-4.0.0
>>>>>>>> + /bin/mkdir -p /home/spark/git-workdir/incubator-
>>>>>> cloudstack/artifacts/rpmbuild/BUILDROOT/cloud-4.0.0-
>>>>>> 0.1.el6.maven.x86_64/usr/share/doc/cloud-utils-4.0.0
>>>>>>>> + cp -pr README.html /home/spark/git-workdir/incubator-
>>>>>> cloudstack/artifacts/rpmbuild/BUILDROOT/cloud-4.0.0-
>>>>>> 0.1.el6.maven.x86_64/usr/share/doc/cloud-utils-4.0.0
>>>>>>>> + cp -pr debian/copyright /home/spark/git-workdir/incubator-
>>>>>> cloudstack/artifacts/rpmbuild/BUILDROOT/cloud-4.0.0-
>>>>>> 0.1.el6.maven.x86_64/usr/share/doc/cloud-utils-4.0.0
>>>>>>>> + exit 0
>>>>>>>> Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
>>>>>> rpmlib(PayloadFilesHavePrefix) <= 4.0-1
>>>>>> rpmlib(VersionedDependencies) <= 3.0.3-1
>>>>>>>> Requires: /usr/bin/env
>>>>>>>> Obsoletes: vmops-utils < 4.0.0-0.1.el6.maven Processing files:
>>>>>>>> cloud-client-ui-4.0.0-0.1.el6.maven.x86_64
>>>>>>>> Requires(interp): /bin/sh
>>>>>>>> Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
>>>>>> rpmlib(PayloadFilesHavePrefix) <= 4.0-1
>>>>>> rpmlib(VersionedDependencies) <= 3.0.3-1
>>>>>>>> Requires(pre): /bin/sh
>>>>>>>> Obsoletes: vmops-client-ui < 4.0.0-0.1.el6.maven Processing
>>>>>>>> files: cloud-server-4.0.0-0.1.el6.maven.x86_64
>>>>>>>> Provides: config(cloud-server) = 4.0.0-0.1.el6.maven
>>>>>>>> Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
>>>>>> rpmlib(PayloadFilesHavePrefix) <= 4.0-1
>>>>>> rpmlib(VersionedDependencies) <= 3.0.3-1
>>>>>>>> Obsoletes: vmops-server < 4.0.0-0.1.el6.maven Processing files:
>>>>>>>> cloud-agent-scripts-4.0.0-0.1.el6.maven.x86_64
>>>>>>>> Processing files: cloud-python-4.0.0-0.1.el6.maven.x86_64
>>>>>>>> Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
>>>>>> rpmlib(PayloadFilesHavePrefix) <= 4.0-1
>>>>>>>> Requires: /bin/bash /usr/bin/python python(abi) = 2.6 Processing
>>>>>>>> files: cloud-deps-4.0.0-0.1.el6.maven.x86_64
>>>>>>>> error: File not found: /home/spark/git-workdir/incubator-
>>>>>> cloudstack/artifacts/rpmbuild/BUILDROOT/cloud-4.0.0-
>>>>>> 0.1.el6.maven.x86_64/usr/share/java/xapi-5.6.100-1-20120825.123319-
>>>>>> 1.jar
>>>>>>>> 
>>>>>>>> 
>>>>>>>> RPM build errors:
>>>>>>>> File not found: /home/spark/git-workdir/incubator-
>>>>>> cloudstack/artifacts/rpmbuild/BUILDROOT/cloud-4.0.0-
>>>>>> 0.1.el6.maven.x86_64/usr/share/java/xapi-5.6.100-1-20120825.123319-
>>>>>> 1.jar
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Cheers,
>>>>>>>> 
>>>>>>>> Hugo
>>>>>>>> 
>>>>>>>>> -----Original Message-----
>>>>>>>>> From: Hugo Trippaers [mailto:htrippa...@schubergphilis.com]
>>>>>>>>> Sent: Wednesday, September 05, 2012 8:24 AM
>>>>>>>>> To: 'Edison Su'; cloudstack-dev@incubator.apache.org
>>>>>>>>> Subject: RE: RPM build is fixed, sort of...
>>>>>>>>> 
>>>>>>>>> Hey Edison,
>>>>>>>>> 
>>>>>>>>> No problem, I'll leave it to you then.
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Cheers,
>>>>>>>>> 
>>>>>>>>> Hugo
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>>> -----Original Message-----
>>>>>>>>>> From: Edison Su [mailto:edison...@citrix.com]
>>>>>>>>>> Sent: Wednesday, September 05, 2012 6:42 AM
>>>>>>>>>> To: cloudstack-dev@incubator.apache.org
>>>>>>>>>> Cc: Hugo Trippaers
>>>>>>>>>> Subject: RPM build is fixed, sort of...
>>>>>>>>>> 
>>>>>>>>>> Hi Hugo,
>>>>>>>>>> I reverted three of your
>>>>>>>>>> patches(1f207506daa1874421b01ad8ea733e6bc8b8ce60/
>>>>>>>>>> 79004fc7bc5f24f8bf9c75f7a0b0fef01042db13/
>>>>>>>>>> a4f1971e80f2aaf86017ddc989513eefb04265fa), I don't know how
>>> to
>>>> get
>>>>>>>>>> waf+maven work, but I know how to get ant work right now.
>>>>>>>>>> Still need to use "maven install" to download all the deps.
>>>> "waf
>>>>>>>>>> rpm" works right now, but may still have other issues during
>>>>>>>>>> the
>>>>>> rpm
>>>>>>>>>> install. Seems jasper related jars are not included in the
>>>>>>>>>> classpath.conf, so you may not login into UI.

Reply via email to