On 4/26/11 5:09 PM, "Raminderjeet Singh" <[email protected]> wrote:
>Thanks Ate for making it easier for eclipse development. I am >successfully able to make everything work using your story text :). >Though i am not able to login as i am getting Your login attempt was not >successful, try again. Make sure you are using the same string for username and password ie) user:canonical pass:canonical > >Here is the additional information you may need and coping required steps >from Ate's email > >If you already have m2eclipse and imported the project without installing >m2e-extras( as i already used m2eclipse to import the project) then you >need to delete the project (do not delete content) and import it again in >eclipse. > >I just summarized the steps and added additional information. > >1. install m2eclipse and m2e-extras to eclipse following >http://m2eclipse.sonatype.org/installing-m2eclipse.html. >2 Checkout the code from SVN using command line and build it with mvn >before adding to eclipse. >3 Import rave-project as "Existing Maven Project". >4. 0pen in Eclipse the rave-shindig project properties and go to the >"Deployment Assembly" section, you can add there additional packaging >sources which will also be deployed to the server. >Press Add, select Directive Type "Folder", and select the >target/rave-shindig-0.1-incubating-SNAPSHOT folder. >5 Make sure to also configure the correct Context root paths for >rave-portal ("portal") and rave-shindig ("/") in their Eclipse project >properties under "Web Project Settings". >6 Deploy rave-portal to eclipse embedded tomcat server. Right Click on >rave-project > Run As > Run on Server. you can add a server by going to >Manually define a new server. > > >Thanks >Raminder > > >On Apr 25, 2011, at 8:26 PM, Ate Douma wrote: > >> On 04/25/2011 11:05 AM, Ross Gardler wrote: >>> On 25/04/2011 08:39, Unico Hommes wrote: >>> >>>> The only way I see ATM for a faster development cycle is to use >>>> something like JRebel. >>> >>> Hmmm... I don't like the sound of that. JRebel is $189, that's rather >>>alot for >>> someone just wanting to do a few quick fixes. I'd rather we were >>>configured in >>> such a way as to be able to use whatever tools are common and thus >>>attract as >>> many developers as possible. >>> >>> Is this possible with Maven? Still exploring. >> >> I'll do my best to give some answers :) >> >> Its a long response, but there is quite some stuff to consider here, so >>please bear with me. >> >> First of all, if you want to use Eclipse with Maven, I strongly suggest >>*not* using the maven-eclipse-plugin. It doesn't properly handle more >>complex and especially not multi-module projects. >> >> IMO the only reliable solution is using the m2eclipse plugin. >> Before switching, make sure to remove all possible maven-eclipse-plugin >>generated meta-data (or start from a clean svn checkout) as m2eclipse >>explicitly refuses to load maven-eclipse-plugin initiated project >>configurations (!). >> With m2eclipse either directly import from svn (Materialize as Maven >>project) or import as Maven project after a command line svn checkout. >> >> The sonatype Maven Eclipse book explains how to setup Eclipse with >>m2eclipse, even if its still lacking in detail on stuff like Eclipse WTP >>integration: http://www.sonatype.com/books/m2eclipse-book/reference/ >> >> Note: If you want to run Tomcat embedded within Eclipse with, make sure >>to also install the optional m2eclipe WTP plugin (m2e-extras). >> >> One more note: for svn integration within Eclipse you have two options: >>subclipse and subversive. Although I haven't recently checked/reviewed >>the subclipse plugin in my experience the subversive plugin is *much* >>better, especially with regard to multi-module maven projects. >> >> Now, concerning using Eclipse WTP vs maven+cargo+optionally JRebel. >> >> Eclipse WTP is usable, even with Rave (more details below), but >>definitely not perfect. >> Part of that is caused by WTP itself: in my experience its still quite >>buggy, quirky, slow and heavy. >> And part of it is the still not great (but improving) maven/m2eclipse >>integration. Especially the not yet (but see [1]) handling of war >>overlays, which is biting us with rave-shindig, is a major pain in the >>@ss. >> >> I'm not all too familiar with other IDEs like Netbeans or IntelliJ if >>they do this better, maybe they do... >> >> Anyway, the "issue" with the rave-shindig module is that it is using >>the maven-war-plugin war overlay feature. Eclipe WTP/m2eclipse simply >>isn't aware of this, so the only things that gets deployed to the server >>are the resources defined by the rave-shindig project itself, meaning: >>effectively "broken". >> To fix this in a WTP expected way, we would have to *fork* the Apache >>shindig server project itself into the rave-shindig project, which IMO >>isn't an option. Especially not if you check how the shindig server >>project is build... >> >> However, I have somewhat of a workaround. >> >> First make sure you already (maven) build rave-shindig. >> If you open in Eclipse the rave-shindig project properties and go to >>the "Deployment Assembly" section, you can add there additional >>packaging sources which will also be deployed to the server. >> Press Add, select Directive Type "Folder", and select the >>target/rave-shindig-0.1-incubating-SNAPSHOT folder. >> As result, it will overlay the full rave-shindig war target folder to >>Tomcat, and it actually works when you run the server from Eclipse. >> >> BTW: make sure to also configure the correct Context root paths for >>rave-portal ("portal") and rave-shindig ("/") in their Eclipse project >>properties under "Web Project Settings". >> >> Clearly, the above solution isn't perfect, but that's the status of >>Eclipse WTP and maven integration. Hopefully with the promises from [1] >>this might get better sometime soon. >> >> So what are the alternatives? >> a) a different preferred IDE, maybe Netbeans or IntelliJ >> b) use maven to run/manage the runtime container and use remote >>debugging >> >> For a) I'm inclined to say we should allow and support developers to >>use any IDE of their choice, which means *also* Eclipse. >> >> AFAIK IntelliJ Community Edition doesn't support server deployment at >>all, nor does it have proper/full Maven or Web development integration. >>If you want to use IntelliJ you'll then need a commercial (or free for >>open source project) license similar to JRebel. >> >> Netbeans, I don't really know anymore. Never liked it as IDE but >>nowadays it seems to have great Maven integration (so I hear). >> >> This leads to my own preference to go with b), at least until [1] gets >>moving and working properly. >> >> By using maven/cargo to deploy and run the container we can stick to a >>single configuration which works with all IDEs, and important: is >>exactly the same for standalone or console based development/deployment. >> The maven-cargo-plugin already is configured to support remote >>debugging out-of-the-box, so remote Java debugging from >>Eclipse/Netbeans/IntelliJ is trivial to setup. >> >> What then is problematic is "hot resource/code replacement" from the >>IDE. And for that JRebel really is a killer solution which works >>perfectly with all IDEs. Even (much) better than what you get through >>the embedded debugging with Eclipse WTP, Netbeans or IntelliJ alone. >>Maybe there are other alternatives to JRebel but I haven't found them >>yet. >> >> I'm not saying that we all should start using JRebel, but as Rave >>committers we can get a free (individual) license if we want: [2] >> >> Of course, that won't help external developers when they are not also >>working on an open source project. Then its either use Eclipse WTP (with >>my workaround), use a different/better IDE, or use something like JRebel >>and pay a price. >> >> As a final remark I want to say that IMO none of this is related to >>using Maven. I think the only real issue right now is the problem of war >>overlay handling in Eclipse, which hopefully will be solved soon. >> I see currently no practical alternative for not using a war overlay >>for the rave-shindig project, other than forking shindig server itself. >> AFAIK using a different build system than Maven wouldn't help here >>either. >> >> Pfff, long story :) >> >> Regards, >> >> Ate >> >> [1] >>http://comments.gmane.org/gmane.comp.ide.eclipse.plugins.m2eclipse.user/6 >>018 >> [2] >>http://www.zeroturnaround.com/blog/javarebel-for-open-source-development/ >> >>> >>> Ross >>> >>>> >>>> -- >>>> Unico >>>> >>>> >>>> On Sun, Apr 24, 2011 at 2:59 AM, Ross Gardler<[email protected]> >>>>wrote: >>>>> On 24/04/2011 01:31, Ross Gardler wrote: >>>>>> >>>>>> On 24/04/2011 00:35, Ross Gardler wrote: >>>>>>> >>>>>>> On 23/04/2011 23:07, Ross Gardler wrote: >>>>> >>>>> ... >>>>> >>>>>> I'll keep digging when I find a little more time, but if anyone >>>>>>sees my >>>>>> silly mistake please let me know. >>>>> >>>>> Getting a little closer, but still not working... >>>>> >>>>> I tried running from the projects context sensitive menu rather than >>>>>the >>>>> server controller view. This opened the browser for me at >>>>> http://localhost:8080/rave-portal and the page loaded (with 404's >>>>>for each >>>>> gadget as the URL for them is not relative. >>>>> >>>>> I'm going to bed now, I hope someone can provide me with a simple >>>>>step by >>>>> step process for getting this working in Eclipse for an efficient >>>>>edit/build >>>>> cycle. >>>>> >>>>> (Damn those steep learning curves with new build tools.) >>>>> >>>>> Ross >>>>> >>>>>> >>>>>>> [1] >>>>>>> >>>>>>> >>>>>>>http://joemorrison.org/blog/2008/06/01/developing-web-applications-w >>>>>>>ith-maven-and-eclipse-you-can-have-it-all/ >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>> >> >
