]> source.dussan.org Git - vaadin-framework.git/commitdiff
Run devserver under IDEA via maven target (#11152)
authorIlia Motornyi <elmot@vaadin.com>
Thu, 30 Aug 2018 14:08:09 +0000 (17:08 +0300)
committerGitHub <noreply@github.com>
Thu, 30 Aug 2018 14:08:09 +0000 (17:08 +0300)
README.md
uitest/pom.xml

index 0377df5b1d55d38c96fbc1c52503c353c2bfa11d..b60f8ffb28321813591348fbb4198594e387f780 100644 (file)
--- a/README.md
+++ b/README.md
@@ -74,29 +74,18 @@ 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/<testUI>*
+1. Open URL [http://localhost:8888/run/&lt;testUI&gt;](http://localhost:8888/run/<testUI>)
 
 ## Running a Development Server
 
-1. Open *File* -> *New* -> *Module...*
- 1. Choose type *Java* and click *Next*
- 1. Type in name <code>uitest-run</code> and set *Content Root* and *Module File Location* to <code>&lt;your project location&gt;/uitest-run</code>
- 1. Click *Finish*
-1. Open *File* -> *Project Structure...*
- 1. Choose <code>uitest-run</code> module
- 1. Open *Dependencies* tab
- 1. Click *+* -> *Module Dependency* -> *vaadin-uitest* -> *OK*
- 1. Click *+* -> *Library...* -> *New Library...* -> *From Maven*
- 1. Type in <code>org.eclipse.jetty.aggregate:jetty-all:9.4.0.M0</code> 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 <code>DevelopmentServerLauncher</code>
- 1. Set *Main class* to <code>com.vaadin.launcher.DevelopmentServerLauncher</code>
- 1. Set *Single instance only* checkmark
- 1. Set *VM options* to <code>-ea</code>
- 1. Set *Use classpath options* to <code>uitest-run</code>
- 1. Set *Working directory* to <code>uitest</code>
- 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 <code>exec:exec@run-development-server</code> into *Command line* and save the configuration
+1. Run the configuration and open URL [http://localhost:8888/run/&lt;testUI&gt;](http://localhost:8888/run/<testUI>)
+
+## Running a Development Server in a debug mode
 
+1. Type <code>exec:exec@debug-development-server</code> 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/&lt;testUI&gt;](http://localhost:8888/run/<testUI>)
index 91ea2e862ca297c932774b4b0b49db88e69bd597..ca27cf17a64c88f689205c199d505d5189c6dcfe 100644 (file)
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>exec-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>run-development-server</id>
+                        <goals>
+                            <goal>exec</goal>
+                        </goals>
+                        <configuration>
+                            <executable>java</executable>
+                            <arguments>
+                                <argument>-ea</argument>
+                                <argument>-classpath</argument>
+                                <classpath />
+                                <argument>com.vaadin.launcher.DevelopmentServerLauncher</argument>
+                            </arguments>
+                            <classpathScope>test</classpathScope>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>debug-development-server</id>
+                        <goals>
+                            <goal>exec</goal>
+                        </goals>
+                        <configuration>
+                            <executable>java</executable>
+                            <arguments>
+                                <argument>-ea</argument>
+                                <argument>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005</argument>
+                                <argument>-classpath</argument>
+                                <classpath />
+                                <argument>com.vaadin.launcher.DevelopmentServerLauncher</argument>
+                            </arguments>
+                            <classpathScope>test</classpathScope>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
         <pluginManagement>
             <plugins>