Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.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
Maven 在不同的屏幕中运行执行_Maven - Fatal编程技术网

Maven 在不同的屏幕中运行执行

Maven 在不同的屏幕中运行执行,maven,Maven,我使用以下命令创建了一个shell脚本: //sudo apt-get install xserver-xephyr(needed only for installation) Xephyr -ac -screen 1280x1024 -br -reset -terminate 2> /dev/null :1 & Xephyr -screen 1024x768 :51 & export DISPLAY=:51 当此脚本运行时,将打开另一个屏幕。之后如果我跑 mvn cl

我使用以下命令创建了一个shell脚本:

//sudo apt-get install xserver-xephyr(needed only for installation)

Xephyr -ac -screen 1280x1024 -br -reset -terminate 2> /dev/null :1 &
Xephyr -screen 1024x768 :51 &
export DISPLAY=:51
当此脚本运行时,将打开另一个屏幕。之后如果我跑

mvn clean package 
然后在这个屏幕中开始执行。所以我可以在我的实际屏幕上继续我的工作

但问题是,当我通过pom.xml文件执行脚本时,它会打开一个屏幕,但无法在该屏幕上执行。它在我的真实屏幕上开始执行

我要运行脚本的pom文件是:

<plugin>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.6.0</version>
            <groupId>org.codehaus.mojo</groupId>
            <executions>
                    <execution><!-- Run our version calculation script -->
                        <id>Renaming build artifacts</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <executable>bash</executable>
                            <commandlineArgs>/home/usr/test.sh</commandlineArgs>
                        </configuration>
                    </execution>
                </executions>
        </plugin>

execmaven插件
1.6.0
org.codehaus.mojo
重命名生成工件
初始化
执行官
猛击
/home/usr/test.sh
问题在哪里?为什么我的执行不会在脚本打开的屏幕上开始? 或者在不同的屏幕上运行执行的任何其他解决方案


谢谢

您无法从Maven内部解决此问题。为什么不从外部调用shell脚本,让它打开新屏幕并触发maven构建呢?是的,如果没有办法,我正计划这样做。