Hello, 

I finally got my appfuse project (jsf basic archetype) working with 
jetty:run such that both java code and jsp changes are (semi-)instantly
picked  
up by jetty.  I did not find anything in the way of a step by step tutorial
on how to do this.  

Since getting this very useful result took some finagling 
I figured I'd post the steps... Perhaps this could be the seed of an
official tutorial...

<Note: these instructions assume you are using Eclipse.>

1. create your project shell.

2. run mvn install

3. Just for kicks run mvn jetty:run  now.  Note that this will fail.
   You have not packaged all of the stuff that jetty will need 
   in src/main/webapp which is where jetty:run is looking for classes
   and resources.

4. run mvn war:inplace
    Now jetty:run will work and you can see the results of any .jsp
    modifications you do.  This is useful, but when you change java source
    code you will find that jetty does not recognize these changes and hot
deploy
    them.  Changing a java file >does< seem to result in jetty bouncing
itself..
    But even so, it does not pick up the modifications made to the java
class files
    (which at this point the class files are still being dumped into
target/classes/... ) 

5. In order to cause your java file changes to be recognized by jetty you 
  need to modify your Eclipse build path by doing the following.

    remove  <projectRoot>/src/main/webapp from the java build path
    (if you don't Eclipse will complain about the nesting of one source
     path within another).

    change your Default output folder to
<projectRoot>/src/main/webapp/WEB-INF

    (In Eclipse, right click on the project, select properties. then select
'Java Build Path'
     from the left hand menu tree.) Then select the Source tab on the Java
Build Path dialog 
    box)

6.  After you do this jetty might start crashing and failing to find things.
    Do one more  ' mvn war:inplace '  after this  (to kind of clearn things
up.)
    After this point you should be able to see your java code changes get 
    recognized nice and quickly by jetty.  Very convenient !


Before I started using appfuse I never could get jetty working with maven.
Thanks to Matt
and the other appfuse developers for making this framework available.

/chris






-- 
View this message in context: 
http://www.nabble.com/How-I-got-jetty%3Arun-to-work.-tf3578560s2369.html#a9999689
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to