0

How to run a maven project in eclipse?

asked 2012-03-27 01:07:26 +0800

ntsetso gravatar image ntsetso
59 1 4

Hi,

I'm in the very beginning. I've configured ZK Studio 6 in eclipse following ZK 6 Essentials instructions and imported the sample store application following same instructions as well.
After all I can't find out how to run the project. I find ZK documentation laconic in many aspects for a beginner. I managed to run the same project in the ZK 5 version some time ago, but looks like the html version of ZK 5 Essentials is no longer available and the available pdf version has long code lines cut in some places. Any way I'd like to follow newer tutorials.
I'll appreciate a step by step explanation.

TIA,
ntsetso

delete flag offensive retag edit

11 Replies

Sort by ยป oldest newest

answered 2012-03-27 08:26:07 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

Hi,

Do you mean run a web application project in eclipse?
just right click on the project, select "Run As" \ "Run on Server"

link publish delete flag offensive edit

answered 2012-03-27 16:09:10 +0800

ntsetso gravatar image ntsetso
59 1 4

Hi,

The option "Run As" \ "Run on Server" worked with the former version of "Store sample" based on ZK 5, and Tomcat could be chosen as the server.
With ZK 6, following this tutorial Setting Up the Applications Using Eclipse/Store, the server option is no longer available.
The options I get from "Run As" are:
1 Java Applet
2 Java Application
3 Junit Test
4 Maven Build
5 Maven Build
6 Maven clean
... and so on.
Please have a look at referred instructions if you don't mind.
BTW, after installing maven, I can run the project from project root directory on command line with:

mvn jetty:run

Want to run it from eclipse.

Thanks for replying.

link publish delete flag offensive edit

answered 2012-03-28 00:44:58 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

Hi,

Right Click on the project \ "Properties" \ "Project Facets"

then check the "Dynamic Web Module" to make the project as a dynamic web project, then you can run it with "Run As" \ "Run on Server".

link publish delete flag offensive edit

answered 2012-03-30 13:05:06 +0800

ntsetso gravatar image ntsetso
59 1 4

Hi,

Just to rectify my early statement: Was wrong. In fact the available HTML version I referred above does not differ in contents with the ZK 5 Essentials PDF.
Regards.

link publish delete flag offensive edit

answered 2012-04-02 01:23:02 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

Hi,
So, your "running project" problem is solved?

link publish delete flag offensive edit

answered 2012-04-04 23:11:37 +0800

pasqualeleone gravatar image pasqualeleone flag of Italy
81 2

i have the same problem of ntsetso. After import click right mouse button and then?

The options I get from "Run As" are:
1 Java Applet
2 Java Application
3 Junit Test
4 Maven Build
5 Maven Build
6 Maven clean
...
what is the right procedure for import an existing maven project?
tnx

link publish delete flag offensive edit

answered 2012-04-05 01:02:44 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

Hi,
The procedure is right. you can run the project with maven command "mvn jetty:run".
If you want to use "Run As", you should setup "Project facet" first. The eclipse doesn't setup this automatically when importing a maven project, that's why you can't see a "Run on Server" option.

link publish delete flag offensive edit

answered 2012-04-05 10:20:36 +0800

pasqualeleone gravatar image pasqualeleone flag of Italy
81 2

Hi,
i work with IDE Eclipse, i setup "project facet" adding "Dynamic Web Module" and "Zk Studio" and than download Tomcat 7.0 (becauseTomcat 6.0 don't work) and than drag some file from folder webapp to WEB-INF and now think that run.
I will test this.
Thank you

link publish delete flag offensive edit

answered 2012-05-26 02:50:23 +0800

ntsetso gravatar image ntsetso
59 1 4

Hi,

When searching for maven in eclipse market place there is:

1 - Maven integration for eclipse WTP
2- Maven integration for eclipse

In the past I always chose the second option.
This time I decided to try the first option (afterward I took the second also).

Then imported a maven project and ran it straight forward with no need of additional configuration. Now it works.

After installing "Maven integration for eclipse WTP", take a look in this page . There's no need of drag files from folder webapp to WEB-INF.

link publish delete flag offensive edit

answered 2012-05-30 03:26:38 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

Hi,
I don't see any description in the page http://books.zkoss.org/wiki/ZK_Installation_Guide/Setting_up_IDE/Maven/Use_ZK_Maven_Archetype/Create_and_Run_ZK_Application_with_Maven_Archetype that tells you drag files from "webapp" to "WEB-INF". Could you point out more precisely ?

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-03-27 01:07:26 +0800

Seen: 3,497 times

Last updated: May 30 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More