In addition to specifying the tapestry.modules property, take a look at the <extraClasspath> element in the jetty:run configuration.
<webAppConfig> <extraClasspath>../*module1*/target/classes,../*module2/target/classes/*,../ *module3*/target/classes</extraClasspath> </webAppConfig> Obviously from this I need to have resources copied to target/classes. I occasionally get caught because I've cleaned a module so the jetty:run plugin doesn't find them until after a restart, but normally it works like a charm. JB On Mon, Nov 8, 2010 at 1:06 PM, Christian Riedel <cr.ml...@googlemail.com>wrote: > mmh I don't want to commit .classpath / .project files to my repository and > I couldn't find the maven switch to properly generate those files. > > So > <classpathentry excluding="**" kind="src" output="target/classes" > path="src/main/resources"/> > should read > <classpathentry kind="src" output="target/classes" > path="src/main/resources"/> > and that's it? > > Just tried that out but new classes are still not recognized... > > > Didn't know about the system property, this would have had been pretty > helpful in the past :-) > > Someone could make some notes about these "advanced project configuration" > steps in the new docs? Or someone writes a nice blog post about it... Time > for better IDE support, I'd say! :) > > > Thanks for the hints, guys! > > Christian > > > Am 08.11.2010 um 18:07 schrieb Nicolas Barrera: > > > Chirstian, > > > > I 've faced that problem of yours with the manifest.mf... and the > tapestry > > module classes..., > > > > I think it's not on tapestry documentation..., (please I think it will be > > positive to add it here > > http://tapestry.apache.org/tapestry5/tapestry-ioc/autoload.html!) > > but I dove into tapestry source code to find out that there is a > development > > replacement for the manfiest tapestry-module-classes, it's a tapestry > > parameter parameter named > > > > tapestry.modules > > > > > > so..., something i 've forgotten about my jetty m2e eclipse run > > configuration is that it also runs with another maven profile.., a jetty > > profile.., then in my webapp pom i set that profile with the following > > plugin configuration: > > > > <plugin> > >> <groupId>org.mortbay.jetty</groupId> > >> <artifactId>jetty-maven-plugin</artifactId> > >> <configuration> > >> <systemProperties> > >> <systemProperty> > >> <name> > >> tapestry.modules > >> </name> > >> <value> > >> com.something,LibModule1, > >> com.something.LibModule2 > >> </value> > >> </systemProperty> > >> </systemProperties> > >> <webAppConfig> > >> <contextPath>/myWebapp</contextPath> > >> </webAppConfig> > >> <!-- al presionar Enter en la consola, > reinicia > >> Jetty --> > >> <reload>manual</reload> > >> <scanIntervalSeconds>10</scanIntervalSeconds> > >> <scanTargetPatterns> > >> <scanTargetPattern> > >> > <directory>src/main/webapp</directory> > >> <excludes> > >> <exclude>assets/**</exclude> > >> </excludes> > >> </scanTargetPattern> > >> </scanTargetPatterns> > >> </configuration> > >> </plugin> > >> > > > > the important part here is that i can avoid the manifest setting this > > property: > > > > <systemProperties> > > <systemProperty> > > <name> > > tapestry.modules > > </name> > > <value> > > com.something,LibModule1, > > com.something.LibModule2 > > </value> > > </systemProperty> > > </systemProperties> > > > > > > > > Oh, another thing that i 've forgotten is what thiago told you..., i > don't > > use mvn eclipse:eclipse to generate the .project... instead i got an > > organization-wide archetype which creates the .project/.classpath > correctly > > for webapps. > > (modifying the excludes thiago mentions). > > > > hope that helps..., > > > > Nicolás.- > > > > > > On Mon, Nov 8, 2010 at 1:36 PM, Christian Riedel < > cr.ml...@googlemail.com>wrote: > > > >> Hi Nicolas & Thiago! > >> > >> I knew about the "resolve artifacts" flag but in the past it didn't > always > >> work as expected, so I never used it. Having played with it now a bit I > see > >> that class/resource-reloading works but there are some pitfalls: > >> > >> - I use Maven to generate my Manifest.mf (Tapestry-Module-Classes). > >> Auto-resolving artifacts means there is no maven-generated manifest.mf > >> available. You have to create one that is similar to the generated one > and > >> store it in src/main/resources/META-INF for example. > >> > >> - New files are not copied over automatically. I created a test-page > that > >> was only recognized after I made a clean install of the module. Then > >> hot-replacement was working again. (Yes, a restart was not sufficient, I > had > >> to reinstall the module!) > >> > >> > >> After being angry at maven for those pitfalls I decided to give that > >> RunJettyRun plugin a try. > >> I still have to provide a manually created manifest.mf but new resources > >> are at least read in automatically. > >> > >> > >> Feeling better now, thanks again! > >> Christian > >> > >> > >> Am 08.11.2010 um 14:56 schrieb Nicolas Barrera: > >> > >>> Christian, > >>> > >>> are you using the "Resolve artifacts in workspace" feature of the m2e > >>> plugin? > >>> > >>> I use it and although I 'm not using a multimodule, class reloading > works > >>> like a charm... > >>> > >>> my scenario could be like this: > >>> > >>> webapp (t5 web with pages, which reference or depend on the weblib > pages) > >>> | > >>> | > >>> \ / > >>> weblib (t5 library w/ custom components and pages) > >>> > >>> If you 're not using that feature you can activate it across all > projects > >> in > >>> the Window -> Preferences, filter for maven.., and tick the checkbox > >>> "Resolve artifacts in workspace". This will help for maven dependencies > >> to > >>> compile without being installed. > >>> > >>> Ah, just like you, I 'm using Jetty and I run it like an m2e eclipse > Run > >>> Configuration..., once again there you a have a "Resolve artifacts in > >>> workspace" checkbox you need to tick. This will help jetty to find the > >> web > >>> dependencies without having to install them. > >>> > >>> I hope I was clear, if not just ask again > >>> > >>> cheers > >>> > >>> Nicolás.- > >>> > >>> > >>> On Mon, Nov 8, 2010 at 10:43 AM, Thiago H. de Paula Figueiredo < > >>> thiag...@gmail.com> wrote: > >>> > >>>> On Mon, 08 Nov 2010 11:24:53 -0200, Christian Riedel < > >>>> cr.ml...@googlemail.com> wrote: > >>>> > >>>> Hi list, > >>>>> > >>>> > >>>> Hi! > >>>> > >>>> > >>>> I'm trying to build a multi-module project with maven 2 (w/ m2eclipse) > >> and > >>>>> Tapestry (5.2.2) of course! One module contains the .war artifact and > >> some > >>>>> of the others contribute pages and components... > >>>>> Now the problem is that I can't leverage live-class-reloading or > >> resource > >>>>> reloading in general since I always have to re-install the artifacts > >> and > >>>>> restart jetty (using jetty:run) to see the changes... > >>>>> > >>>> > >>>> jetty:run and Maven plugins in general have this problem. Use > >> RunJettyRun > >>>> or an embedded Jetty instance to run your project and everything will > >> work. > >>>> :) > >>>> > >>>> -- > >>>> Thiago H. de Paula Figueiredo > >>>> Independent Java, Apache Tapestry 5 and Hibernate consultant, > developer, > >>>> and instructor > >>>> Owner, Ars Machina Tecnologia da Informação Ltda. > >>>> http://www.arsmachina.com.br > >>>> > >>>> > >>>> --------------------------------------------------------------------- > >>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > >>>> For additional commands, e-mail: users-h...@tapestry.apache.org > >>>> > >>>> > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > >> For additional commands, e-mail: users-h...@tapestry.apache.org > >> > >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Jonathan Barker ITStrategic