Uploaded image for project: 'Maven WAR Plugin'
  1. Maven WAR Plugin
  2. MWAR-420

build failure in lifecycle deploy: 'Could not copy webapp sources'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.0, 3.2.1, 3.2.2
    • 3.3.0
    • None
    • None

    Description

      Since version 3.2.x there is a build failure in maven-war-plugin on lifecycle 'deploy'.

      mvn package package -e

      If you build sample webapp (see attachement: testWarPlugin.zip) with version 3.2.2 following error occurs:

      [INFO] --- maven-war-plugin:3.2.2:war (default-war) @ testWarPlugin ---
      [INFO] Packaging webapp
      [INFO] Assembling webapp [testWarPlugin] in [C:\TEMP\testWarPlugin\target\testWarPlugin-1.0-SNAPSHOT]
      [INFO] Processing war project
      [INFO] Copying webapp resources [C:\TEMP\testWarPlugin\src\main\webapp]
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 5.106 s
      [INFO] Finished at: 2018-11-07T10:11:58+01:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:3.2.2:war (default-war) on project testWarPlugin: Could not copy webapp sources [C:\TEMP\testWarPlugin\target\testWarPlugin-1.0-SNAPSHOT]: C:\TEMP\testWarPlugin\target\testWarPlugin-1.0-SNAPSHOT\images\ajaxloading.gif -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:3.2.2:war (default-war) on project testWarPlugin: Could not copy webapp sources [C:\TEMP\testWarPlugin\target\testWarPlugin-1.0-SNAPSHOT]
      ...
      Caused by: java.nio.file.AccessDeniedException: C:\TEMP\testWarPlugin\target\testWarPlugin-1.0-SNAPSHOT\images\ajaxloading.gif
          at sun.nio.fs.WindowsException.translateToIOException (WindowsException.java:83)
          at sun.nio.fs.WindowsException.rethrowAsIOException (WindowsException.java:97)
          at sun.nio.fs.WindowsException.rethrowAsIOException (WindowsException.java:102)
          at sun.nio.fs.WindowsFileCopy.copy (WindowsFileCopy.java:165)
          at sun.nio.fs.WindowsFileSystemProvider.copy (WindowsFileSystemProvider.java:278)
          at java.nio.file.Files.copy (Files.java:1274)
      
      

      It only occurs on windows and with maven-war-plugin 3.2.x. Fullstacktrace here: build-error.log

      Version 3.1.0 and older works fine

      Attachments

        1. build-error.log
          13 kB
          Bruno Marti
        2. testWarPlugin.zip
          19 kB
          Bruno Marti

        Issue Links

          Activity

            People

              Unassigned Unassigned
              martib Bruno Marti
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: