Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-37030

Maven build failed in windows!

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Done
    • 3.2.0
    • 3.2.0
    • Build
    • None
    • OS: Windows 10 Professional

      OS Version: 21H1

      Maven Version: 3.6.3

       

    Description

      I pulled the latest Spark master code on my local windows 10 computer and executed the following command:

      mvn -DskipTests clean install

      Build failed!

      Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (default) on project spark-core_2.12: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "bash" (in directory "C:\bigdata\spark\core"): CreateProcess error=2

      It seems that the plugin: maven-antrun-plugin cannot run because of windows no bash. 

      The following code comes from pom.xml in spark-core module.

      <plugin>
      
        <groupId>org.apache.maven.plugins</groupId>
      
        <artifactId>maven-antrun-plugin</artifactId>
      
        <executions>
      
          <execution>
      
            <phase>generate-resources</phase>
      
            <configuration>
      
              <!-- Execute the shell script to generate the spark build information. -->
      
              <target>
      
                <exec executable="bash">
      
                  <arg value="${project.basedir}/../build/spark-build-info"/>
      
                  <arg value="${project.build.directory}/extra-resources"/>
      
                  <arg value="${project.version}"/>
      
                </exec>
      
              </target>
      
            </configuration>
      
            <goals>
      
              <goal>run</goal>
      
            </goals>
      
          </execution>
      
        </executions>
      
      </plugin>
      
      

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            Shockang Shockang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: