Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6368

Maven 3.5.2 breaks the Maven Invoker Plugin on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Incomplete
    • 3.5.2
    • None
    • None
    • None
    • Windows 7
      run from cygwin with January 2017 updates

    Description

      I found a work around (credit Robert Scholte's quetion for the clue)..

      • make sure all files in $MAVEN_HOME/bin are executable**

      Maven 3.5.2 will not tell you why maven-invoker-fails if it can't find an executable.

      ...................

      With Maven 3.5.2 on Windows 7,. the Maven Invoker Plugin breaks:

      • reporting
        The Maven invocation failed. Error while executing process.
      • leaving empty log files, and streaming nothing from the invoked process

      I have multiple uses in a large project, which have has been working for us through many version of Maven.  They all break, on Windows with:

      • a simple clean attempt to upgrade to Maven 3.5.2.
        (without changing any plugin versions)
      • a complex upgrade attempt, advancing forward as many plugin versions as can be pushed.

      The complex upgrade attempt works with Maven 3.5.0.

      And on testing to isolate it, Maven 3.5.2 + Maven Invoker Plugin 2+ breaks even in simplest form invoking:

      • an empty jar project with no inheritance
      • an empty pom project with no inheritance
      • an empty jar project with direct inheritance from the invoker
      • an empty pom project with direct inheritance from the invoker

      The attached zip very simple test project, which

      • works with:
        • Maven 3.0.5, 3.1.1, 3.2.1, 3.3.3, 3.3.9
          • maven-invoker-plugin 1.6, 1.7, 1.8, 1.9, 2.0.0, 3.0.0, 3.0.1
        • Maven 3.5.0
          • maven-invoker-plugin 2.0.0, 3.0.0, 3.0.1
      • breaks with:
        • Maven 3.5.2
          • maven-invoker-plugin 1.6, 1.7, 1.8, 1.9, 2.0.0, 3.0.0, 3.0.1

      I looked through sources and was able to test with this built locally (but my task is timeboxed and I have not been able to get Maven built from sources in the time I have):

      and traced it as far as the call to:

      • org.apache.maven.shared.invoker.Invoker

                      try
                     

      {                     result = invoker.execute( request );                 }

                      catch ( final MavenInvocationException e )
                     

      {                     getLog().debug( "Error invoking Maven: " + e.getMessage(), e );                     throw new RunFailureException( "Maven invocation failed. " + e.getMessage(),                                                    BuildJob.Result.FAILURE_BUILD );                 }

      but it invoker hides all trace, and I do not have time (I am time boxed this week) to get Maven built from sources to trace it into the Invoker.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            gene Gene Smith
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: