From 0e7b21b78863d5680e279256c929cd0203bb25e4 Mon Sep 17 00:00:00 2001 From: Ilia Motornyi Date: Tue, 28 Feb 2017 09:50:23 +0200 Subject: Easy DevelopmentServerLauncher run with maven (#8677) Add Maven target for running or debugging the development server and instructions for IDEA. --- README.md | 36 +++++++++++++----------------------- uitest/pom.xml | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 7ea8d8e634..06d4963aa7 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ The following preferences need to be set to keep the project consistent. You nee 1. In a Project Explorer right-click *vaadin-uitest* 1. Open *Run As* -> *Maven build...* 1. Type in jetty:run-exploded into *Goals* and click *Run* -1. Open URL *http://localhost:8080/run/* +1. Open URL *http://localhost:8080/run/<testUI>* ## Setting up IntelliJ IDEA to Develop Vaadin 7 @@ -75,29 +75,19 @@ The following preferences need to be set to keep the project consistent. You nee 1. Open *Maven Projects* 1. Open *vaadin-uitest* -> *Plugins* -> *jetty* -> *jetty:run-exploded* -1. Open URL *http://localhost:8080/run/* +1. Open URL *http://localhost:8080/run/<testUI>* ## Running a Development Server -1. Open *File* -> *New* -> *Module...* - 1. Choose type *Java* and click *Next* - 1. Type in name uitest-run and set *Content Root* and *Module File Location* to <your project location>/uitest-run - 1. Click *Finish* -1. Open *File* -> *Project Structure...* - 1. Choose uitest-run module - 1. Open *Dependencies* tab - 1. Click *+* -> *Module Dependency* -> *vaadin-uitest* -> *OK* - 1. Click *+* -> *Library...* -> *New Library...* -> *From Maven* - 1. Type in org.eclipse.jetty.aggregate:jetty-all:9.4.0.M0 and press *Tab* - 1. Wait a little while Idea is trying to download the library, then click *OK* - 1. Close *Project Structure* dialog by pressing *OK* -1. Open *Run* -> *Edit Configurations...* then create a new configuration of type *Application* named DevelopmentServerLauncher - 1. Set *Main class* to com.vaadin.launcher.DevelopmentServerLauncher - 1. Set *Single instance only* checkmark - 1. Set *VM options* to -ea - 1. Set *Use classpath options* to uitest-run - 1. Set *Working directory* to uitest - 1. Close *Run/Debug Configurations* dialog by pressing *OK* - -The run configuration is ready. +1. Open *Run* menu and click *Edit Configurations* +1. Click green ***+*** sign at top left corner, select *Maven* from popup +1. In the run configuration page, set any name for the configuration, select *vaadin-uitest* project folder as *Working directory* +1. Type exec:exec@run-development-server into *Command line* and save the configuration +1. Run the configuration and open URL *http://localhost:8888/run/<testUI>* + +## Running a Development Server in a debug mode + +1. Type exec:exec@debug-development-server into *Command line* and save the configuration +1. In the same dialog, create new "Remote" debug configuration, using *localhost* and *Port 5005* +1. Start both configurations and open URL *http://localhost:8888/run/<testUI>* diff --git a/uitest/pom.xml b/uitest/pom.xml index 5473a9d2f8..640d6f9150 100644 --- a/uitest/pom.xml +++ b/uitest/pom.xml @@ -356,6 +356,46 @@ true + + org.codehaus.mojo + exec-maven-plugin + 1.5.0 + + + run-development-server + + exec + + + java + + -ea + -classpath + + com.vaadin.launcher.DevelopmentServerLauncher + + test + + + + debug-development-server + + exec + + + java + + -ea + -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 + -classpath + + com.vaadin.launcher.DevelopmentServerLauncher + + test + + + + -- cgit v1.2.3