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

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -