Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
当jetty服务器启动时,如何使jetty打开chrome浏览器?_Jetty_Embedded Jetty_Maven Jetty Plugin - Fatal编程技术网

当jetty服务器启动时,如何使jetty打开chrome浏览器?

当jetty服务器启动时,如何使jetty打开chrome浏览器?,jetty,embedded-jetty,maven-jetty-plugin,Jetty,Embedded Jetty,Maven Jetty Plugin,我想在jetty服务器启动时打开我的chrome浏览器。为此,我在我个人资料的插件中添加了ant插件(我还有jetty插件,可以正常工作): 发展 org.eclipse.jetty 手动操作,它可以工作。知道如何自动启动浏览器吗 这一点以前在Alternate ant技术中使用Desktop.getDesktop().browse(url)-Groovy(作为maven插件)技术中使用Desktop.getDesktop().browse(url)-Groovy(作为maven插件)使用De

我想在jetty服务器启动时打开我的chrome浏览器。为此,我在我个人资料的插件中添加了ant插件(我还有jetty插件,可以正常工作):


发展
org.eclipse.jetty

手动操作,它可以工作。知道如何自动启动浏览器吗

这一点以前在Alternate ant技术中使用
Desktop.getDesktop().browse(url)
-Groovy(作为maven插件)技术中使用
Desktop.getDesktop().browse(url)
-Groovy(作为maven插件)使用
Desktop.getDesktop().browse(url)
-
<profiles>
        <profile>
            <id>DEV</id> <!-- to be used for building GUI for local Tomcat -->
            <build>
                <plugins>
          <plugin>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-maven-plugin</artifactId>
                        <version>9.4.22.v20191022</version>
                        <configuration>
                            <scanIntervalSeconds>2</scanIntervalSeconds>
                            <webAppConfig>
                                <contextPath>/dev</contextPath>
                            </webAppConfig>
                            <configuration>
                                <webApp>${basedir}\target</webApp>
                            </configuration>
                            <connectors>
                                <connector
                                    implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
                                    <port>8080</port>
                                    <maxIdleTime>60000</maxIdleTime>
                                </connector>
                            </connectors>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>com.oracle</groupId>
                                <artifactId>ojdbc8</artifactId>
                                <version>${ojdbc8.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                    <plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <version>1.7</version>
    <executions>
      <execution>
        <id>Run URL in system browser.</id>
        <phase>install</phase>
        <configuration>
          <target>
            <exec executable="start" vmlauncher="false">
              <arg line="http://localhost:8080/dev/"/>
            </exec>
          </target>
        </configuration>
        <goals>
          <goal>run</goal>
        </goals>
      </execution>
    </executions>
  </plugin>