You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Dave Cahill <dc...@midokura.jp> on 2012/11/05 10:13:11 UTC

Proposed fixes for debian package building process

Hi,

There appear to be some errors in the debian package building process; I'd
like to double-check my approach for fixing them.

The wiki [1] gives the procedure for building debian packages as:
mvn install -P deps && dpkg-buildpackage

However, mvn install -P deps fails with:

[ERROR] Failed to execute goal on project cloud-deps: Could not resolve
dependencies for project
org.apache.cloudstack:cloud-deps:jar:4.1.0-SNAPSHOT: Could not find
artifact org.apache.cloudstack:cloud-awsapi:jar:4.1.0-SNAPSHOT in
apache.snapshots (http://repository.apache.org/snapshots) -> [Help 1]

The reason for this failure seems to be this section of deps/pom.xml:
    <dependency>
      <groupId>org.apache.cloudstack</groupId>
      <artifactId>cloud-awsapi</artifactId>
      <version>${project.version}</version>
    </dependency>

${project.version} is 4.1.0-SNAPSHOT, however looking at
https://repository.apache.org/content/groups/snapshots/org/apache/cloudstack/cloud-awsapi/,
I only see 4.0.0-SNAPSHOT.

If I replace ${project.version} for cloud-awsapi in deps/pom.xml with a
hardcoded "4.0.0-SNAPSHOT", mvn -P deps succeeds. An alternative fix would
be if 4.1.0-SNAPSHOT version of cloud-awsapi was available on
repository.apache.org.

I also found that in order for dpkg-buildpackage to succeed, I needed to
run "mvn install -P deps -pl deps" rather than just "mvn install -P deps".

For reference, if you run dpkg-buildpackages without running "mvn -P deps",
the error returned is:
/PATH/incubator-cloudstack/build/build-aws-api.xml:34: taskdef class
org.apache.axis2.tool.ant.AntCodegenTask cannot be found

Lastly, I would have expected "mvn clean" to remove the .jars in the deps
folder, however it does not - this made debugging "interesting"!

Proposed changes:
* Hardcode 4.0.0-SNAPSHOT as the version of cloud-awsapi in deps/poms.xml
* Change the wiki to reflect the fact that "mvn install -P deps -pl deps"
needs to be run when building debian packages
* Change mvn clean to remove the jars from the deps folder

Please let me know if those changes make sense, or if I'm missing
something. If they look OK, I'll create a patch and submit.

Thanks,
Dave.

[1]
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+with+Maven#BuildingwithMaven-BuildingCloudStack

Re: Proposed fixes for debian package building process

Posted by Dave Cahill <dc...@midokura.jp>.
Hi Donal,

Thanks for that, appreciate the pointer.

I am working on master, however I'm using KVM as hypervisor rather than
Xen. AFAIK devcloud only works with Xen.

Thanks,
Dave.


On Tue, Nov 6, 2012 at 10:58 AM, Donal Lafferty
<do...@citrix.com>wrote:

> Which branch are you working on?
>
> For a Maven build on Master, use
> https://cwiki.apache.org/CLOUDSTACK/cloudstack-devcloud-environment-setup.html  It has been recently vetted.
>
> DL
>
> -----Original Message-----
> From: Edison Su [mailto:Edison.su@citrix.com]
> Sent: 05 November 2012 10:59 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: RE: Proposed fixes for debian package building process
>
> I don't the deb build on master will work, as we moved build system from
> ant to maven, the artifacts build by maven is quite different from
> ant(regarding to the path). You can find the discussion about the build
> system in the following the mail threads:
> http://markmail.org/message/lsjigqvnbkjtbl4y
> http://markmail.org/message/utce4esqjl7xhwr4
>
> -----Original Message-----
> From: Dave Cahill [mailto:dcahill@midokura.jp]
> Sent: Monday, November 05, 2012 1:13 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: Proposed fixes for debian package building process
>
> Hi,
>
> There appear to be some errors in the debian package building process; I'd
> like to double-check my approach for fixing them.
>
> The wiki [1] gives the procedure for building debian packages as:
> mvn install -P deps && dpkg-buildpackage
>
> However, mvn install -P deps fails with:
>
> [ERROR] Failed to execute goal on project cloud-deps: Could not resolve
> dependencies for project
> org.apache.cloudstack:cloud-deps:jar:4.1.0-SNAPSHOT: Could not find
> artifact org.apache.cloudstack:cloud-awsapi:jar:4.1.0-SNAPSHOT in
> apache.snapshots (http://repository.apache.org/snapshots) -> [Help 1]
>
> The reason for this failure seems to be this section of deps/pom.xml:
>     <dependency>
>       <groupId>org.apache.cloudstack</groupId>
>       <artifactId>cloud-awsapi</artifactId>
>       <version>${project.version}</version>
>     </dependency>
>
> ${project.version} is 4.1.0-SNAPSHOT, however looking at
> https://repository.apache.org/content/groups/snapshots/org/apache/cloudstack/cloud-awsapi/
> ,
> I only see 4.0.0-SNAPSHOT.
>
> If I replace ${project.version} for cloud-awsapi in deps/pom.xml with a
> hardcoded "4.0.0-SNAPSHOT", mvn -P deps succeeds. An alternative fix would
> be if 4.1.0-SNAPSHOT version of cloud-awsapi was available on
> repository.apache.org.
>
> I also found that in order for dpkg-buildpackage to succeed, I needed to
> run "mvn install -P deps -pl deps" rather than just "mvn install -P deps".
>
> For reference, if you run dpkg-buildpackages without running "mvn -P
> deps", the error returned is:
> /PATH/incubator-cloudstack/build/build-aws-api.xml:34: taskdef class
> org.apache.axis2.tool.ant.AntCodegenTask cannot be found
>
> Lastly, I would have expected "mvn clean" to remove the .jars in the deps
> folder, however it does not - this made debugging "interesting"!
>
> Proposed changes:
> * Hardcode 4.0.0-SNAPSHOT as the version of cloud-awsapi in deps/poms.xml
> * Change the wiki to reflect the fact that "mvn install -P deps -pl deps"
> needs to be run when building debian packages
> * Change mvn clean to remove the jars from the deps folder
>
> Please let me know if those changes make sense, or if I'm missing
> something. If they look OK, I'll create a patch and submit.
>
> Thanks,
> Dave.
>
> [1]
>
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+with+Maven#BuildingwithMaven-BuildingCloudStack
>



-- 
Thanks,
Dave.

RE: Proposed fixes for debian package building process

Posted by Donal Lafferty <do...@citrix.com>.
Which branch are you working on?  

For a Maven build on Master, use https://cwiki.apache.org/CLOUDSTACK/cloudstack-devcloud-environment-setup.html   It has been recently vetted.

DL 

-----Original Message-----
From: Edison Su [mailto:Edison.su@citrix.com] 
Sent: 05 November 2012 10:59 AM
To: cloudstack-dev@incubator.apache.org
Subject: RE: Proposed fixes for debian package building process

I don't the deb build on master will work, as we moved build system from ant to maven, the artifacts build by maven is quite different from ant(regarding to the path). You can find the discussion about the build system in the following the mail threads:
http://markmail.org/message/lsjigqvnbkjtbl4y
http://markmail.org/message/utce4esqjl7xhwr4

-----Original Message-----
From: Dave Cahill [mailto:dcahill@midokura.jp] 
Sent: Monday, November 05, 2012 1:13 AM
To: cloudstack-dev@incubator.apache.org
Subject: Proposed fixes for debian package building process

Hi,

There appear to be some errors in the debian package building process; I'd like to double-check my approach for fixing them.

The wiki [1] gives the procedure for building debian packages as:
mvn install -P deps && dpkg-buildpackage

However, mvn install -P deps fails with:

[ERROR] Failed to execute goal on project cloud-deps: Could not resolve dependencies for project
org.apache.cloudstack:cloud-deps:jar:4.1.0-SNAPSHOT: Could not find artifact org.apache.cloudstack:cloud-awsapi:jar:4.1.0-SNAPSHOT in apache.snapshots (http://repository.apache.org/snapshots) -> [Help 1]

The reason for this failure seems to be this section of deps/pom.xml:
    <dependency>
      <groupId>org.apache.cloudstack</groupId>
      <artifactId>cloud-awsapi</artifactId>
      <version>${project.version}</version>
    </dependency>

${project.version} is 4.1.0-SNAPSHOT, however looking at https://repository.apache.org/content/groups/snapshots/org/apache/cloudstack/cloud-awsapi/,
I only see 4.0.0-SNAPSHOT.

If I replace ${project.version} for cloud-awsapi in deps/pom.xml with a hardcoded "4.0.0-SNAPSHOT", mvn -P deps succeeds. An alternative fix would be if 4.1.0-SNAPSHOT version of cloud-awsapi was available on repository.apache.org.

I also found that in order for dpkg-buildpackage to succeed, I needed to run "mvn install -P deps -pl deps" rather than just "mvn install -P deps".

For reference, if you run dpkg-buildpackages without running "mvn -P deps", the error returned is:
/PATH/incubator-cloudstack/build/build-aws-api.xml:34: taskdef class org.apache.axis2.tool.ant.AntCodegenTask cannot be found

Lastly, I would have expected "mvn clean" to remove the .jars in the deps folder, however it does not - this made debugging "interesting"!

Proposed changes:
* Hardcode 4.0.0-SNAPSHOT as the version of cloud-awsapi in deps/poms.xml
* Change the wiki to reflect the fact that "mvn install -P deps -pl deps"
needs to be run when building debian packages
* Change mvn clean to remove the jars from the deps folder

Please let me know if those changes make sense, or if I'm missing something. If they look OK, I'll create a patch and submit.

Thanks,
Dave.

[1]
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+with+Maven#BuildingwithMaven-BuildingCloudStack

Re: Proposed fixes for debian package building process

Posted by Dave Cahill <dc...@midokura.jp>.
Hi Edison,

> 2. package agent from plugins/hypervisors/kvm/target/kvm-agent.zip

Do you have any more information on how to do this?

>From a previous mail on the list, I saw:

>> Using "ant package-agent", which will create agent.zip under dist/, then
>> copy and unzip agent.zip on kvm host or inside system vm.
>> Modify conf/agent.properties, if it's kvm agent, resource =
>> *LibvirtResource*, if it's secondary agent, resource = *NfsSecondary*
>> Execute './run.sh', will start agent.
>> But I remember there has bug in run.sh though, the some jar files are
>> missing.

However, there seem to be several further steps which would be needed in
order to install the agent on a machine, e.g.:
* Add jars (e.g. jna) to the system, and add the jar to the classpath in
run.sh
* Move cloudutils python packages to python site-libs dir
* Create init scripts in /etc/init.d/

These are just the steps off the top of my head - it seems like a lot of
fiddly manual work, so I'm guessing I must be missing something. Assuming a
vanilla Ubuntu 12.04 install, and assuming that you have kvm-agent.zip, are
the steps for install listed in a wiki / doc anywhere?

Thanks,
Dave.






On Tue, Nov 6, 2012 at 12:20 PM, Edison Su <Ed...@citrix.com> wrote:

>
>
> > -----Original Message-----
> > From: Dave Cahill [mailto:dcahill@midokura.jp]
> > Sent: Monday, November 05, 2012 7:06 PM
> > To: cloudstack-dev@incubator.apache.org
> > Subject: Re: Proposed fixes for debian package building process
> >
> > Hi Edison,
> >
> > Understood - sounds like .deb package building is not supposed to work on
> > master.
> >
> > Do you know if anyone is working on making .deb building work using maven
> > on master? From the first thread you linked [1], it sounded like Noa
> Resare at
> > Spotify might start working on it, but I don't see any activity after
> that. The
> > wiki mentions this branch in relation to getting debs / maven working,
> but it
> > doesn't seem to have been updated in a month:
> > https://github.com/bhaisaab/incubator-cloudstack/tree/debs-maven
> >
> > If no-one is working on .deb package building, is there an alternative
> way to
> > keep developing on master with debian / Ubuntu? I can easily run the
> > management server from source ("mvn -pl :cloud-client-ui jetty:run"), but
> > running the agent from source is a bit messier, as the management server
> > needs to SSH into the host and run the agent via the init script ("sudo
> service
> > cloud-agent start").
>
> The temporary solution:
> 1. package mgt server from
> client/target/cloud-client-ui-4.1.0-SNAPSHOT.war.
>     John has problem about deploy war in tomcat(
> http://markmail.org/message/3p7qyvzj5tg5w7tx)
> 2. package agent from plugins/hypervisors/kvm/target/kvm-agent.zip
>
> >
> > I should also mention that by fixing the "mvn -P deps -pl deps" issue I
> > mentioned above, I was able to run dpkg-buildpackage successfully,
> install
> > the resultant .debs successfully on an Ubuntu 12.04 machine, and get a
> basic
> > CloudStack setup (2 guest VMs, basic networking) working that way. If
> > building that way results in .debs which shouldn't work, should we remove
> > some of the broken options (e.g. the maven "deps" profile) from master to
> > avoid confusion?
> >
> > Any input appreciated.
> >
> > Thanks,
> > Dave.
> >
> >
> > [1] http://markmail.org/message/lsjigqvnbkjtbl4y
> >
> >
> >
> >
> >
> >
> > On Tue, Nov 6, 2012 at 3:59 AM, Edison Su <Ed...@citrix.com> wrote:
> >
> > > I don't the deb build on master will work, as we moved build system
> > > from ant to maven, the artifacts build by maven is quite different
> > > from ant(regarding to the path). You can find the discussion about the
> > > build system in the following the mail threads:
> > > http://markmail.org/message/lsjigqvnbkjtbl4y
> > > http://markmail.org/message/utce4esqjl7xhwr4
> > >
> > > -----Original Message-----
> > > From: Dave Cahill [mailto:dcahill@midokura.jp]
> > > Sent: Monday, November 05, 2012 1:13 AM
> > > To: cloudstack-dev@incubator.apache.org
> > > Subject: Proposed fixes for debian package building process
> > >
> > > Hi,
> > >
> > > There appear to be some errors in the debian package building process;
> > > I'd like to double-check my approach for fixing them.
> > >
> > > The wiki [1] gives the procedure for building debian packages as:
> > > mvn install -P deps && dpkg-buildpackage
> > >
> > > However, mvn install -P deps fails with:
> > >
> > > [ERROR] Failed to execute goal on project cloud-deps: Could not
> > > resolve dependencies for project
> > > org.apache.cloudstack:cloud-deps:jar:4.1.0-SNAPSHOT: Could not find
> > > artifact org.apache.cloudstack:cloud-awsapi:jar:4.1.0-SNAPSHOT in
> > > apache.snapshots (http://repository.apache.org/snapshots) -> [Help 1]
> > >
> > > The reason for this failure seems to be this section of deps/pom.xml:
> > >     <dependency>
> > >       <groupId>org.apache.cloudstack</groupId>
> > >       <artifactId>cloud-awsapi</artifactId>
> > >       <version>${project.version}</version>
> > >     </dependency>
> > >
> > > ${project.version} is 4.1.0-SNAPSHOT, however looking at
> > >
> > https://repository.apache.org/content/groups/snapshots/org/apache/clou
> > > dstack/cloud-awsapi/
> > > ,
> > > I only see 4.0.0-SNAPSHOT.
> > >
> > > If I replace ${project.version} for cloud-awsapi in deps/pom.xml with
> > > a hardcoded "4.0.0-SNAPSHOT", mvn -P deps succeeds. An alternative fix
> > > would be if 4.1.0-SNAPSHOT version of cloud-awsapi was available on
> > > repository.apache.org.
> > >
> > > I also found that in order for dpkg-buildpackage to succeed, I needed
> > > to run "mvn install -P deps -pl deps" rather than just "mvn install -P
> deps".
> > >
> > > For reference, if you run dpkg-buildpackages without running "mvn -P
> > > deps", the error returned is:
> > > /PATH/incubator-cloudstack/build/build-aws-api.xml:34: taskdef class
> > > org.apache.axis2.tool.ant.AntCodegenTask cannot be found
> > >
> > > Lastly, I would have expected "mvn clean" to remove the .jars in the
> > > deps folder, however it does not - this made debugging "interesting"!
> > >
> > > Proposed changes:
> > > * Hardcode 4.0.0-SNAPSHOT as the version of cloud-awsapi in
> > > deps/poms.xml
> > > * Change the wiki to reflect the fact that "mvn install -P deps -pl
> deps"
> > > needs to be run when building debian packages
> > > * Change mvn clean to remove the jars from the deps folder
> > >
> > > Please let me know if those changes make sense, or if I'm missing
> > > something. If they look OK, I'll create a patch and submit.
> > >
> > > Thanks,
> > > Dave.
> > >
> > > [1]
> > >
> > >
> > https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+with+M
> > > aven#BuildingwithMaven-BuildingCloudStack
> > >
> >
> >
> >
> > --
> > Thanks,
> > Dave.
>



-- 
Thanks,
Dave.

RE: Proposed fixes for debian package building process

Posted by Edison Su <Ed...@citrix.com>.

> -----Original Message-----
> From: Dave Cahill [mailto:dcahill@midokura.jp]
> Sent: Monday, November 05, 2012 7:06 PM
> To: cloudstack-dev@incubator.apache.org
> Subject: Re: Proposed fixes for debian package building process
> 
> Hi Edison,
> 
> Understood - sounds like .deb package building is not supposed to work on
> master.
> 
> Do you know if anyone is working on making .deb building work using maven
> on master? From the first thread you linked [1], it sounded like Noa Resare at
> Spotify might start working on it, but I don't see any activity after that. The
> wiki mentions this branch in relation to getting debs / maven working, but it
> doesn't seem to have been updated in a month:
> https://github.com/bhaisaab/incubator-cloudstack/tree/debs-maven
> 
> If no-one is working on .deb package building, is there an alternative way to
> keep developing on master with debian / Ubuntu? I can easily run the
> management server from source ("mvn -pl :cloud-client-ui jetty:run"), but
> running the agent from source is a bit messier, as the management server
> needs to SSH into the host and run the agent via the init script ("sudo service
> cloud-agent start").

The temporary solution:
1. package mgt server from client/target/cloud-client-ui-4.1.0-SNAPSHOT.war.
    John has problem about deploy war in tomcat(http://markmail.org/message/3p7qyvzj5tg5w7tx)
2. package agent from plugins/hypervisors/kvm/target/kvm-agent.zip

> 
> I should also mention that by fixing the "mvn -P deps -pl deps" issue I
> mentioned above, I was able to run dpkg-buildpackage successfully, install
> the resultant .debs successfully on an Ubuntu 12.04 machine, and get a basic
> CloudStack setup (2 guest VMs, basic networking) working that way. If
> building that way results in .debs which shouldn't work, should we remove
> some of the broken options (e.g. the maven "deps" profile) from master to
> avoid confusion?
> 
> Any input appreciated.
> 
> Thanks,
> Dave.
> 
> 
> [1] http://markmail.org/message/lsjigqvnbkjtbl4y
> 
> 
> 
> 
> 
> 
> On Tue, Nov 6, 2012 at 3:59 AM, Edison Su <Ed...@citrix.com> wrote:
> 
> > I don't the deb build on master will work, as we moved build system
> > from ant to maven, the artifacts build by maven is quite different
> > from ant(regarding to the path). You can find the discussion about the
> > build system in the following the mail threads:
> > http://markmail.org/message/lsjigqvnbkjtbl4y
> > http://markmail.org/message/utce4esqjl7xhwr4
> >
> > -----Original Message-----
> > From: Dave Cahill [mailto:dcahill@midokura.jp]
> > Sent: Monday, November 05, 2012 1:13 AM
> > To: cloudstack-dev@incubator.apache.org
> > Subject: Proposed fixes for debian package building process
> >
> > Hi,
> >
> > There appear to be some errors in the debian package building process;
> > I'd like to double-check my approach for fixing them.
> >
> > The wiki [1] gives the procedure for building debian packages as:
> > mvn install -P deps && dpkg-buildpackage
> >
> > However, mvn install -P deps fails with:
> >
> > [ERROR] Failed to execute goal on project cloud-deps: Could not
> > resolve dependencies for project
> > org.apache.cloudstack:cloud-deps:jar:4.1.0-SNAPSHOT: Could not find
> > artifact org.apache.cloudstack:cloud-awsapi:jar:4.1.0-SNAPSHOT in
> > apache.snapshots (http://repository.apache.org/snapshots) -> [Help 1]
> >
> > The reason for this failure seems to be this section of deps/pom.xml:
> >     <dependency>
> >       <groupId>org.apache.cloudstack</groupId>
> >       <artifactId>cloud-awsapi</artifactId>
> >       <version>${project.version}</version>
> >     </dependency>
> >
> > ${project.version} is 4.1.0-SNAPSHOT, however looking at
> >
> https://repository.apache.org/content/groups/snapshots/org/apache/clou
> > dstack/cloud-awsapi/
> > ,
> > I only see 4.0.0-SNAPSHOT.
> >
> > If I replace ${project.version} for cloud-awsapi in deps/pom.xml with
> > a hardcoded "4.0.0-SNAPSHOT", mvn -P deps succeeds. An alternative fix
> > would be if 4.1.0-SNAPSHOT version of cloud-awsapi was available on
> > repository.apache.org.
> >
> > I also found that in order for dpkg-buildpackage to succeed, I needed
> > to run "mvn install -P deps -pl deps" rather than just "mvn install -P deps".
> >
> > For reference, if you run dpkg-buildpackages without running "mvn -P
> > deps", the error returned is:
> > /PATH/incubator-cloudstack/build/build-aws-api.xml:34: taskdef class
> > org.apache.axis2.tool.ant.AntCodegenTask cannot be found
> >
> > Lastly, I would have expected "mvn clean" to remove the .jars in the
> > deps folder, however it does not - this made debugging "interesting"!
> >
> > Proposed changes:
> > * Hardcode 4.0.0-SNAPSHOT as the version of cloud-awsapi in
> > deps/poms.xml
> > * Change the wiki to reflect the fact that "mvn install -P deps -pl deps"
> > needs to be run when building debian packages
> > * Change mvn clean to remove the jars from the deps folder
> >
> > Please let me know if those changes make sense, or if I'm missing
> > something. If they look OK, I'll create a patch and submit.
> >
> > Thanks,
> > Dave.
> >
> > [1]
> >
> >
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+with+M
> > aven#BuildingwithMaven-BuildingCloudStack
> >
> 
> 
> 
> --
> Thanks,
> Dave.

Re: Proposed fixes for debian package building process

Posted by Wido den Hollander <wi...@widodh.nl>.

On 06-11-12 04:06, Dave Cahill wrote:
> Hi Edison,
>
> Understood - sounds like .deb package building is not supposed to work on
> master.
>
> Do you know if anyone is working on making .deb building work using maven
> on master? From the first thread you linked [1], it sounded like Noa Resare
> at Spotify might start working on it, but I don't see any activity after
> that. The wiki mentions this branch in relation to getting debs / maven
> working, but it doesn't seem to have been updated in a month:
> https://github.com/bhaisaab/incubator-cloudstack/tree/debs-maven
>

Not working on it yet, but planning to do so. Hugo and Edison did a 
great job in getting all the RPM packages build with Maven, but also has 
to be done for the Debian/Ubuntu packages.

I want to pick this up, but in the coming weeks I'll be offline.

This week I'm at ApacheCon EU, so that doesn't help in terms of 
availability.

So, nobody is working on it at the moment, but I want to pick this up asap.

Wido

> If no-one is working on .deb package building, is there an alternative way
> to keep developing on master with debian / Ubuntu? I can easily run the
> management server from source ("mvn -pl :cloud-client-ui jetty:run"), but
> running the agent from source is a bit messier, as the management server
> needs to SSH into the host and run the agent via the init script ("sudo
> service cloud-agent start").
>
> I should also mention that by fixing the "mvn -P deps -pl deps" issue I
> mentioned above, I was able to run dpkg-buildpackage successfully, install
> the resultant .debs successfully on an Ubuntu 12.04 machine, and get a
> basic CloudStack setup (2 guest VMs, basic networking) working that way. If
> building that way results in .debs which shouldn't work, should we remove
> some of the broken options (e.g. the maven "deps" profile) from master to
> avoid confusion?
>
> Any input appreciated.
>
> Thanks,
> Dave.
>
>
> [1] http://markmail.org/message/lsjigqvnbkjtbl4y
>
>
>
>
>
>
> On Tue, Nov 6, 2012 at 3:59 AM, Edison Su <Ed...@citrix.com> wrote:
>
>> I don't the deb build on master will work, as we moved build system from
>> ant to maven, the artifacts build by maven is quite different from
>> ant(regarding to the path). You can find the discussion about the build
>> system in the following the mail threads:
>> http://markmail.org/message/lsjigqvnbkjtbl4y
>> http://markmail.org/message/utce4esqjl7xhwr4
>>
>> -----Original Message-----
>> From: Dave Cahill [mailto:dcahill@midokura.jp]
>> Sent: Monday, November 05, 2012 1:13 AM
>> To: cloudstack-dev@incubator.apache.org
>> Subject: Proposed fixes for debian package building process
>>
>> Hi,
>>
>> There appear to be some errors in the debian package building process; I'd
>> like to double-check my approach for fixing them.
>>
>> The wiki [1] gives the procedure for building debian packages as:
>> mvn install -P deps && dpkg-buildpackage
>>
>> However, mvn install -P deps fails with:
>>
>> [ERROR] Failed to execute goal on project cloud-deps: Could not resolve
>> dependencies for project
>> org.apache.cloudstack:cloud-deps:jar:4.1.0-SNAPSHOT: Could not find
>> artifact org.apache.cloudstack:cloud-awsapi:jar:4.1.0-SNAPSHOT in
>> apache.snapshots (http://repository.apache.org/snapshots) -> [Help 1]
>>
>> The reason for this failure seems to be this section of deps/pom.xml:
>>      <dependency>
>>        <groupId>org.apache.cloudstack</groupId>
>>        <artifactId>cloud-awsapi</artifactId>
>>        <version>${project.version}</version>
>>      </dependency>
>>
>> ${project.version} is 4.1.0-SNAPSHOT, however looking at
>> https://repository.apache.org/content/groups/snapshots/org/apache/cloudstack/cloud-awsapi/
>> ,
>> I only see 4.0.0-SNAPSHOT.
>>
>> If I replace ${project.version} for cloud-awsapi in deps/pom.xml with a
>> hardcoded "4.0.0-SNAPSHOT", mvn -P deps succeeds. An alternative fix would
>> be if 4.1.0-SNAPSHOT version of cloud-awsapi was available on
>> repository.apache.org.
>>
>> I also found that in order for dpkg-buildpackage to succeed, I needed to
>> run "mvn install -P deps -pl deps" rather than just "mvn install -P deps".
>>
>> For reference, if you run dpkg-buildpackages without running "mvn -P
>> deps", the error returned is:
>> /PATH/incubator-cloudstack/build/build-aws-api.xml:34: taskdef class
>> org.apache.axis2.tool.ant.AntCodegenTask cannot be found
>>
>> Lastly, I would have expected "mvn clean" to remove the .jars in the deps
>> folder, however it does not - this made debugging "interesting"!
>>
>> Proposed changes:
>> * Hardcode 4.0.0-SNAPSHOT as the version of cloud-awsapi in deps/poms.xml
>> * Change the wiki to reflect the fact that "mvn install -P deps -pl deps"
>> needs to be run when building debian packages
>> * Change mvn clean to remove the jars from the deps folder
>>
>> Please let me know if those changes make sense, or if I'm missing
>> something. If they look OK, I'll create a patch and submit.
>>
>> Thanks,
>> Dave.
>>
>> [1]
>>
>> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+with+Maven#BuildingwithMaven-BuildingCloudStack
>>
>
>
>

Re: Proposed fixes for debian package building process

Posted by Dave Cahill <dc...@midokura.jp>.
Hi Rohit,

> mvn -P deps is for the old ant system, for master we've deprecated ant.
> That brings us the questions, should we do something about the ant xmls
and deprecated code?

My initial thought was that it makes sense to remove the deprecated code.

However, so far, the only way I have been able to get a working CloudStack
setup using the master branch, Ubuntu and KVM was to hack mvn -P deps to
work and then run dpkg-buildpackage (as per description above). Until we
have instructions on another method to get an agent running using that
configuration, I'd prefer to leave the deprecated options in.

Thanks,
Dave.




On Wed, Nov 7, 2012 at 2:37 PM, Rohit Yadav <ro...@citrix.com> wrote:

>
> On 06-Nov-2012, at 8:36 AM, Dave Cahill <dc...@midokura.jp> wrote:
>
> > Hi Edison,
> >
> > Understood - sounds like .deb package building is not supposed to work on
> > master.
> >
> > Do you know if anyone is working on making .deb building work using maven
> > on master? From the first thread you linked [1], it sounded like Noa
> Resare
> > at Spotify might start working on it, but I don't see any activity after
> > that. The wiki mentions this branch in relation to getting debs / maven
> > working, but it doesn't seem to have been updated in a month:
> > https://github.com/bhaisaab/incubator-cloudstack/tree/debs-maven
>
> Yes that's my personal branch. I initially proposed and got the debian
> packaging working using maven plugin, but it never got through so I stopped
> working on that tree. We will be most probably using debian control files
> for packaging, as Wido suggested he will take a lead on that as soon as
> he's available.
>
> But, if you need it soon why not please help us fix this; patches welcome!
>
> >
> > If no-one is working on .deb package building, is there an alternative
> way
> > to keep developing on master with debian / Ubuntu? I can easily run the
> > management server from source ("mvn -pl :cloud-client-ui jetty:run"), but
> > running the agent from source is a bit messier, as the management server
> > needs to SSH into the host and run the agent via the init script ("sudo
> > service cloud-agent start").
> >
> > I should also mention that by fixing the "mvn -P deps -pl deps" issue I
> > mentioned above, I was able to run dpkg-buildpackage successfully,
> install
> > the resultant .debs successfully on an Ubuntu 12.04 machine, and get a
> > basic CloudStack setup (2 guest VMs, basic networking) working that way.
> If
> > building that way results in .debs which shouldn't work, should we remove
> > some of the broken options (e.g. the maven "deps" profile) from master to
> > avoid confusion?
>
> mvn -P deps is for the old ant system, for master we've deprecated ant.
> That brings us the questions, should we do something about the ant xmls
> and deprecated code?
>
> Regards.
>
> >
> > Any input appreciated.
> >
> > Thanks,
> > Dave.
> >
> >
> > [1] http://markmail.org/message/lsjigqvnbkjtbl4y
> >
> >
> >
> >
> >
> >
> > On Tue, Nov 6, 2012 at 3:59 AM, Edison Su <Ed...@citrix.com> wrote:
> >
> >> I don't the deb build on master will work, as we moved build system from
> >> ant to maven, the artifacts build by maven is quite different from
> >> ant(regarding to the path). You can find the discussion about the build
> >> system in the following the mail threads:
> >> http://markmail.org/message/lsjigqvnbkjtbl4y
> >> http://markmail.org/message/utce4esqjl7xhwr4
> >>
> >> -----Original Message-----
> >> From: Dave Cahill [mailto:dcahill@midokura.jp]
> >> Sent: Monday, November 05, 2012 1:13 AM
> >> To: cloudstack-dev@incubator.apache.org
> >> Subject: Proposed fixes for debian package building process
> >>
> >> Hi,
> >>
> >> There appear to be some errors in the debian package building process;
> I'd
> >> like to double-check my approach for fixing them.
> >>
> >> The wiki [1] gives the procedure for building debian packages as:
> >> mvn install -P deps && dpkg-buildpackage
> >>
> >> However, mvn install -P deps fails with:
> >>
> >> [ERROR] Failed to execute goal on project cloud-deps: Could not resolve
> >> dependencies for project
> >> org.apache.cloudstack:cloud-deps:jar:4.1.0-SNAPSHOT: Could not find
> >> artifact org.apache.cloudstack:cloud-awsapi:jar:4.1.0-SNAPSHOT in
> >> apache.snapshots (http://repository.apache.org/snapshots) -> [Help 1]
> >>
> >> The reason for this failure seems to be this section of deps/pom.xml:
> >>    <dependency>
> >>      <groupId>org.apache.cloudstack</groupId>
> >>      <artifactId>cloud-awsapi</artifactId>
> >>      <version>${project.version}</version>
> >>    </dependency>
> >>
> >> ${project.version} is 4.1.0-SNAPSHOT, however looking at
> >>
> https://repository.apache.org/content/groups/snapshots/org/apache/cloudstack/cloud-awsapi/
> >> ,
> >> I only see 4.0.0-SNAPSHOT.
> >>
> >> If I replace ${project.version} for cloud-awsapi in deps/pom.xml with a
> >> hardcoded "4.0.0-SNAPSHOT", mvn -P deps succeeds. An alternative fix
> would
> >> be if 4.1.0-SNAPSHOT version of cloud-awsapi was available on
> >> repository.apache.org.
> >>
> >> I also found that in order for dpkg-buildpackage to succeed, I needed to
> >> run "mvn install -P deps -pl deps" rather than just "mvn install -P
> deps".
> >>
> >> For reference, if you run dpkg-buildpackages without running "mvn -P
> >> deps", the error returned is:
> >> /PATH/incubator-cloudstack/build/build-aws-api.xml:34: taskdef class
> >> org.apache.axis2.tool.ant.AntCodegenTask cannot be found
> >>
> >> Lastly, I would have expected "mvn clean" to remove the .jars in the
> deps
> >> folder, however it does not - this made debugging "interesting"!
> >>
> >> Proposed changes:
> >> * Hardcode 4.0.0-SNAPSHOT as the version of cloud-awsapi in
> deps/poms.xml
> >> * Change the wiki to reflect the fact that "mvn install -P deps -pl
> deps"
> >> needs to be run when building debian packages
> >> * Change mvn clean to remove the jars from the deps folder
> >>
> >> Please let me know if those changes make sense, or if I'm missing
> >> something. If they look OK, I'll create a patch and submit.
> >>
> >> Thanks,
> >> Dave.
> >>
> >> [1]
> >>
> >>
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+with+Maven#BuildingwithMaven-BuildingCloudStack
> >>
> >
> >
> >
> > --
> > Thanks,
> > Dave.
>
>


-- 
Thanks,
Dave.

Re: Proposed fixes for debian package building process

Posted by Rohit Yadav <ro...@citrix.com>.
On 06-Nov-2012, at 8:36 AM, Dave Cahill <dc...@midokura.jp> wrote:

> Hi Edison,
> 
> Understood - sounds like .deb package building is not supposed to work on
> master.
> 
> Do you know if anyone is working on making .deb building work using maven
> on master? From the first thread you linked [1], it sounded like Noa Resare
> at Spotify might start working on it, but I don't see any activity after
> that. The wiki mentions this branch in relation to getting debs / maven
> working, but it doesn't seem to have been updated in a month:
> https://github.com/bhaisaab/incubator-cloudstack/tree/debs-maven

Yes that's my personal branch. I initially proposed and got the debian packaging working using maven plugin, but it never got through so I stopped working on that tree. We will be most probably using debian control files for packaging, as Wido suggested he will take a lead on that as soon as he's available.

But, if you need it soon why not please help us fix this; patches welcome!

> 
> If no-one is working on .deb package building, is there an alternative way
> to keep developing on master with debian / Ubuntu? I can easily run the
> management server from source ("mvn -pl :cloud-client-ui jetty:run"), but
> running the agent from source is a bit messier, as the management server
> needs to SSH into the host and run the agent via the init script ("sudo
> service cloud-agent start").
> 
> I should also mention that by fixing the "mvn -P deps -pl deps" issue I
> mentioned above, I was able to run dpkg-buildpackage successfully, install
> the resultant .debs successfully on an Ubuntu 12.04 machine, and get a
> basic CloudStack setup (2 guest VMs, basic networking) working that way. If
> building that way results in .debs which shouldn't work, should we remove
> some of the broken options (e.g. the maven "deps" profile) from master to
> avoid confusion?

mvn -P deps is for the old ant system, for master we've deprecated ant.
That brings us the questions, should we do something about the ant xmls and deprecated code?

Regards.

> 
> Any input appreciated.
> 
> Thanks,
> Dave.
> 
> 
> [1] http://markmail.org/message/lsjigqvnbkjtbl4y
> 
> 
> 
> 
> 
> 
> On Tue, Nov 6, 2012 at 3:59 AM, Edison Su <Ed...@citrix.com> wrote:
> 
>> I don't the deb build on master will work, as we moved build system from
>> ant to maven, the artifacts build by maven is quite different from
>> ant(regarding to the path). You can find the discussion about the build
>> system in the following the mail threads:
>> http://markmail.org/message/lsjigqvnbkjtbl4y
>> http://markmail.org/message/utce4esqjl7xhwr4
>> 
>> -----Original Message-----
>> From: Dave Cahill [mailto:dcahill@midokura.jp]
>> Sent: Monday, November 05, 2012 1:13 AM
>> To: cloudstack-dev@incubator.apache.org
>> Subject: Proposed fixes for debian package building process
>> 
>> Hi,
>> 
>> There appear to be some errors in the debian package building process; I'd
>> like to double-check my approach for fixing them.
>> 
>> The wiki [1] gives the procedure for building debian packages as:
>> mvn install -P deps && dpkg-buildpackage
>> 
>> However, mvn install -P deps fails with:
>> 
>> [ERROR] Failed to execute goal on project cloud-deps: Could not resolve
>> dependencies for project
>> org.apache.cloudstack:cloud-deps:jar:4.1.0-SNAPSHOT: Could not find
>> artifact org.apache.cloudstack:cloud-awsapi:jar:4.1.0-SNAPSHOT in
>> apache.snapshots (http://repository.apache.org/snapshots) -> [Help 1]
>> 
>> The reason for this failure seems to be this section of deps/pom.xml:
>>    <dependency>
>>      <groupId>org.apache.cloudstack</groupId>
>>      <artifactId>cloud-awsapi</artifactId>
>>      <version>${project.version}</version>
>>    </dependency>
>> 
>> ${project.version} is 4.1.0-SNAPSHOT, however looking at
>> https://repository.apache.org/content/groups/snapshots/org/apache/cloudstack/cloud-awsapi/
>> ,
>> I only see 4.0.0-SNAPSHOT.
>> 
>> If I replace ${project.version} for cloud-awsapi in deps/pom.xml with a
>> hardcoded "4.0.0-SNAPSHOT", mvn -P deps succeeds. An alternative fix would
>> be if 4.1.0-SNAPSHOT version of cloud-awsapi was available on
>> repository.apache.org.
>> 
>> I also found that in order for dpkg-buildpackage to succeed, I needed to
>> run "mvn install -P deps -pl deps" rather than just "mvn install -P deps".
>> 
>> For reference, if you run dpkg-buildpackages without running "mvn -P
>> deps", the error returned is:
>> /PATH/incubator-cloudstack/build/build-aws-api.xml:34: taskdef class
>> org.apache.axis2.tool.ant.AntCodegenTask cannot be found
>> 
>> Lastly, I would have expected "mvn clean" to remove the .jars in the deps
>> folder, however it does not - this made debugging "interesting"!
>> 
>> Proposed changes:
>> * Hardcode 4.0.0-SNAPSHOT as the version of cloud-awsapi in deps/poms.xml
>> * Change the wiki to reflect the fact that "mvn install -P deps -pl deps"
>> needs to be run when building debian packages
>> * Change mvn clean to remove the jars from the deps folder
>> 
>> Please let me know if those changes make sense, or if I'm missing
>> something. If they look OK, I'll create a patch and submit.
>> 
>> Thanks,
>> Dave.
>> 
>> [1]
>> 
>> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+with+Maven#BuildingwithMaven-BuildingCloudStack
>> 
> 
> 
> 
> -- 
> Thanks,
> Dave.


Re: Proposed fixes for debian package building process

Posted by Dave Cahill <dc...@midokura.jp>.
Hi Edison,

Understood - sounds like .deb package building is not supposed to work on
master.

Do you know if anyone is working on making .deb building work using maven
on master? From the first thread you linked [1], it sounded like Noa Resare
at Spotify might start working on it, but I don't see any activity after
that. The wiki mentions this branch in relation to getting debs / maven
working, but it doesn't seem to have been updated in a month:
https://github.com/bhaisaab/incubator-cloudstack/tree/debs-maven

If no-one is working on .deb package building, is there an alternative way
to keep developing on master with debian / Ubuntu? I can easily run the
management server from source ("mvn -pl :cloud-client-ui jetty:run"), but
running the agent from source is a bit messier, as the management server
needs to SSH into the host and run the agent via the init script ("sudo
service cloud-agent start").

I should also mention that by fixing the "mvn -P deps -pl deps" issue I
mentioned above, I was able to run dpkg-buildpackage successfully, install
the resultant .debs successfully on an Ubuntu 12.04 machine, and get a
basic CloudStack setup (2 guest VMs, basic networking) working that way. If
building that way results in .debs which shouldn't work, should we remove
some of the broken options (e.g. the maven "deps" profile) from master to
avoid confusion?

Any input appreciated.

Thanks,
Dave.


[1] http://markmail.org/message/lsjigqvnbkjtbl4y






On Tue, Nov 6, 2012 at 3:59 AM, Edison Su <Ed...@citrix.com> wrote:

> I don't the deb build on master will work, as we moved build system from
> ant to maven, the artifacts build by maven is quite different from
> ant(regarding to the path). You can find the discussion about the build
> system in the following the mail threads:
> http://markmail.org/message/lsjigqvnbkjtbl4y
> http://markmail.org/message/utce4esqjl7xhwr4
>
> -----Original Message-----
> From: Dave Cahill [mailto:dcahill@midokura.jp]
> Sent: Monday, November 05, 2012 1:13 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: Proposed fixes for debian package building process
>
> Hi,
>
> There appear to be some errors in the debian package building process; I'd
> like to double-check my approach for fixing them.
>
> The wiki [1] gives the procedure for building debian packages as:
> mvn install -P deps && dpkg-buildpackage
>
> However, mvn install -P deps fails with:
>
> [ERROR] Failed to execute goal on project cloud-deps: Could not resolve
> dependencies for project
> org.apache.cloudstack:cloud-deps:jar:4.1.0-SNAPSHOT: Could not find
> artifact org.apache.cloudstack:cloud-awsapi:jar:4.1.0-SNAPSHOT in
> apache.snapshots (http://repository.apache.org/snapshots) -> [Help 1]
>
> The reason for this failure seems to be this section of deps/pom.xml:
>     <dependency>
>       <groupId>org.apache.cloudstack</groupId>
>       <artifactId>cloud-awsapi</artifactId>
>       <version>${project.version}</version>
>     </dependency>
>
> ${project.version} is 4.1.0-SNAPSHOT, however looking at
> https://repository.apache.org/content/groups/snapshots/org/apache/cloudstack/cloud-awsapi/
> ,
> I only see 4.0.0-SNAPSHOT.
>
> If I replace ${project.version} for cloud-awsapi in deps/pom.xml with a
> hardcoded "4.0.0-SNAPSHOT", mvn -P deps succeeds. An alternative fix would
> be if 4.1.0-SNAPSHOT version of cloud-awsapi was available on
> repository.apache.org.
>
> I also found that in order for dpkg-buildpackage to succeed, I needed to
> run "mvn install -P deps -pl deps" rather than just "mvn install -P deps".
>
> For reference, if you run dpkg-buildpackages without running "mvn -P
> deps", the error returned is:
> /PATH/incubator-cloudstack/build/build-aws-api.xml:34: taskdef class
> org.apache.axis2.tool.ant.AntCodegenTask cannot be found
>
> Lastly, I would have expected "mvn clean" to remove the .jars in the deps
> folder, however it does not - this made debugging "interesting"!
>
> Proposed changes:
> * Hardcode 4.0.0-SNAPSHOT as the version of cloud-awsapi in deps/poms.xml
> * Change the wiki to reflect the fact that "mvn install -P deps -pl deps"
> needs to be run when building debian packages
> * Change mvn clean to remove the jars from the deps folder
>
> Please let me know if those changes make sense, or if I'm missing
> something. If they look OK, I'll create a patch and submit.
>
> Thanks,
> Dave.
>
> [1]
>
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+with+Maven#BuildingwithMaven-BuildingCloudStack
>



-- 
Thanks,
Dave.

RE: Proposed fixes for debian package building process

Posted by Edison Su <Ed...@citrix.com>.
I don't the deb build on master will work, as we moved build system from ant to maven, the artifacts build by maven is quite different from ant(regarding to the path). You can find the discussion about the build system in the following the mail threads:
http://markmail.org/message/lsjigqvnbkjtbl4y
http://markmail.org/message/utce4esqjl7xhwr4

-----Original Message-----
From: Dave Cahill [mailto:dcahill@midokura.jp] 
Sent: Monday, November 05, 2012 1:13 AM
To: cloudstack-dev@incubator.apache.org
Subject: Proposed fixes for debian package building process

Hi,

There appear to be some errors in the debian package building process; I'd like to double-check my approach for fixing them.

The wiki [1] gives the procedure for building debian packages as:
mvn install -P deps && dpkg-buildpackage

However, mvn install -P deps fails with:

[ERROR] Failed to execute goal on project cloud-deps: Could not resolve dependencies for project
org.apache.cloudstack:cloud-deps:jar:4.1.0-SNAPSHOT: Could not find artifact org.apache.cloudstack:cloud-awsapi:jar:4.1.0-SNAPSHOT in apache.snapshots (http://repository.apache.org/snapshots) -> [Help 1]

The reason for this failure seems to be this section of deps/pom.xml:
    <dependency>
      <groupId>org.apache.cloudstack</groupId>
      <artifactId>cloud-awsapi</artifactId>
      <version>${project.version}</version>
    </dependency>

${project.version} is 4.1.0-SNAPSHOT, however looking at https://repository.apache.org/content/groups/snapshots/org/apache/cloudstack/cloud-awsapi/,
I only see 4.0.0-SNAPSHOT.

If I replace ${project.version} for cloud-awsapi in deps/pom.xml with a hardcoded "4.0.0-SNAPSHOT", mvn -P deps succeeds. An alternative fix would be if 4.1.0-SNAPSHOT version of cloud-awsapi was available on repository.apache.org.

I also found that in order for dpkg-buildpackage to succeed, I needed to run "mvn install -P deps -pl deps" rather than just "mvn install -P deps".

For reference, if you run dpkg-buildpackages without running "mvn -P deps", the error returned is:
/PATH/incubator-cloudstack/build/build-aws-api.xml:34: taskdef class org.apache.axis2.tool.ant.AntCodegenTask cannot be found

Lastly, I would have expected "mvn clean" to remove the .jars in the deps folder, however it does not - this made debugging "interesting"!

Proposed changes:
* Hardcode 4.0.0-SNAPSHOT as the version of cloud-awsapi in deps/poms.xml
* Change the wiki to reflect the fact that "mvn install -P deps -pl deps"
needs to be run when building debian packages
* Change mvn clean to remove the jars from the deps folder

Please let me know if those changes make sense, or if I'm missing something. If they look OK, I'll create a patch and submit.

Thanks,
Dave.

[1]
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+with+Maven#BuildingwithMaven-BuildingCloudStack