Thank you guys! I think I'm getting closer. I should have explained that I wanted to create a UI plugin. If I keep the jetty server running and in another tab I type:
mvn clean install -pl client then it takes like 20 seconds and I can see the changes. This is because the UI plugins are in the "client" project. I was also following the indication regarding the generated-webapp: vi client/target/generated-webapp/plugins/testPlugin/testPlugin.js Although I change something in the .js file, the changes are not shown when I hit F5. Any ideas why? I also copied everything with cp -rf ui/* client/target/generated-webapp/ but nothing happens. Thanks! On Fri, Dec 12, 2014 at 4:20 PM, Rohit Yadav <rohit.ya...@shapeblue.com> wrote: > > Hi Ramzi, > > On Friday 12 December 2014 08:12 PM, Ramzi Youssefi wrote: > >> Hi Rohit, >> >> thanks for your email! >> that is exactly what I need! >> I just want to make sure that I understood what you wrote: >> Once I deploy the project, I need to run it with: >> >> mvn -pl client jetty:run >> >> After I did a change, I need to "stop it" maybe? and then run it again >> with: >> >> mvn clean install -pl ui/plugins/testPlugin/testPlugin.js, client >> > > The clean install command is for building cloudstack, the jetty one is > for running the mgmt server. A typical development cycle looks like this; > > 1. You make changes for the first time, build the entire codebase once: > mvn clean install -P developer,systemvm (add a -D noredist if you're > working on non-oss components or -Dsimulator if you want to run > simulator too) > > 2. You run mgmt server: > > mvn -pl client jetty:run > > 3. Now, you make minor/major changes to say a plugin or few components, > you need to stop jetty either by Ctrl+C (break the process or 2) or by; > mvn -pl client jetty:stop > > 4. Next, you need to rebuilt so as to test those changes; > > mvn clean install -pl <path to plugin1>,<comma separated paths to other > components>,client > > 5. Run jetty again > > Refer: > https://cwiki.apache.org/confluence/display/CLOUDSTACK/ > How+to+build+CloudStack > > In case of UI, as Gabor mentioned you may edit directly edit the UI from > client/target/generated-webapp or use something like Chrome > source/inspector to make changes and test it. That's another way to > cheat without building. > > >> or >> >> mvn clean install -pl ui/plugins/testPlugin, client >> >> I tried both ways and I get the following error: >> >> [ERROR] Could not find the selected project in the reactor: ui/plugins -> >> [Help 1] >> >> Thanks again! >> >> On Fri, Dec 12, 2014 at 3:04 PM, Rohit Yadav <rohit.ya...@shapeblue.com> >> wrote: >> >>> >>> Hi Ramzi, >>> >>> On Friday 12 December 2014 07:20 PM, Ramzi Youssefi wrote: >>> >>> Hi! >>>> >>>> I would like to ask how to setup a proper development environment in >>>> Cloudstack. Until now I have been able only to download CS from git >>>> cloudstack and deploy it with maven. Once I run jetty:run, I can see CS >>>> in >>>> the browser. I even can do this with eclipse. >>>> >>>> >>> https://cwiki.apache.org/confluence/display/CLOUDSTACK/ >>> Setting+up+CloudStack+Development+Environment >>> >>> The thing is that I want to create a plugin in Cloudstack. There are >>> many >>> >>>> tutorials on how to do that but the thing is that every time I create >>>> something, I need to re-deploy everything again and it takes at least 5 >>>> minutes to run the maven commands and see the changes. >>>> >>>> Is there any way to develop the plugins or to do changes in the code "on >>>> the fly"? so I can type something and press F5 in my browser and see the >>>> changes immediately? What is the right project that I have to download >>>> to >>>> do this? >>>> >>>> >>> If you make change to your plugin or any other component you don't have >>> to build the entire codebase since that takes a lot of time. Instead do >>> this; >>> >>> mvn clean install -pl <path to your plugin>, client >>> >>> this will only build the plugin and rebuilt client which is where all >>> plugins and dependencies get compiled in a war file (the mgmt server). >>> >>> -- >>> Regards, >>> Rohit Yadav >>> Software Architect, ShapeBlue >>> M. +91 8826230892 | rohit.ya...@shapeblue.com >>> Blog: bhaisaab.org | Twitter: @_bhaisaab >>> PS. If you see any footer below, I did not add it :) >>> Find out more about ShapeBlue and our range of CloudStack related >>> services >>> >>> IaaS Cloud Design & Build<http://shapeblue.com/ >>> iaas-cloud-design-and-build//> >>> CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/> >>> CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/> >>> CloudStack Software Engineering<http://shapeblue. >>> com/cloudstack-software- >>> engineering/> >>> CloudStack Infrastructure Support<http://shapeblue.com/ >>> cloudstack-infrastructure-support/> >>> CloudStack Bootcamp Training Courses<http://shapeblue.com/ >>> cloudstack-training/> >>> >>> This email and any attachments to it may be confidential and are intended >>> solely for the use of the individual to whom it is addressed. Any views >>> or >>> opinions expressed are solely those of the author and do not necessarily >>> represent those of Shape Blue Ltd or related companies. If you are not >>> the >>> intended recipient of this email, you must neither take any action based >>> upon its contents, nor copy or show it to anyone. Please contact the >>> sender >>> if you believe you have received this email in error. Shape Blue Ltd is a >>> company incorporated in England & Wales. ShapeBlue Services India LLP is >>> a >>> company incorporated in India and is operated under license from Shape >>> Blue >>> Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in >>> Brasil >>> and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd >>> is >>> a company registered by The Republic of South Africa and is traded under >>> license from Shape Blue Ltd. ShapeBlue is a registered trademark. >>> >>> >> >> > -- > Regards, > Rohit Yadav > Software Architect, ShapeBlue > M. +91 8826230892 | rohit.ya...@shapeblue.com > Blog: bhaisaab.org | Twitter: @_bhaisaab > PS. If you see any footer below, I did not add it :) > Find out more about ShapeBlue and our range of CloudStack related services > > IaaS Cloud Design & Build<http://shapeblue.com/ > iaas-cloud-design-and-build//> > CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/> > CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/> > CloudStack Software Engineering<http://shapeblue.com/cloudstack-software- > engineering/> > CloudStack Infrastructure Support<http://shapeblue.com/ > cloudstack-infrastructure-support/> > CloudStack Bootcamp Training Courses<http://shapeblue.com/ > cloudstack-training/> > > This email and any attachments to it may be confidential and are intended > solely for the use of the individual to whom it is addressed. Any views or > opinions expressed are solely those of the author and do not necessarily > represent those of Shape Blue Ltd or related companies. If you are not the > intended recipient of this email, you must neither take any action based > upon its contents, nor copy or show it to anyone. Please contact the sender > if you believe you have received this email in error. Shape Blue Ltd is a > company incorporated in England & Wales. ShapeBlue Services India LLP is a > company incorporated in India and is operated under license from Shape Blue > Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil > and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is > a company registered by The Republic of South Africa and is traded under > license from Shape Blue Ltd. ShapeBlue is a registered trademark. > -- Ramzi Youssefi Görlitzer Str. 49 01099 Dresden, Germany. Cell: +49 173 1965465 Email: ryouss...@gmail.com