? IntelliJ idea Open Source Community QQ Group 185441009
The first step is to add Pom.xml, where Finalname is the project name
<build> <finalName>ideasimple</finalName> <plugins> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>7.1.6.v20100715</version> <configuration> <stopPort>9988</stopPort> <STOPKEY&G T;foo</stopkey> <scanIntervalSeconds>5</scanIntervalSeconds> <c onnectors> <connector implementation= "Org.eclipse.jetty.server.nio.SelectChannelConnector" ; <port>8080</port> <maxIdleTime>60000</maxIdleTime> </connector> </connectors> <webAppConfig> <contextPath>/</contextPath> </webAppConfig> </configuration> </plugin> <plugin> <groupid>org.apache.maven.plugins</group Id> <artifactId>maven-surefire-plugin</artifactId> <version>2.4.2</v Ersion> <configuration> <skipTests>true</skipTests> </configuration> </plugin> <plugin> <groupid>org.apache.maven .plugins</groupid> <artifactId>maven-war-plugin</artifactId> <VERSION&G T;2.4</version> <configuration> <webResources> <resource> <!--meta-profile directory, relative to Pom.xml file path-to <directo Ry>src/main/webapp/web-inf</directory> <!--whether to filter files, that is, whether to start Auto-config function--<filtering>true</filtering> <!--target path--<targ Etpath>web-inf</targetpath> </resource> </webResources> </configuration> </plugin> <plugin> <groupid>org. Apache.maven.plugins</groupid> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <SOURCE>1.7</SOURC E> <target>1.7</target> <encoding>UTF-8</encoding> </configuration> </plugin> </plugins> </build>
The second step, run:
IntelliJ idea using the Configure Jetty Maven plugin