0
我有以下Maven Ant任務來啓動批處理文件。使用maven-antrun-plugin在單獨窗口中啓動批處理腳本
mvn clean verify
成功啓動服務器,但它似乎在後臺。 我要的是它推出的服務器在一個單獨的DOS窗口中
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>mavenproject2</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>run</id>
<phase>pre-integration-test</phase>
<configuration>
<target>
<exec executable="cmd"
dir="C:/apps/wlp/bin" spawn="true">
<arg value="/c"/>
<arg value="C:/apps/wlp/bin/server.bat"/>
<arg value="start"/>
<arg value="defaultServer"/>
</exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>