Create a New ZK Maven Project"

From Documentation
m (correct highlight (via JWB))
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{ZKStudioEssentialsPageHeader}}
 
{{ZKStudioEssentialsPageHeader}}
  
 +
In this section, we will demonstrate how to create a ZK maven project with the Maven plugin.
  
 
= Install Maven Plugin First=
 
= Install Maven Plugin First=
In this section, we will demonstrate how to use Maven plugin to create a ZK maven project. Unless your eclipse version already includes it, you have to install the plugin first. Click '''[Help]/[Eclipse Marketplace...]''' and enter "maven" in "Find" textbox to find '''Maven Integration for Eclipse'''. Then click "Install" button.
+
Unless your Eclipse version/edition already includes it, you have to install the plugin first. Click '''[Help]/[Eclipse Marketplace...]''' and enter "maven" in "Find" textbox to find '''Maven Integration for Eclipse'''. Then click "Install" button.
  
 
[[File:studio-maven-plugin.png | center | 500px]]
 
[[File:studio-maven-plugin.png | center | 500px]]
Line 24: Line 25:
  
  
4. Enter preferred ZK version in <tt>zk-version-since</tt> and click '''Finish'''.
+
4. Enter preferred ZK version in <code>zk-version-since</code> and click '''Finish'''.
 
[[File:studio-maven-archetype-parameter.png | center | 500px]]
 
[[File:studio-maven-archetype-parameter.png | center | 500px]]
  

Latest revision as of 13:22, 19 January 2022

Create a New ZK Maven Project



In this section, we will demonstrate how to create a ZK maven project with the Maven plugin.

Install Maven Plugin First

Unless your Eclipse version/edition already includes it, you have to install the plugin first. Click [Help]/[Eclipse Marketplace...] and enter "maven" in "Find" textbox to find Maven Integration for Eclipse. Then click "Install" button.

Studio-maven-plugin.png

After completing the installation and restarting Eclipse, we can continue the following steps.

Create ZK Maven Project

1. Select [File]/[New]/[Project] to open a New Project dialog. Then choose Maven Project under Maven item and click "Next >".

Studio-maven-project-wizard.png


2. Select location. We usually use default workspace location.

Studio-maven-project-wizard-2.png


3. Enter "zk" in filter to search ZK maven archetypes and select what you want. Click Next.

Studio-maven-archetype.png


4. Enter preferred ZK version in zk-version-since and click Finish.

Studio-maven-archetype-parameter.png


5. The new ZK maven project is created with ZK dependencies added.

Studio-maven-project.png

Run ZK Maven Project

1. Right click on your project icon and select [Run as]/[Maven build...] to open run configuration dialog.

Studio-maven-run.png


2. Enter jetty:run in Goals textbox and click Run.

Studio-maven-run-jetty.png
  • Running jetty the firs time may take a while because Maven plugins needs to download some necessary resources, please be patient.


3. You can see the server starting messages showing up in Console view.

Studio-maven-run-console.png

Then visit http://localhost:8080/yourprojectname to see the result.





Last Update : 2022/01/19

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.