Can "mvn jetty-run" skip compile?

585 views
Skip to first unread message

jamesqiugm

unread,
Sep 26, 2010, 10:35:17 PM9/26/10
to Lift
I use eclipse + mvn jetty-run to develop lift, .scala files are
compiled with eclipse scala plugin, but every time start "mvn jetty-
run", mvn will try to compile all the .scala source file again(and
it's really slow). My question is: can I skip mvn's compile? thanks

David Bernard

unread,
Sep 27, 2010, 7:30:11 AM9/27/10
to lif...@googlegroups.com
I don't know if it's possible, as jetty:run  "Requires dependency resolution of artifacts in scope: runtime"
=> compilation done.

3 possibles work-around :
* Have you try to "Run As >. Scala Application" src/test/scala/RunWebApp under eclipse ?
* maven-scala-plugin use a timestamp file to memorize date of last compilation and compare the lastModification date of this file to source file.
  try "touch target/classes.timestamp && touch target/test-classes.timestamp && mvn jetty:run"
* configure maven-scala-plugin to use the same ".scala_dependencies" as eclipse
Tell us which work-around you choose.

/davidB


--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.


Bjarte Stien Karlsen

unread,
Sep 27, 2010, 7:41:06 AM9/27/10
to lif...@googlegroups.com
Have you tried using jrebel to avoid having to restart jetty? It has
been a while since I played with lift and jrebel but it used to just
work iirc.

mvh
Bjarte

--
Bjarte Stien Karlsen
Lofthus, 4760 Lillesand
95219547
skype: bjartek78

Timothy Perrett

unread,
Sep 27, 2010, 7:57:26 AM9/27/10
to lif...@googlegroups.com
FYI, It still does work well :-)

Cheers, Tim

David Bernard

unread,
Sep 27, 2010, 8:02:09 AM9/27/10
to lif...@googlegroups.com
but doesn't avoid to restart if change some init code (Boot, DB conf,....)

Use it with RunWebApp - there is a free personnal license for *.scala files.

/davidB

jamesqiugm

unread,
Sep 27, 2010, 9:11:41 AM9/27/10
to Lift
Yes, I use JRebel for snippet hot deploy without restart jetty. But
sometime still need to reboot it (change Boot.scala, etc.). the .scala
files have been compiled by eclipse, they're updated, but mvn don't
know and try to recompile them one more time.

jamesqiugm

unread,
Sep 28, 2010, 8:45:51 AM9/28/10
to Lift
Thanks david. I've try the first 2 ways, both work fine.
* Now I found "Debug As > Scala Application" RunWebapp.scala in
Eclipse is the most comfortable way for me.
* If I use "mvn jetty-run", your "touch target/classes.timestamp"
method is a real perfect solution for my original problem.
Thanks again.

Regards,
jamesqiu
Reply all
Reply to author
Forward
0 new messages