You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Darren Shepherd <da...@godaddy.com> on 2012/08/28 22:12:32 UTC

maven: latest patches and how to setup Eclipse/M2E/Jetty

For whatever reason, my patches on review board never seem to work.  I
just do "git format-patch --stdout origin/master" but then review board
just throws an error when I upload the patch.  Regardless, can a
committer pull the branch "maven-final" from
https://github.com/ibuildthecloud/incubator-cloudstack.git and merge to
master?

Included in the branch is the following:


* Add resources to jars - There was a bunch of random files like
keystores and such that were missing from the maven built jars

* Added profiles for non-oss stuff - The following maven profiles are
available to build the non-oss stuff: kvm, f5, netscaler, srx, netapp,
vmware.  To include those components in the build just put
"-Pvmware,kvm" or whatever component you want.  You can also do "mvn
-Dnonoss=true" to include all of them.

* Added deps/install-non-oss.sh - This script will install the nonoss
jars into your local repo so that you don't have to use my private repo
anymore

* jetty:run support and a corresponding Eclipse launch config - This
feature is really, really convenient for development.  Refer to below
for more info.


If you want to setup your development environment to be based on Eclipse
and Maven and not the ant stuff then do the following (after you have
pulled my changes):

1. If you have existing Eclipse projects, delete them all.
2. Delete all .classpath, .project, and .settings files (ie "find .
-name .classpath -o -name .project -o -name .settings -exec rm -rf {} \;
-print" )
3. Install M2E Eclipse.  If your running Indigo or Juno M2E is an
official Eclipse foundation project.  If your running Helios or older
its a separate plugin that google knows the location of (but honestly
just upgrade to Indigo.  Not Juno, I've found it to be really slow).  So
in Indigo/Juno just go to Help->Install New Software and put m2e in the
filter and you'll find it.
4. Go to File->Import and then Import Existing *Maven* Project.  Select
the root of the git repo and it will find a bunch of projects.  Import
and then let maven download the internet and compile everything.  First
run will be very slow, but then fast thereafter.

You should now have all your compiling cloudstack projects.  If you get
issues regarding compiling the vmware, f5, then run
deps/install-non-oss.sh to install the non-oss stuff.  Now the awesome
part (assuming the previous steps worked).

5. Go back to File->Import, Import Existing *Maven* Project and select
the {git.root}/client folder and import.
6. Go to Run->Debug Configurations... on the left you should see Maven
Build-> cloudstack-ui.  Click that and magic will ensue.  That will run
cloudstack in a jetty instance which should be accessible at
http://localhost:8080/client.  So now you can just edit code and click
run and it will launch it in Eclipse with debugging and all the
hotswapping magic the JVM provides.  It assumes your DB is at localhost.
 If your DB is elsewhere, then edit ${git.root}/build/replace.properties
appropriately.

Adios,
Darren








Re: maven: latest patches and how to setup Eclipse/M2E/Jetty

Posted by Olivier Lamy <ol...@apache.org>.
merged.
Added configuration for using tomcat maven plugin too.
from README.md:

to run webapp client:
mvn org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-beta-1:run -pl
:cloud-client-ui -am
then hit: http://localhost:8080/cloud-client-ui/
or add in your ~/.m2/settings.xml
  <pluginGroups>
    <pluginGroup>org.apache.tomcat.maven</pluginGroup>
  </pluginGroups>
and save your fingers with mvn tomcat7:run -pl :cloud-client-ui -am


2012/8/28 Olivier Lamy <ol...@apache.org>:
> Hi,
> I will take care of that.
>
> 2012/8/28 Darren Shepherd <da...@godaddy.com>:
>>
>> For whatever reason, my patches on review board never seem to work.  I
>> just do "git format-patch --stdout origin/master" but then review board
>> just throws an error when I upload the patch.  Regardless, can a
>> committer pull the branch "maven-final" from
>> https://github.com/ibuildthecloud/incubator-cloudstack.git and merge to
>> master?
>>
>> Included in the branch is the following:
>>
>>
>> * Add resources to jars - There was a bunch of random files like
>> keystores and such that were missing from the maven built jars
>>
>> * Added profiles for non-oss stuff - The following maven profiles are
>> available to build the non-oss stuff: kvm, f5, netscaler, srx, netapp,
>> vmware.  To include those components in the build just put
>> "-Pvmware,kvm" or whatever component you want.  You can also do "mvn
>> -Dnonoss=true" to include all of them.
>>
>> * Added deps/install-non-oss.sh - This script will install the nonoss
>> jars into your local repo so that you don't have to use my private repo
>> anymore
>>
>> * jetty:run support and a corresponding Eclipse launch config - This
>> feature is really, really convenient for development.  Refer to below
>> for more info.
>>
>>
>> If you want to setup your development environment to be based on Eclipse
>> and Maven and not the ant stuff then do the following (after you have
>> pulled my changes):
>>
>> 1. If you have existing Eclipse projects, delete them all.
>> 2. Delete all .classpath, .project, and .settings files (ie "find .
>> -name .classpath -o -name .project -o -name .settings -exec rm -rf {} \;
>> -print" )
>> 3. Install M2E Eclipse.  If your running Indigo or Juno M2E is an
>> official Eclipse foundation project.  If your running Helios or older
>> its a separate plugin that google knows the location of (but honestly
>> just upgrade to Indigo.  Not Juno, I've found it to be really slow).  So
>> in Indigo/Juno just go to Help->Install New Software and put m2e in the
>> filter and you'll find it.
>> 4. Go to File->Import and then Import Existing *Maven* Project.  Select
>> the root of the git repo and it will find a bunch of projects.  Import
>> and then let maven download the internet and compile everything.  First
>> run will be very slow, but then fast thereafter.
>>
>> You should now have all your compiling cloudstack projects.  If you get
>> issues regarding compiling the vmware, f5, then run
>> deps/install-non-oss.sh to install the non-oss stuff.  Now the awesome
>> part (assuming the previous steps worked).
>>
>> 5. Go back to File->Import, Import Existing *Maven* Project and select
>> the {git.root}/client folder and import.
>> 6. Go to Run->Debug Configurations... on the left you should see Maven
>> Build-> cloudstack-ui.  Click that and magic will ensue.  That will run
>> cloudstack in a jetty instance which should be accessible at
>> http://localhost:8080/client.  So now you can just edit code and click
>> run and it will launch it in Eclipse with debugging and all the
>> hotswapping magic the JVM provides.  It assumes your DB is at localhost.
>>  If your DB is elsewhere, then edit ${git.root}/build/replace.properties
>> appropriately.
>>
>> Adios,
>> Darren
>>
>>
>>
>>
>>
>>
>>
>
>
>
> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

Re: maven: latest patches and how to setup Eclipse/M2E/Jetty

Posted by Olivier Lamy <ol...@apache.org>.
Hi,
I will take care of that.

2012/8/28 Darren Shepherd <da...@godaddy.com>:
>
> For whatever reason, my patches on review board never seem to work.  I
> just do "git format-patch --stdout origin/master" but then review board
> just throws an error when I upload the patch.  Regardless, can a
> committer pull the branch "maven-final" from
> https://github.com/ibuildthecloud/incubator-cloudstack.git and merge to
> master?
>
> Included in the branch is the following:
>
>
> * Add resources to jars - There was a bunch of random files like
> keystores and such that were missing from the maven built jars
>
> * Added profiles for non-oss stuff - The following maven profiles are
> available to build the non-oss stuff: kvm, f5, netscaler, srx, netapp,
> vmware.  To include those components in the build just put
> "-Pvmware,kvm" or whatever component you want.  You can also do "mvn
> -Dnonoss=true" to include all of them.
>
> * Added deps/install-non-oss.sh - This script will install the nonoss
> jars into your local repo so that you don't have to use my private repo
> anymore
>
> * jetty:run support and a corresponding Eclipse launch config - This
> feature is really, really convenient for development.  Refer to below
> for more info.
>
>
> If you want to setup your development environment to be based on Eclipse
> and Maven and not the ant stuff then do the following (after you have
> pulled my changes):
>
> 1. If you have existing Eclipse projects, delete them all.
> 2. Delete all .classpath, .project, and .settings files (ie "find .
> -name .classpath -o -name .project -o -name .settings -exec rm -rf {} \;
> -print" )
> 3. Install M2E Eclipse.  If your running Indigo or Juno M2E is an
> official Eclipse foundation project.  If your running Helios or older
> its a separate plugin that google knows the location of (but honestly
> just upgrade to Indigo.  Not Juno, I've found it to be really slow).  So
> in Indigo/Juno just go to Help->Install New Software and put m2e in the
> filter and you'll find it.
> 4. Go to File->Import and then Import Existing *Maven* Project.  Select
> the root of the git repo and it will find a bunch of projects.  Import
> and then let maven download the internet and compile everything.  First
> run will be very slow, but then fast thereafter.
>
> You should now have all your compiling cloudstack projects.  If you get
> issues regarding compiling the vmware, f5, then run
> deps/install-non-oss.sh to install the non-oss stuff.  Now the awesome
> part (assuming the previous steps worked).
>
> 5. Go back to File->Import, Import Existing *Maven* Project and select
> the {git.root}/client folder and import.
> 6. Go to Run->Debug Configurations... on the left you should see Maven
> Build-> cloudstack-ui.  Click that and magic will ensue.  That will run
> cloudstack in a jetty instance which should be accessible at
> http://localhost:8080/client.  So now you can just edit code and click
> run and it will launch it in Eclipse with debugging and all the
> hotswapping magic the JVM provides.  It assumes your DB is at localhost.
>  If your DB is elsewhere, then edit ${git.root}/build/replace.properties
> appropriately.
>
> Adios,
> Darren
>
>
>
>
>
>
>



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

Re: maven: latest patches and how to setup Eclipse/M2E/Jetty

Posted by Prasanna Santhanam <pr...@citrix.com>.
On Wed, Aug 29, 2012 at 05:24:04AM -0400, Olivier Lamy wrote:
> 2012/8/29 Prasanna Santhanam <pr...@citrix.com>:
> >> 4. Go to File->Import and then Import Existing *Maven* Project.  Select
> >> the root of the git repo and it will find a bunch of projects.  Import
> >> and then let maven download the internet and compile everything.  First
> >> run will be very slow, but then fast thereafter.
> >>
> >> You should now have all your compiling cloudstack projects.  If you get
> >> issues regarding compiling the vmware, f5, then run
> >> deps/install-non-oss.sh to install the non-oss stuff.  Now the awesome
> >> part (assuming the previous steps worked).
> >
> > For me - the non-oss install script isn't able to install the jars. I
> > see errors installing the related artifacts when executing
> > deps/install-non-oss.sh on latest master.
> >
> > http://paste.cloudstack.org/NhFS/
> >
> > For instance:
> >
> > [INFO] Installing /root/incubator-cloudstack/cloud-iControl.jar to /root/.m2/repository/com/cloud/com/f5/icontrol/1.0/icontrol-1.0.jar
> > [INFO] ------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO] ------------------------------------------------------------------------
> > [INFO] Error installing artifact 'com.cloud.com.f5:icontrol:jar': Error installing artifact: File /root/incubator-cloudstack/cloud-iControl.jar does not exist
> >
> > Is there something else that needs to be done?
> cd deps maybe (scripts use relative path so you must be in the deps directory)
> >

Yeah - that was it. I was able to run mvn -Dnon-oss=true however and
build suceeded. Thanks.


-- 
Prasanna.,

Re: maven: latest patches and how to setup Eclipse/M2E/Jetty

Posted by Olivier Lamy <ol...@apache.org>.
2012/8/29 Prasanna Santhanam <pr...@citrix.com>:
>> 4. Go to File->Import and then Import Existing *Maven* Project.  Select
>> the root of the git repo and it will find a bunch of projects.  Import
>> and then let maven download the internet and compile everything.  First
>> run will be very slow, but then fast thereafter.
>>
>> You should now have all your compiling cloudstack projects.  If you get
>> issues regarding compiling the vmware, f5, then run
>> deps/install-non-oss.sh to install the non-oss stuff.  Now the awesome
>> part (assuming the previous steps worked).
>
> For me - the non-oss install script isn't able to install the jars. I
> see errors installing the related artifacts when executing
> deps/install-non-oss.sh on latest master.
>
> http://paste.cloudstack.org/NhFS/
>
> For instance:
>
> [INFO] Installing /root/incubator-cloudstack/cloud-iControl.jar to /root/.m2/repository/com/cloud/com/f5/icontrol/1.0/icontrol-1.0.jar
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error installing artifact 'com.cloud.com.f5:icontrol:jar': Error installing artifact: File /root/incubator-cloudstack/cloud-iControl.jar does not exist
>
> Is there something else that needs to be done?
cd deps maybe (scripts use relative path so you must be in the deps directory)
>
> Thanks,
>
> --
> Prasanna.,



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

Re: maven: latest patches and how to setup Eclipse/M2E/Jetty

Posted by Prasanna Santhanam <pr...@citrix.com>.
> 4. Go to File->Import and then Import Existing *Maven* Project.  Select
> the root of the git repo and it will find a bunch of projects.  Import
> and then let maven download the internet and compile everything.  First
> run will be very slow, but then fast thereafter.
> 
> You should now have all your compiling cloudstack projects.  If you get
> issues regarding compiling the vmware, f5, then run
> deps/install-non-oss.sh to install the non-oss stuff.  Now the awesome
> part (assuming the previous steps worked).

For me - the non-oss install script isn't able to install the jars. I
see errors installing the related artifacts when executing
deps/install-non-oss.sh on latest master.

http://paste.cloudstack.org/NhFS/

For instance:

[INFO] Installing /root/incubator-cloudstack/cloud-iControl.jar to /root/.m2/repository/com/cloud/com/f5/icontrol/1.0/icontrol-1.0.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error installing artifact 'com.cloud.com.f5:icontrol:jar': Error installing artifact: File /root/incubator-cloudstack/cloud-iControl.jar does not exist

Is there something else that needs to be done?
 
Thanks,

-- 
Prasanna.,