java - How to make Eclipse/SparkJava/Maven work together? -


i have downloaded maven through apt-get, have maven integration installed on eclipse. have pom.xml spark dependency set. project compiles , when hit run receive output:

[info] scanning projects... [info]                                                                          [info] ------------------------------------------------------------------------ [info] building mc437-web 0.0.1-snapshot [info] ------------------------------------------------------------------------ [info] ------------------------------------------------------------------------ [info] build success [info] ------------------------------------------------------------------------ [info] total time: 0.105s [info] finished at: thu apr 10 10:56:15 pdt 2014 [info] final memory: 6m/59m [info] ------------------------------------------------------------------------ 

what need have app running on localhost? goal/profile have set on maven?

you need class main method , defines routes. can right click , run class or run command line.

public class app  {     public static void main(string[] args) {        get(new route("/hello") {          @override          public object handle(request request, response response) {             return "hello world!";          }       }); } 

Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -