Re: Development environment for a modular Tapestry app
BTW tapestry-stitch has two modules (component library + webapp) and I develop in eclipse using m2e + RunJettyRun. As you can see, StitchModule is added to the manifest here: https://github.com/uklance/tapestry-stitch/blob/master/pom.xml#L67 But also declared as a SubModule here for easy testing: https://github.com/uklance/tapestry-stitch-demo/blob/master/src/main/java/org/lazan/t5/stitch/demo/services/AppModule.java#L12
Re: Development environment for a modular Tapestry app
If you are using m2e maven eclipse plugin then it should do the "right" thing 1. If it can resolve the dependency from your eclipse workspace, it will use the local class files 2. If not (lets say you close / delete the project) then it will use the jar files from your maven repository The RunJettyRun plugin simply uses your m2e classpath. The only problem comes with loading modules from the jar's manifest. When using local class files the manifest is not read. So you need an explicit @SubModule annotation but I don't see this as a huge problem. You can add the @SubModule this to your DevelopmentModule if you like, It's also fine to put it in your production AppModule since tapestry IOC checks for duplicates and never loads a module twice.
Re: Development environment for a modular Tapestry app
@Thiago I'm using RunJettyRun. I think the other method you are referring to is maven's jetty:run ? Well I don't use maven at all. Yes I mean @Submodule. Editing my modules every time I need to load a specific set of modules is time consuming and error prone. I only need to be able to run my multi-module project, edit and make use of the class reloading feature without much effort. Having multiple configured setups (different sets of module in each run-configuration) is my aim here. Any method to test multi-module web projects will be just great. Would anyone care to share his setup ? :) *-* *Muhammad Gelbana* http://eg.linkedin.com/in/mgelbana/ On Mon, Sep 30, 2013 at 8:23 PM, Jan Fryblik wrote: > On Mon, 30 Sep 2013 19:40:42 +0200, Thiago H de Paula Figueiredo < > thiag...@gmail.com> wrote: > > On Mon, 30 Sep 2013 14:28:34 -0300, Muhammad Gelbana >> wrote: >> >> Here comes the problem. When I edit my code, and build my module into a >>> .jar file, the build is broken because the .jar file is already used by >>> the loaded web app in jetty. So I can't make use of the class-reloading >>> feature. >>> >> >> It seems you're adding the same classes twice in the classpath. This >> should be avoided anyway. >> >> What are you using to launch Jetty? jetty:run sucks for multi-project >> development. RunJettyRun or embedded Jetty instance work wy >> better. >> > > Probably i have same issue. Actually I thought its not issue, its > consequence. :) > > I'm using 'gradle jettyRun' and when jetty is running and i deploy > tapestry module JAR with changed tapestry components. It ends up with > 'Unable to resolve to a component class name.' exception. So as you > said, can i deploy tapestry module without such error? Thanks for answer. > > > > >> And even if I do no include jars and just use Eclipse's projects. I have >>> to edit almost all my modules by annotating them, to explicitly state the >>> modules they depend on. >>> >> >> You mean @Submodule? >> > > --**--**- > To unsubscribe, e-mail: > users-unsubscribe@tapestry.**apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Development environment for a modular Tapestry app
On Mon, 30 Sep 2013 19:40:42 +0200, Thiago H de Paula Figueiredo wrote: On Mon, 30 Sep 2013 14:28:34 -0300, Muhammad Gelbana wrote: Here comes the problem. When I edit my code, and build my module into a .jar file, the build is broken because the .jar file is already used by the loaded web app in jetty. So I can't make use of the class-reloading feature. It seems you're adding the same classes twice in the classpath. This should be avoided anyway. What are you using to launch Jetty? jetty:run sucks for multi-project development. RunJettyRun or embedded Jetty instance work wy better. Probably i have same issue. Actually I thought its not issue, its consequence. :) I'm using 'gradle jettyRun' and when jetty is running and i deploy tapestry module JAR with changed tapestry components. It ends up with 'Unable to resolve to a component class name.' exception. So as you said, can i deploy tapestry module without such error? Thanks for answer. And even if I do no include jars and just use Eclipse's projects. I have to edit almost all my modules by annotating them, to explicitly state the modules they depend on. You mean @Submodule? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Development environment for a modular Tapestry app
On Mon, 30 Sep 2013 14:28:34 -0300, Muhammad Gelbana wrote: Here comes the problem. When I edit my code, and build my module into a .jar file, the build is broken because the .jar file is already used by the loaded web app in jetty. So I can't make use of the class-reloading feature. It seems you're adding the same classes twice in the classpath. This should be avoided anyway. What are you using to launch Jetty? jetty:run sucks for multi-project development. RunJettyRun or embedded Jetty instance work wy better. And even if I do no include jars and just use Eclipse's projects. I have to edit almost all my modules by annotating them, to explicitly state the modules they depend on. You mean @Submodule? -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Development Environment
I currently use Eclipse 3.4 J2EE, Run-Jetty-Run and Jetty 6 with no problems at all, I can debug quite happily through the debugger with class reloading (components/pages) and template (.tml) changes all happening live. The only thing I need to restart for is non-managed clesses such as Entities and Services - no biggie, jetty restarts virtually instantly on my machine. Have a look at: http://wiki.apache.org/tapestry/Tapestry5HowToSetupEclipseRunJettyRun -- View this message in context: http://www.nabble.com/Development-Environment-tp19686205p19704939.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Development Environment
Or "mvnDebug jetty:run" and then attach the debugger to the running jvm. Regards, Olle 2008/9/27 Luther Baker <[EMAIL PROTECTED]> > I love this forum! > > > On Sep 27, 2008, at 10:44 AM, Martin Strand wrote: > > With m2eclipse: >> Right click your project, select "Debug As" --> "Maven build..." and start >> jetty:run from there >> >> On Sat, 27 Sep 2008 17:20:54 +0200, Luther Baker <[EMAIL PROTECTED]> >> wrote: >> >> :-) Nice analogy. >>> >>> So, how do I use the eclipse debugger with mvn jetty:run? >>> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Olle Hallin M.Sc. +46 70 6653071 [EMAIL PROTECTED] www.hit.se
Re: Development Environment
I love this forum! On Sep 27, 2008, at 10:44 AM, Martin Strand wrote: With m2eclipse: Right click your project, select "Debug As" --> "Maven build..." and start jetty:run from there On Sat, 27 Sep 2008 17:20:54 +0200, Luther Baker <[EMAIL PROTECTED] > wrote: :-) Nice analogy. So, how do I use the eclipse debugger with mvn jetty:run? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Development Environment
With m2eclipse: Right click your project, select "Debug As" --> "Maven build..." and start jetty:run from there On Sat, 27 Sep 2008 17:20:54 +0200, Luther Baker <[EMAIL PROTECTED]> wrote: :-) Nice analogy. So, how do I use the eclipse debugger with mvn jetty:run? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Development Environment
:-) Nice analogy. So, how do I use the eclipse debugger with mvn jetty:run? Is it possible? Can I put a breakpoint in my source and have the application drop into it from mvn jetty:run? If not, I have relegated myself to use the simple tomcat solution for now. The button on an M5 is nice but I'd prefer to *work* on a 1969 muscle car if it means I can actually get under the hood and trace the inner workings (not quite as clever as your analogy, I know ;-) Agree with your sentiment. -Luther On Sat, Sep 27, 2008 at 9:38 AM, Borut Bolčina <[EMAIL PROTECTED]>wrote: > Luther, > > it is true - you can work with WTP and Tomcat 6, but that is like driving > the BMW M5 without the M button being pressed. > > Try running the quick start T5 application with mvn jetty:run and with > WTP/Tomcat. Try changing Start.java and then clicking the refresh button in > the browser. Even in this one page web application with 2 java files it > takes 10-times longer with WTP/Tomcat combo to display the changed Start > page. I can imagine it gets worse with larger apps. > > And here is my point - if one of the main strengths of Tapestry 5 is live > class reloading, then it is of paramount value to tell developers how can > they harness the power in different development environments. This is where > the documentation fails. I also own the Alexander's book and as much as the > book is welcomed, it is outdated and the information given on page 43 is > not > true (at least in present moment): > > "You will see that the change you have made is not reflected by the running > application, because you have changed an HTML file, and not Java code. > Smilar to NetBeans, Eclipse doesn't care about changes in HTML files. One > way to update the application in such case is to follow the advice given > for > NetBeans - make change, even if it is an insignificant one, to some Java > file, and save the file. The application will then be reloaded > automatically." > > This is so not T5-ish. > > If there are many ways to develop T5 web apps, then some of this cases > should be explained clearly as this is IMHO one of the barriers many new > tapestry users are hitting at the very beginning. Of course some cases can > be published on wiki, but the most common two or three must be on main T5 > page - this is where most users start. > > I am filing a JIRA request for documentation improvement: > https://issues.apache.org/jira/browse/TAP5-245 > > Cheers, > Borut > > P.S. The Issues link on T5 page (http://tapestry.apache.org/tapestry5/) is > wrong. It should be https://issues.apache.org/jira/browse/TAP5 > > > 2008/9/26 Luther Baker <[EMAIL PROTECTED]> > > > For what its worth, I've had no trouble running Tomcat 6 with Eclipse WTP > > with MAVEN m2 plugins. > > > > I have NOT had to customize the tomcat instance at all. > > > > -Luther > > > > > > > > 2008/9/26 Jonathan Barker <[EMAIL PROTECTED]> > > > > > > > > I was recently cast out of the Garden of Eden for eating the forbidden > > > fruit: m2eclipse (updated). > > > > > > I was running the old JettyLauncher with the old (and rather limited) > > > m2eclipse, on Eclipse 3.3 / MyEclipse 6.0. Life was good. Easy > > debugging, > > > hot reloading. I had JettyPlus configured so I could take my war file > > > straight from my development system and drop it into a JBoss server for > > > deployment and take advantage of pre-configured DataSources. > > > > > > Alas, the updated and mainly superior m2eclipse removes > > PluginDependencies > > > from your classpath in order to make the execution within Eclipse be > > > virtually identical to what it would be from command-line Maven. > > > > > > That breaks JettyLauncher and Run-Jetty-Run because you need the > plugins > > on > > > the classpath. Other than that, it does avoid some odd situations where > > > things work in Eclipse but not when deployed elsewhere. > > > > > > I think I've figured out my usable alternative with external mvn > > > hightide:run (hightide is a derivative of Jetty, and there is a > hightide > > > maven plugin). It's not as convenient, but it is workable. > > > > > > Jonathan > > > > > > > -Original Message- > > > > From: Kevin Menard [mailto:[EMAIL PROTECTED] > > > > Sent: Friday, September 26, 2008 13:59 > > > > To: Tapestry users > > > > Subject: Re: Development Environment > > > > > > > > Hi Borut, > > > > > > &
Re: Development Environment
Luther, it is true - you can work with WTP and Tomcat 6, but that is like driving the BMW M5 without the M button being pressed. Try running the quick start T5 application with mvn jetty:run and with WTP/Tomcat. Try changing Start.java and then clicking the refresh button in the browser. Even in this one page web application with 2 java files it takes 10-times longer with WTP/Tomcat combo to display the changed Start page. I can imagine it gets worse with larger apps. And here is my point - if one of the main strengths of Tapestry 5 is live class reloading, then it is of paramount value to tell developers how can they harness the power in different development environments. This is where the documentation fails. I also own the Alexander's book and as much as the book is welcomed, it is outdated and the information given on page 43 is not true (at least in present moment): "You will see that the change you have made is not reflected by the running application, because you have changed an HTML file, and not Java code. Smilar to NetBeans, Eclipse doesn't care about changes in HTML files. One way to update the application in such case is to follow the advice given for NetBeans - make change, even if it is an insignificant one, to some Java file, and save the file. The application will then be reloaded automatically." This is so not T5-ish. If there are many ways to develop T5 web apps, then some of this cases should be explained clearly as this is IMHO one of the barriers many new tapestry users are hitting at the very beginning. Of course some cases can be published on wiki, but the most common two or three must be on main T5 page - this is where most users start. I am filing a JIRA request for documentation improvement: https://issues.apache.org/jira/browse/TAP5-245 Cheers, Borut P.S. The Issues link on T5 page (http://tapestry.apache.org/tapestry5/) is wrong. It should be https://issues.apache.org/jira/browse/TAP5 2008/9/26 Luther Baker <[EMAIL PROTECTED]> > For what its worth, I've had no trouble running Tomcat 6 with Eclipse WTP > with MAVEN m2 plugins. > > I have NOT had to customize the tomcat instance at all. > > -Luther > > > > 2008/9/26 Jonathan Barker <[EMAIL PROTECTED]> > > > > > I was recently cast out of the Garden of Eden for eating the forbidden > > fruit: m2eclipse (updated). > > > > I was running the old JettyLauncher with the old (and rather limited) > > m2eclipse, on Eclipse 3.3 / MyEclipse 6.0. Life was good. Easy > debugging, > > hot reloading. I had JettyPlus configured so I could take my war file > > straight from my development system and drop it into a JBoss server for > > deployment and take advantage of pre-configured DataSources. > > > > Alas, the updated and mainly superior m2eclipse removes > PluginDependencies > > from your classpath in order to make the execution within Eclipse be > > virtually identical to what it would be from command-line Maven. > > > > That breaks JettyLauncher and Run-Jetty-Run because you need the plugins > on > > the classpath. Other than that, it does avoid some odd situations where > > things work in Eclipse but not when deployed elsewhere. > > > > I think I've figured out my usable alternative with external mvn > > hightide:run (hightide is a derivative of Jetty, and there is a hightide > > maven plugin). It's not as convenient, but it is workable. > > > > Jonathan > > > > > -Original Message- > > > From: Kevin Menard [mailto:[EMAIL PROTECTED] > > > Sent: Friday, September 26, 2008 13:59 > > > To: Tapestry users > > > Subject: Re: Development Environment > > > > > > Hi Borut, > > > > > > Please file JIRA issues for these ideas, otherwise they're bound to be > > > lost. > > > > > > -- > > > Kevin > > > > > > > > > > > > On Fri, Sep 26, 2008 at 6:53 AM, Borut Bolčina < > [EMAIL PROTECTED]> > > > wrote: > > > > Hello, > > > > > > > > since JettyLauncher is not working with Eclipse Ganymede, this should > > be > > > > mentioned at > > > > http://tapestry.apache.org/tapestry5/tutorial1/env.html > > > > > > > > I looked at http://code.google.com/p/run-jetty-run/ but some posts > > > suggest > > > > that it is not working with m2eclipse plugin.But I will try it out... > > > > > > > > It would be a great time saver if tutorial at the above link would > > > describe > > > > some different scenarios how developers can set up their environments > > to > > > > benefit from live class reloading. Reading the mailing list there > seems > > > to > > > > be great confussion. > > > > > > > > Cheers, > > > > Borut > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >
Re: Development Environment
For what its worth, I've had no trouble running Tomcat 6 with Eclipse WTP with MAVEN m2 plugins. I have NOT had to customize the tomcat instance at all. -Luther 2008/9/26 Jonathan Barker <[EMAIL PROTECTED]> > > I was recently cast out of the Garden of Eden for eating the forbidden > fruit: m2eclipse (updated). > > I was running the old JettyLauncher with the old (and rather limited) > m2eclipse, on Eclipse 3.3 / MyEclipse 6.0. Life was good. Easy debugging, > hot reloading. I had JettyPlus configured so I could take my war file > straight from my development system and drop it into a JBoss server for > deployment and take advantage of pre-configured DataSources. > > Alas, the updated and mainly superior m2eclipse removes PluginDependencies > from your classpath in order to make the execution within Eclipse be > virtually identical to what it would be from command-line Maven. > > That breaks JettyLauncher and Run-Jetty-Run because you need the plugins on > the classpath. Other than that, it does avoid some odd situations where > things work in Eclipse but not when deployed elsewhere. > > I think I've figured out my usable alternative with external mvn > hightide:run (hightide is a derivative of Jetty, and there is a hightide > maven plugin). It's not as convenient, but it is workable. > > Jonathan > > > -Original Message- > > From: Kevin Menard [mailto:[EMAIL PROTECTED] > > Sent: Friday, September 26, 2008 13:59 > > To: Tapestry users > > Subject: Re: Development Environment > > > > Hi Borut, > > > > Please file JIRA issues for these ideas, otherwise they're bound to be > > lost. > > > > -- > > Kevin > > > > > > > > On Fri, Sep 26, 2008 at 6:53 AM, Borut Bolčina <[EMAIL PROTECTED]> > > wrote: > > > Hello, > > > > > > since JettyLauncher is not working with Eclipse Ganymede, this should > be > > > mentioned at > > > http://tapestry.apache.org/tapestry5/tutorial1/env.html > > > > > > I looked at http://code.google.com/p/run-jetty-run/ but some posts > > suggest > > > that it is not working with m2eclipse plugin.But I will try it out... > > > > > > It would be a great time saver if tutorial at the above link would > > describe > > > some different scenarios how developers can set up their environments > to > > > benefit from live class reloading. Reading the mailing list there seems > > to > > > be great confussion. > > > > > > Cheers, > > > Borut > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
RE: Development Environment
I was recently cast out of the Garden of Eden for eating the forbidden fruit: m2eclipse (updated). I was running the old JettyLauncher with the old (and rather limited) m2eclipse, on Eclipse 3.3 / MyEclipse 6.0. Life was good. Easy debugging, hot reloading. I had JettyPlus configured so I could take my war file straight from my development system and drop it into a JBoss server for deployment and take advantage of pre-configured DataSources. Alas, the updated and mainly superior m2eclipse removes PluginDependencies from your classpath in order to make the execution within Eclipse be virtually identical to what it would be from command-line Maven. That breaks JettyLauncher and Run-Jetty-Run because you need the plugins on the classpath. Other than that, it does avoid some odd situations where things work in Eclipse but not when deployed elsewhere. I think I've figured out my usable alternative with external mvn hightide:run (hightide is a derivative of Jetty, and there is a hightide maven plugin). It's not as convenient, but it is workable. Jonathan > -Original Message- > From: Kevin Menard [mailto:[EMAIL PROTECTED] > Sent: Friday, September 26, 2008 13:59 > To: Tapestry users > Subject: Re: Development Environment > > Hi Borut, > > Please file JIRA issues for these ideas, otherwise they're bound to be > lost. > > -- > Kevin > > > > On Fri, Sep 26, 2008 at 6:53 AM, Borut Bolčina <[EMAIL PROTECTED]> > wrote: > > Hello, > > > > since JettyLauncher is not working with Eclipse Ganymede, this should be > > mentioned at > > http://tapestry.apache.org/tapestry5/tutorial1/env.html > > > > I looked at http://code.google.com/p/run-jetty-run/ but some posts > suggest > > that it is not working with m2eclipse plugin.But I will try it out... > > > > It would be a great time saver if tutorial at the above link would > describe > > some different scenarios how developers can set up their environments to > > benefit from live class reloading. Reading the mailing list there seems > to > > be great confussion. > > > > Cheers, > > Borut > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Development Environment
Hi Borut, Please file JIRA issues for these ideas, otherwise they're bound to be lost. -- Kevin On Fri, Sep 26, 2008 at 6:53 AM, Borut Bolčina <[EMAIL PROTECTED]> wrote: > Hello, > > since JettyLauncher is not working with Eclipse Ganymede, this should be > mentioned at > http://tapestry.apache.org/tapestry5/tutorial1/env.html > > I looked at http://code.google.com/p/run-jetty-run/ but some posts suggest > that it is not working with m2eclipse plugin.But I will try it out... > > It would be a great time saver if tutorial at the above link would describe > some different scenarios how developers can set up their environments to > benefit from live class reloading. Reading the mailing list there seems to > be great confussion. > > Cheers, > Borut >