title: Cannot deploy in wildfly
body: <p>I am currently following a tutorial. The project consists of one parent project library-app with 3 modules (library-model, library-resource, library-int-tests). 
  The maven build process fails when processing library-int-tests.
  Here is the exception thrown.</p>
  
  <pre><code>13:54:02,028 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."29b978cf-ba15-4c96-a470-9221d44850d1.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."29b978cf-ba15-4c96-a470-9221d44850d1.war".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "29b978cf-ba15-4c96-a470-9221d44850d1.war"
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_20]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_20]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_20]
  Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018741: Failed to get manifest for deployment "/content/29b978cf-ba15-4c96-a470-9221d44850d1.war/WEB-INF/lib/mockito-core-1.9.5.jar"
      at org.jboss.as.server.deployment.module.ManifestAttachmentProcessor.getManifest(ManifestAttachmentProcessor.java:78) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
      at org.jboss.as.server.deployment.module.ManifestAttachmentProcessor.deploy(ManifestAttachmentProcessor.java:65) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
      ... 5 more
  Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
      at java.util.zip.ZipFile.read(Native Method) [rt.jar:1.8.0_20]
      at java.util.zip.ZipFile.access$1400(ZipFile.java:61) [rt.jar:1.8.0_20]
      at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717) [rt.jar:1.8.0_20]
      at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:420) [rt.jar:1.8.0_20]
      at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158) [rt.jar:1.8.0_20]
      at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:122) [rt.jar:1.8.0_20]
      at org.jboss.vfs.util.PaddedManifestStream.read(PaddedManifestStream.java:43) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
      at java.io.InputStream.read(InputStream.java:170) [rt.jar:1.8.0_20]
      at java.util.jar.Manifest$FastInputStream.fill(Manifest.java:441) [rt.jar:1.8.0_20]
      at java.util.jar.Manifest$FastInputStream.readLine(Manifest.java:375) [rt.jar:1.8.0_20]
      at java.util.jar.Manifest$FastInputStream.readLine(Manifest.java:409) [rt.jar:1.8.0_20]
      at java.util.jar.Attributes.read(Attributes.java:376) [rt.jar:1.8.0_20]
      at java.util.jar.Manifest.read(Manifest.java:199) [rt.jar:1.8.0_20]
      at java.util.jar.Manifest.&lt;init&gt;(Manifest.java:69) [rt.jar:1.8.0_20]
      at org.jboss.vfs.VFSUtils.readManifest(VFSUtils.java:224) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
      at org.jboss.vfs.VFSUtils.getManifest(VFSUtils.java:208) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
      at org.jboss.as.server.deployment.module.ManifestAttachmentProcessor.getManifest(ManifestAttachmentProcessor.java:76) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
      ... 7 more
  </code></pre>
  
  <p>POM.xml file of all modules are below.
  <strong>pom.xml file of library-app (parent project)</strong></p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.library&lt;/groupId&gt;
      &lt;artifactId&gt;library-app&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;/properties&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;JBoss repository&lt;/id&gt;
              &lt;url&gt;https://repository.jboss.org/nexus/content/groups/public-jboss&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;build&gt;
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                      &lt;version&gt;3.2&lt;/version&gt;
                  &lt;/plugin&gt;
  
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.18&lt;/version&gt;
                  &lt;/plugin&gt;
  
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-ear-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.9.1&lt;/version&gt;
                  &lt;/plugin&gt;
  
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.6&lt;/version&gt;
                  &lt;/plugin&gt;
  
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.5&lt;/version&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
  
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
                  &lt;artifactId&gt;gson&lt;/artifactId&gt;
                  &lt;version&gt;2.3.1&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.jboss.resteasy&lt;/groupId&gt;
                  &lt;artifactId&gt;resteasy-client&lt;/artifactId&gt;
                  &lt;version&gt;3.0.2.Final&lt;/version&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.skyscreamer&lt;/groupId&gt;
                  &lt;artifactId&gt;jsonassert&lt;/artifactId&gt;
                  &lt;version&gt;1.2.3&lt;/version&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
  
              &lt;!-- Our library-model src and test jars are below --&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.library&lt;/groupId&gt;
                  &lt;artifactId&gt;library-model&lt;/artifactId&gt;
                  &lt;version&gt;${project.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;com.library&lt;/groupId&gt;
                  &lt;artifactId&gt;library-model&lt;/artifactId&gt;
                  &lt;version&gt;${project.version}&lt;/version&gt;
                  &lt;type&gt;test-jar&lt;/type&gt;
              &lt;/dependency&gt;
  
  
              &lt;!-- Our library-model src and test jars are abve --&gt;
  
      &lt;!-- Our library-resource src and test jars are below --&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.library&lt;/groupId&gt;
                  &lt;artifactId&gt;library-resource&lt;/artifactId&gt;
                  &lt;version&gt;${project.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;com.library&lt;/groupId&gt;
                  &lt;artifactId&gt;library-resource&lt;/artifactId&gt;
                  &lt;version&gt;${project.version}&lt;/version&gt;
                  &lt;type&gt;test-jar&lt;/type&gt;
              &lt;/dependency&gt;
  
      &lt;!-- Our library-resource src and test jars are abve --&gt;
  
  
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax&lt;/groupId&gt;
              &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
              &lt;version&gt;7.0&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
              &lt;version&gt;1.7.7&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.11&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
  
          &lt;!-- &lt;dependency&gt;
              &lt;groupId&gt;org.mockito&lt;/groupId&gt;
              &lt;artifactId&gt;mockito-core&lt;/artifactId&gt;
              &lt;version&gt;2.1.0-RC.1&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
          &lt;/dependency&gt;
   --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.mockito&lt;/groupId&gt;
          &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
          &lt;version&gt;1.9.5&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/org.mockito/mockito-all --&gt;
      &lt;!--    &lt;dependency&gt;
              &lt;groupId&gt;org.mockito&lt;/groupId&gt;
              &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
              &lt;version&gt;1.10.19&lt;/version&gt;
          &lt;/dependency&gt; --&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest-all --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hamcrest&lt;/groupId&gt;
              &lt;artifactId&gt;hamcrest-all&lt;/artifactId&gt;
              &lt;version&gt;1.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.el&lt;/groupId&gt;
              &lt;artifactId&gt;javax.el-api&lt;/artifactId&gt;
              &lt;version&gt;2.2.4&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.glassfish.web&lt;/groupId&gt;
              &lt;artifactId&gt;javax.el&lt;/artifactId&gt;
              &lt;version&gt;2.2.4&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-simple&lt;/artifactId&gt;
              &lt;version&gt;1.6.4&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;modules&gt;
          &lt;module&gt;library-model&lt;/module&gt;
          &lt;module&gt;library-resource&lt;/module&gt;
          &lt;module&gt;library-int-tests&lt;/module&gt;
      &lt;/modules&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>pom.xml file of library-int-test</strong></p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;com.library&lt;/groupId&gt;
          &lt;artifactId&gt;library-app&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
      &lt;artifactId&gt;library-int-tests&lt;/artifactId&gt;
  
      &lt;properties&gt;
          &lt;version.arquillian_core&gt;1.1.5.Final&lt;/version.arquillian_core&gt;
          &lt;version.arquillian.wildfly&gt;8.1.0.Final&lt;/version.arquillian.wildfly&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.library&lt;/groupId&gt;
              &lt;artifactId&gt;library-model&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.library&lt;/groupId&gt;
              &lt;artifactId&gt;library-model&lt;/artifactId&gt;
              &lt;type&gt;test-jar&lt;/type&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.library&lt;/groupId&gt;
              &lt;artifactId&gt;library-resource&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.library&lt;/groupId&gt;
              &lt;artifactId&gt;library-resource&lt;/artifactId&gt;
              &lt;type&gt;test-jar&lt;/type&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
              &lt;artifactId&gt;gson&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.resteasy&lt;/groupId&gt;
              &lt;artifactId&gt;resteasy-client&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.skyscreamer&lt;/groupId&gt;
              &lt;artifactId&gt;jsonassert&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
  
      &lt;/dependencies&gt;
  
  
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;skip-int-tests&lt;/id&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;id&gt;default-testCompile&lt;/id&gt;
                                  &lt;phase&gt;test-compile&lt;/phase&gt;
                                  &lt;configuration&gt;
                                      &lt;testExcludes&gt;
                                          &lt;exclude&gt;**/*.java&lt;/exclude&gt;
                                      &lt;/testExcludes&gt;
                                  &lt;/configuration&gt;
  
                                  &lt;goals&gt;
                                      &lt;goal&gt;testCompile&lt;/goal&gt;
                                  &lt;/goals&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
  
          &lt;profile&gt;
              &lt;id&gt;integrationTests-wildfly&lt;/id&gt;
              &lt;properties&gt;
                  &lt;jboss.home&gt;target/wildfly-8.1.0.Final&lt;/jboss.home&gt;
              &lt;/properties&gt;
  
              &lt;build&gt;
                  &lt;testResources&gt;
                      &lt;testResource&gt;
                          &lt;directory&gt;src/test/resources&lt;/directory&gt;
                          &lt;filtering&gt;true&lt;/filtering&gt;
                      &lt;/testResource&gt;
                  &lt;/testResources&gt;
  
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;id&gt;default-testCompile&lt;/id&gt;
                                  &lt;phase&gt;test-compile&lt;/phase&gt;
                                  &lt;configuration&gt;
                                      &lt;testIncludes&gt;
                                              &lt;include&gt;**/*.java&lt;/include&gt;
                                      &lt;/testIncludes&gt;
                                  &lt;/configuration&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;testCompile&lt;/goal&gt;
                              &lt;/goals&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
                      &lt;/plugin&gt;
  
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                          &lt;configuration&gt;
                              &lt;includes&gt;
                                  &lt;include&gt;**/*IntTest.java&lt;/include&gt;
                              &lt;/includes&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
  
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;id&gt;unpack&lt;/id&gt;
                                  &lt;phase&gt;generate-sources&lt;/phase&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;unpack&lt;/goal&gt;
                                  &lt;/goals&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
  
                          &lt;configuration&gt;
                              &lt;artifactItems&gt;
                                  &lt;artifactItem&gt;
                                      &lt;groupId&gt;org.wildfly&lt;/groupId&gt;
                                      &lt;artifactId&gt;wildfly-dist&lt;/artifactId&gt;
                                      &lt;version&gt;${version.arquillian.wildfly}&lt;/version&gt;
                                      &lt;type&gt;zip&lt;/type&gt;
                                      &lt;overWrite&gt;false&lt;/overWrite&gt;
                                      &lt;outputDirectory&gt;target&lt;/outputDirectory&gt;
                                  &lt;/artifactItem&gt;
                              &lt;/artifactItems&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
  
                      &lt;plugin&gt;
                          &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;id&gt;copy-resources&lt;/id&gt;
                                  &lt;phase&gt;process-resources&lt;/phase&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;copy-resources&lt;/goal&gt;
                                  &lt;/goals&gt;
  
                                  &lt;configuration&gt;
                                      &lt;outputDirectory&gt;${jboss.home}/standalone/configuration&lt;/outputDirectory&gt;
                                      &lt;resources&gt;
                                          &lt;resource&gt;
                                              &lt;directory&gt;src/test/resources/&lt;/directory&gt;
                                              &lt;includes&gt;
                                                  &lt;include&gt;standalone-full.xml&lt;/include&gt;
                                              &lt;/includes&gt;
                                              &lt;filtering&gt;true&lt;/filtering&gt;
                                          &lt;/resource&gt;
                                      &lt;/resources&gt;
                                  &lt;/configuration&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
                      &lt;/plugin&gt;
  
  
                  &lt;/plugins&gt;
              &lt;/build&gt;
  
              &lt;dependencyManagement&gt;
  
                  &lt;dependencies&gt;
                      &lt;dependency&gt;
                          &lt;groupId&gt;org.jboss.shrinkwrap.resolver&lt;/groupId&gt;
                          &lt;artifactId&gt;shrinkwrap-resolver-bom&lt;/artifactId&gt;
                          &lt;version&gt;2.2.0-beta-1&lt;/version&gt;
                          &lt;type&gt;pom&lt;/type&gt;
                          &lt;scope&gt;import&lt;/scope&gt;
                      &lt;/dependency&gt;
  
  &lt;dependency&gt;
          &lt;groupId&gt;org.mockito&lt;/groupId&gt;
          &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
          &lt;version&gt;1.9.5&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
                      &lt;dependency&gt;
                          &lt;groupId&gt;org.jboss.arquillian&lt;/groupId&gt;
                          &lt;artifactId&gt;arquillian-bom&lt;/artifactId&gt;
                          &lt;version&gt;${version.arquillian_core}&lt;/version&gt;
                          &lt;type&gt;pom&lt;/type&gt;
                          &lt;scope&gt;import&lt;/scope&gt;
                      &lt;/dependency&gt;
                  &lt;/dependencies&gt;
              &lt;/dependencyManagement&gt;
  
  
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.jboss.arquillian.core&lt;/groupId&gt;
                      &lt;artifactId&gt;arquillian-core-api&lt;/artifactId&gt;
                      &lt;scope&gt;test&lt;/scope&gt;
                  &lt;/dependency&gt;
  
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.wildfly&lt;/groupId&gt;
                      &lt;artifactId&gt;wildfly-arquillian-container-managed&lt;/artifactId&gt;
                      &lt;version&gt;${version.arquillian.wildfly}&lt;/version&gt;
                      &lt;scope&gt;test&lt;/scope&gt;
                  &lt;/dependency&gt;
  
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.jboss.arquillian.junit&lt;/groupId&gt;
                      &lt;artifactId&gt;arquillian-junit-container&lt;/artifactId&gt;
                      &lt;scope&gt;test&lt;/scope&gt;
                  &lt;/dependency&gt;
  
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.jboss.shrinkwrap.resolver&lt;/groupId&gt;
                      &lt;artifactId&gt;shrinkwrap-resolver-impl-maven&lt;/artifactId&gt;
                      &lt;scope&gt;test&lt;/scope&gt;
                  &lt;/dependency&gt;
  
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.jboss.spec&lt;/groupId&gt;
                      &lt;artifactId&gt;jboss-javaee-7.0&lt;/artifactId&gt;
                      &lt;version&gt;1.0.0.Final&lt;/version&gt;
                      &lt;type&gt;pom&lt;/type&gt;
                      &lt;scope&gt;test&lt;/scope&gt;
                  &lt;/dependency&gt;
  
              &lt;/dependencies&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>pom.xml file of library-model</strong></p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;com.library&lt;/groupId&gt;
          &lt;artifactId&gt;library-app&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
      &lt;artifactId&gt;library-model&lt;/artifactId&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;test-jar&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;dependencies&gt;
          &lt;!-- used for testing phase only for runtime we will use postgresql --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hsqldb&lt;/groupId&gt;
              &lt;artifactId&gt;hsqldb&lt;/artifactId&gt;
              &lt;version&gt;2.3.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
              &lt;version&gt;4.3.7.Final&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
  
          &lt;!-- This hibernate-validator dependency is commented because of validationException. 
              So, below 4.3.2 validation was brought &lt;dependency&gt; &lt;groupId&gt;org.hibernate&lt;/groupId&gt; 
              &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt; &lt;version&gt;5.1.3.Final&lt;/version&gt; 
              &lt;scope&gt;test&lt;/scope&gt; &lt;/dependency&gt; --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
              &lt;version&gt;4.3.2.Final&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>and finally pom.xml file of library-resource</strong></p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;com.library&lt;/groupId&gt;
          &lt;artifactId&gt;library-app&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
      &lt;artifactId&gt;library-resource&lt;/artifactId&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;test-jar&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  
      &lt;dependencies&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.library&lt;/groupId&gt;
              &lt;artifactId&gt;library-model&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.library&lt;/groupId&gt;
              &lt;artifactId&gt;library-model&lt;/artifactId&gt;
              &lt;type&gt;test-jar&lt;/type&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
              &lt;artifactId&gt;gson&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.resteasy&lt;/groupId&gt;
              &lt;artifactId&gt;resteasy-client&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.skyscreamer&lt;/groupId&gt;
              &lt;artifactId&gt;jsonassert&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
  
          &lt;!-- Our library-model src and test jars are abve --&gt;
  
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>I am using wildfly 8.1. The error displays something about mockito. I don't understand it. Please help me fix this issue.</p>
  
  <p>Edit: The error and warn log is huge. I wanted to host complete output to pastebin but could not do it because of the size limit. I've hosted some part of the output here <a href="http://pastebin.com/S2cSaPBt" rel="nofollow">http://pastebin.com/S2cSaPBt</a></p>