Question

im using maven-war-plugin and sometimes i get Unexpected end of ZLIB input stream when deploying to jboss, its because file is made in jboss directory and not moved/copied there, is there any way to fix it(using maven)?

my configuration:


<build>
    <plugins>
        <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
                <outputDirectory>${jbossDeploy}</outputDirectory>
            </configuration>
        </plugin>
    </plugins>
</build>

Was it helpful?

Solution 2

I made ant script for it that can be used in maven

<build>
 <plugins>
  <plugin>
   <artifactId>maven-antrun-plugin</artifactId>
   <executions>
    <execution>
     <phase>package</phase>
     <configuration>
      <tasks>
       <property name="packageName" value="${project.build.finalName}.${project.packaging}" />
       <property name="outputDir" value="c:/jboss-4.2.1.GA/server/default/deploy" />
       <property name="file" value="${project.build.directory}\${packageName}" />
       <property name="tofile" value="${outputDir}/${packageName}" />
       <echo message="Moving ${file} to ${tofile}" />
       <move file="${file}" tofile="${tofile}" />
      </tasks>
     </configuration>
     <goals>
      <goal>run</goal>
     </goals>
    </execution>
   </executions>
  </plugin>
 </plugins>
</build>

OTHER TIPS

Most likely what you have said is correct.

Maven is probably still building the war when jboss starts to deploy it, so as jboss is reading it, it sees an invalid zip format. You could try using the exploded option, or deploy separately after everything is built.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top