1 Reply Latest reply on Oct 31, 2013 2:18 PM by xavi.arias.segui

    ArchiveExportException when deploying artifact

    xavi.arias.segui

      Hello,

       

      While running a Maven clean install I get the following exception:

       

      org.jboss.shrinkwrap.api.exporter.ArchiveExportException: File could not be created: target\deployment\_DEFAULT___DEFAULT__dc29d09d-6c6e-47d0-b3c7-2667c2052839.war

       

      I am using SrinkWrap 1.2.0 with Arquillian 1.1.1.Final over Glassfish Embedded 3.1.2.2. Strange that after running again a Maven install, the exception doesn't occur anymore, so it seems that is only when installing after a clean.

       

      After some debugging I found out that the target file passed to AbstractStreamExporterImpl.getOutputStreamToFile() has a relative path when executing a clean install, while the path is absolute when executing a second install without a previous clean. Also, in the first case the the exporter is called by the Arquillian Event framework, while in the second it is called by GlassFishContainer.deploy(Archive<?> archive).

       

      The complete stack trace is attached. Any ideas?

       

      Xavier

        • 1. Re: ArchiveExportException when deploying artifact
          xavi.arias.segui

          Resolved, the problem was in the Arquillian configuration file configured with:

           

            <engine>

              <property name="deploymentExportPath">target/deployment</property>

            </engine>

           

          I have changed to a property-relative path, which is filtered by Maven when deploying:

           

            <engine>

              <property name="deploymentExportPath">${project.build.directory}/deployment</property>

            </engine>