title: Java Maven project build failure
body: <p>I have created a Java project to push data to an Apache Kafka server (this project is error free, according to my IDE).
  When I try to run <code>Maven -&gt; Install</code>, my build fails.</p>
  <p>I receive the following error:</p>
  <pre><code>Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:single (default) on project kafka_producer: Failed to create assembly: Error creating assembly archive jar-with-dependencies: Problem creating jar: invalid LOC header (bad signature) -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  </code></pre>
  <p>If I am going to delete data from the <code>m2.</code> folder and try to update project, its taking more time(for 2 hours only 2% update). and also it affects all other project in workspace.</p>
  <p>Let me know how to resolve the issue in eclipse.
  Below is the pom.xml:</p>
  <hr />
  <pre><code>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;kafka&lt;/groupId&gt;
    &lt;artifactId&gt;Kafka_Producer&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    
   &lt;properties&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
    &lt;/properties&gt; 
    
  &lt;profiles&gt;
      &lt;profile&gt;
        &lt;id&gt;windows_profile&lt;/id&gt;
        &lt;activation&gt;
          &lt;os&gt;
            &lt;family&gt;Windows&lt;/family&gt;
          &lt;/os&gt;
        &lt;/activation&gt;
        &lt;properties&gt;
          &lt;toolsjar&gt;${java.home}/../lib/tools.jar&lt;/toolsjar&gt;
        &lt;/properties&gt;
      &lt;/profile&gt;
      &lt;profile&gt;
        &lt;id&gt;osx_profile&lt;/id&gt;
        &lt;activation&gt;
          &lt;os&gt;
            &lt;family&gt;mac&lt;/family&gt;
          &lt;/os&gt;
        &lt;/activation&gt;
        &lt;properties&gt;
          &lt;toolsjar&gt;${java.home}/../Classes/classes.jar&lt;/toolsjar&gt;
        &lt;/properties&gt;
      &lt;/profile&gt;
    &lt;/profiles&gt;   
  
    
  &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
              &lt;artifactId&gt;poi&lt;/artifactId&gt;
              &lt;version&gt;3.11&lt;/version&gt;
          &lt;/dependency&gt;   
          
          &lt;!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-hdfs --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
              &lt;artifactId&gt;hadoop-hdfs&lt;/artifactId&gt;
              &lt;version&gt;2.2.0&lt;/version&gt;
             &lt;!-- &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
                      &lt;artifactId&gt;guava&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt; --&gt;
          &lt;/dependency&gt;           
          
          &lt;dependency&gt;
             &lt;groupId&gt;com.datastax.cassandra&lt;/groupId&gt;
             &lt;artifactId&gt;cassandra-driver-core&lt;/artifactId&gt;
             &lt;version&gt;3.2.0&lt;/version&gt;
              &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
                  &lt;artifactId&gt;guava&lt;/artifactId&gt;
              &lt;/exclusion&gt;
             &lt;/exclusions&gt; 
          &lt;/dependency&gt;       
          
          &lt;!-- https://mvnrepository.com/artifact/com.relevantcodes/extentreports --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.relevantcodes&lt;/groupId&gt;
              &lt;artifactId&gt;extentreports&lt;/artifactId&gt;
              &lt;version&gt;2.41.2&lt;/version&gt;
          &lt;/dependency&gt;    
      
          &lt;!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.6.1&lt;/version&gt;
          &lt;/dependency&gt;
          
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
          &lt;artifactId&gt;hive-jdbc&lt;/artifactId&gt;
          &lt;version&gt;1.1.0&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
                  &lt;artifactId&gt;guava&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;   
      
      &lt;!-- https://mvnrepository.com/artifact/org.apache.hive/hive-exec --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
          &lt;artifactId&gt;hive-exec&lt;/artifactId&gt;
          &lt;version&gt;2.1.1&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
                  &lt;artifactId&gt;guava&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      
  
      
      &lt;!--  From Hive project --&gt;
      
      &lt;!-- https://mvnrepository.com/artifact/junit/junit --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.12&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
    
      &lt;!--  &lt;dependency&gt;
          &lt;groupId&gt;jdk.tools&lt;/groupId&gt;
          &lt;artifactId&gt;jdk.tools&lt;/artifactId&gt;
          &lt;version&gt;1.7.0_05&lt;/version&gt;
          &lt;scope&gt;system&lt;/scope&gt;
          &lt;systemPath&gt;${JAVA_HOME}/lib/tools.jar&lt;/systemPath&gt;
      &lt;/dependency&gt; 
      
      &lt;dependency&gt;
          &lt;groupId&gt;jdk.tools&lt;/groupId&gt;
          &lt;artifactId&gt;jdk.tools&lt;/artifactId&gt;
          &lt;version&gt;1.8&lt;/version&gt;
          &lt;scope&gt;system&lt;/scope&gt;
          &lt;systemPath&gt;${JAVA_HOME}/lib/tools.jar&lt;/systemPath&gt;
      &lt;/dependency&gt; --&gt;
  
  
      &lt;dependency&gt;
  &lt;groupId&gt;jdk.tools&lt;/groupId&gt;
  &lt;artifactId&gt;jdk.tools&lt;/artifactId&gt;
  &lt;version&gt;1.8.0_171&lt;/version&gt;
  &lt;scope&gt;system&lt;/scope&gt;
  &lt;systemPath&gt;${JAVA_HOME}/lib/tools.jar&lt;/systemPath&gt;
  &lt;/dependency&gt;
      &lt;dependency&gt;
      &lt;groupId&gt;org.apache.kafka&lt;/groupId&gt;
      &lt;artifactId&gt;kafka-clients&lt;/artifactId&gt;
      &lt;version&gt;2.0.0&lt;/version&gt;
  &lt;/dependency&gt;
      
      &lt;!-- https://mvnrepository.com/artifact/org.apache.hive/hive-hbase-handler --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
          &lt;artifactId&gt;hive-hbase-handler&lt;/artifactId&gt;
          &lt;version&gt;2.1.1&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
                  &lt;artifactId&gt;guava&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
  
      
  
      &lt;!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common --&gt;
      
      &lt;!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-core --&gt;
      
      &lt;!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-client --&gt;
  
      
  &lt;!-- https://mvnrepository.com/artifact/com.github.fge/json-schema-validator --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.github.fge&lt;/groupId&gt;
              &lt;artifactId&gt;json-schema-validator&lt;/artifactId&gt;
              &lt;version&gt;2.2.6&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/com.github.fge/jackson-coreutils --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.github.fge&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-coreutils&lt;/artifactId&gt;
              &lt;version&gt;1.8&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
                      &lt;artifactId&gt;guava&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/com.github.fge/json-schema-core --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.github.fge&lt;/groupId&gt;
              &lt;artifactId&gt;json-schema-core&lt;/artifactId&gt;
              &lt;version&gt;1.2.5&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
                      &lt;artifactId&gt;guava&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;   
          
      &lt;!-- https://mvnrepository.com/artifact/net.sourceforge.javacsv/javacsv --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;net.sourceforge.javacsv&lt;/groupId&gt;
          &lt;artifactId&gt;javacsv&lt;/artifactId&gt;
          &lt;version&gt;2.0&lt;/version&gt;
      &lt;/dependency&gt;
      
      &lt;!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.googlecode.json-simple&lt;/groupId&gt;
          &lt;artifactId&gt;json-simple&lt;/artifactId&gt;
          &lt;version&gt;1.1.1&lt;/version&gt;
      &lt;/dependency&gt;
      
          
      
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
              &lt;artifactId&gt;poi-ooxml&lt;/artifactId&gt;
              &lt;version&gt;3.11&lt;/version&gt;
          &lt;/dependency&gt;   
          
  &lt;!--Dependencies--&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;org.hamcrest&lt;/groupId&gt;
              &lt;artifactId&gt;hamcrest-junit&lt;/artifactId&gt;
              &lt;version&gt;2.0.0.0&lt;/version&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.12&lt;/version&gt;
          &lt;/dependency&gt;
   
          &lt;dependency&gt;
              &lt;groupId&gt;com.jayway.restassured&lt;/groupId&gt;
              &lt;artifactId&gt;json-schema-validator&lt;/artifactId&gt;
              &lt;version&gt;2.8.0&lt;/version&gt;
          &lt;/dependency&gt;
   
          &lt;dependency&gt;
              &lt;groupId&gt;com.jayway.restassured&lt;/groupId&gt;
              &lt;artifactId&gt;rest-assured&lt;/artifactId&gt;
              &lt;version&gt;2.8.0&lt;/version&gt;
          &lt;/dependency&gt;
          
          &lt;!-- https://mvnrepository.com/artifact/com.relevantcodes/extentreports --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.relevantcodes&lt;/groupId&gt;
              &lt;artifactId&gt;extentreports&lt;/artifactId&gt;
              &lt;version&gt;2.41.0&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.mongodb&lt;/groupId&gt;
                      &lt;artifactId&gt;mongodb-driver&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;        
         
          
      
          
    &lt;/dependencies&gt;     
    &lt;build&gt;
     &lt;resources&gt;
      &lt;resource&gt;
         &lt;directory&gt;src/main/resources&lt;/directory&gt;
      &lt;/resource&gt;
     &lt;/resources&gt;  
     &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;phase&gt;package&lt;/phase&gt;
                &lt;goals&gt;
                  &lt;goal&gt;single&lt;/goal&gt;
                &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;configuration&gt;
          &lt;archive&gt;
            &lt;manifest&gt;
              &lt;addClasspath&gt;true&lt;/addClasspath&gt;
              &lt;mainClass&gt;SparkCassandra.GetPacketsTime&lt;/mainClass&gt;
            &lt;/manifest&gt;
          &lt;/archive&gt;
           &lt;descriptorRefs&gt;
             &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
           &lt;/descriptorRefs&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;  
    &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.0.0&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;assemble-all&lt;/id&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;shade&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;!--&lt;finalName&gt;PROJECT_NAME-${project.version}-shaded&lt;/finalName&gt;--&gt;
                          &lt;relocations&gt;
                              &lt;relocation&gt;
                                  &lt;pattern&gt;com.google.common&lt;/pattern&gt;
                                  &lt;shadedPattern&gt;shaded.com.google.common&lt;/shadedPattern&gt;
                              &lt;/relocation&gt;
                              &lt;relocation&gt;
                                  &lt;pattern&gt;com.google.protobuf&lt;/pattern&gt;
                                  &lt;shadedPattern&gt;shaded.com.google.protobuf&lt;/shadedPattern&gt;
                              &lt;/relocation&gt;
                          &lt;/relocations&gt;
                          &lt;artifactSet&gt;
                              &lt;includes&gt;
                                  &lt;include&gt;*:*&lt;/include&gt;
                              &lt;/includes&gt;
                          &lt;/artifactSet&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;     
    &lt;/plugins&gt;
   &lt;/build&gt;     
    
    
  &lt;/project&gt;
  </code></pre>
  <hr />