首页 > 解决方案 > 在 Windows 上构建 maven 期间无法执行 .sh 文件(CreateProcess 错误=193,%1 不是有效的 Win32 应用程序)

问题描述

我正在使用 Windows 10。当我在项目上使用 maven 构建时。在此过程中会执行.sh 文件。但是控制台会输出 CreateProcess error=193, %1 is not an valid Win32 application and failure。请问如何在windows上的maven构建期间运行.sh文件?我的pom文件如下。我挣扎了几天,寻找了很长时间。我使用 Maven 3.3.9

  <plugin>
    <artifactId>exec-maven-plugin</artifactId>
    <groupId>org.codehaus.mojo</groupId>
    <executions>
            <execution>
            <id>testing</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>exec</goal>
            </goals>
            <configuration>
                <executable>${basedir}/src/hello-proto.sh</executable>
            </configuration>
        </execution>
    </executions>
  </plugin>

标签: javawindowsmavenbuildsh

解决方案


推荐阅读