title: jersey-spring and jenkins - strange error reading zip file /jersey-core-1.8.jar
body: <p>We have a REST server that we want to build in jenkins. Locally everything's builds fine but when I tell jenkins to build the project it gives me</p>
  
  <pre><code>[INFO] Copying 1 resource
  [WARNING] POM for 'com.sun.jersey:jersey-core:pom:1.8:compile' is invalid. Its dependencies (if any) will NOT be available to the current build. 
  [INFO] [compiler:compile {execution: default-compile}] 
  [INFO] Compiling 2 source files to /usr/share/tomcat6/.jenkins/workspace/xx-engine-integration-server SNAPSHOT/target/classes
  [JENKINS] Archiving /usr/share/tomcat6/.jenkins/workspace/xx-engine-integration-server SNAPSHOT/pom.xml to /usr/share/tomcat6/.jenkins/jobs/xx-engine-integration-server SNAPSHOT/modules/our.package.apps$xx-engine-integration-server/builds/2012-07-04_05-23-22/archive/our.package.apps/xx-engine-integration-server/1.0-SNAPSHOT/xx-engine-integration-server-1.0-SNAPSHOT.pom
  
  [INFO] ------------------------------------------------------------------------ 
  [ERROR] BUILD FAILURE 
  [INFO] ------------------------------------------------------------------------ 
  
  [INFO] Compilation failure error: error reading /usr/share/tomcat6/.m2/repository/com/sun/jersey/jersey-core/1.8/jersey-core-1.8.jar; error in opening zip file
  </code></pre>
  
  <p>Anyone seen this before? Why would the jersey-core pom be invalid? Why does jenkins need tomcat to build my project? </p>
  
  <p>My pom</p>
  
  <pre><code>&lt;!-- ... --&gt;
  
  &lt;packaging&gt;war&lt;/packaging&gt;
  
  &lt;!-- Build --&gt;
  &lt;build&gt;
      &lt;!-- Filtering --&gt;
      &lt;resources&gt;
          &lt;resource&gt;
              &lt;filtering&gt;true&lt;/filtering&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-compiler-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.6&lt;/source&gt;
                  &lt;target&gt;1.6&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;projects-maven&lt;/id&gt;
          &lt;name&gt;My Maven Repository&lt;/name&gt;
          &lt;url&gt;http://path.to.our/repository&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  
  &lt;dependencies&gt;
              &lt;!-- Include Spring 3.1 dependencies and more.. --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;our.path&lt;/groupId&gt;
          &lt;artifactId&gt;core-modules&lt;/artifactId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
          &lt;version&gt;2.5&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.jersey.contribs&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-spring&lt;/artifactId&gt;
          &lt;version&gt;1.8&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>The dependency tree:</p>
  
  <pre><code>[INFO]
  [INFO] --- maven-dependency-plugin:2.4:tree (default-cli) @ xx-manager ---
  [INFO] our.package.apps:xx-manager:war:1.0-SNAPSHOT
  [INFO] +- our.package.base:xx-connect:jar:1.0-SNAPSHOT:compile
  [INFO] |  +- our.package.base:xx-core:jar:1.1-SNAPSHOT:compile
  [INFO] |  |  +- org.springframework:spring-aspects:jar:3.1.0.RELEASE:compile
  [INFO] |  |  +- org.springframework:spring-orm:jar:3.1.0.RELEASE:compile
  [INFO] |  |  +- org.aspectj:aspectjrt:jar:1.6.12:compile
  [INFO] |  |  +- org.aspectj:aspectjweaver:jar:1.6.12:compile
  [INFO] |  |  +- commons-collections:commons-collections:jar:3.2.1:compile
  [INFO] |  |  +- commons-lang:commons-lang:jar:2.3:compile
  [INFO] |  |  +- log4j:log4j:jar:1.2.16:compile
  [INFO] |  |  +- org.slf4j:slf4j-api:jar:1.6.1:compile
  [INFO] |  |  +- org.slf4j:jcl-over-slf4j:jar:1.6.1:runtime
  [INFO] |  |  +- org.slf4j:slf4j-log4j12:jar:1.6.1:runtime
  [INFO] |  |  +- junit:junit:jar:4.10:compile
  [INFO] |  |  |  \- org.hamcrest:hamcrest-core:jar:1.1:compile
  [INFO] |  |  +- org.powermock:powermock-module-junit4:jar:1.4.11:compile
  [INFO] |  |  |  \- org.powermock:powermock-module-junit4-common:jar:1.4.11:compile
  [INFO] |  |  |     +- org.powermock:powermock-core:jar:1.4.11:compile
  [INFO] |  |  |     \- org.powermock:powermock-reflect:jar:1.4.11:compile
  [INFO] |  |  |        \- org.objenesis:objenesis:jar:1.2:compile
  [INFO] |  |  +- org.powermock:powermock-api-mockito:jar:1.4.11:compile
  [INFO] |  |  |  \- org.powermock:powermock-api-support:jar:1.4.11:compile
  [INFO] |  |  +- org.mockito:mockito-all:jar:1.8.4:compile
  [INFO] |  |  +- com.google.guava:guava:jar:10.0.1:compile
  [INFO] |  |  |  \- com.google.code.findbugs:jsr305:jar:1.3.9:compile
  [INFO] |  |  +- com.natpryce:make-it-easy:jar:3.1.0:compile
  [INFO] |  |  |  +- org.hamcrest:hamcrest-library:jar:1.2.1:compile
  [INFO] |  |  |  \- junit:junit-dep:jar:4.8.1:compile
  [INFO] |  |  +- javax.inject:javax.inject:jar:1:compile
  [INFO] |  |  +- cglib:cglib:jar:2.2:compile
  [INFO] |  |  +- joda-time:joda-time:jar:1.6.2:compile
  [INFO] |  |  +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.6.0:compile
  [INFO] |  |  |  +- xml-resolver:xml-resolver:jar:1.2:compile
  [INFO] |  |  |  +- org.apache.cxf:cxf-api:jar:2.6.0:compile
  [INFO] |  |  |  |  +- org.codehaus.woodstox:woodstox-core-asl:jar:4.1.2:runtime
  [INFO] |  |  |  |  |  \- org.codehaus.woodstox:stax2-api:jar:3.1.1:runtime
  [INFO] |  |  |  |  +- org.apache.ws.xmlschema:xmlschema-core:jar:2.0.2:compile
  [INFO] |  |  |  |  +- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile
  [INFO] |  |  |  |  \- wsdl4j:wsdl4j:jar:1.6.2:compile
  [INFO] |  |  |  +- org.apache.cxf:cxf-rt-core:jar:2.6.0:compile
  [INFO] |  |  |  +- org.apache.cxf:cxf-rt-bindings-soap:jar:2.6.0:compile
  [INFO] |  |  |  |  \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:2.6.0:compile
  [INFO] |  |  |  +- org.apache.cxf:cxf-rt-bindings-xml:jar:2.6.0:compile
  [INFO] |  |  |  +- org.apache.cxf:cxf-rt-frontend-simple:jar:2.6.0:compile
  [INFO] |  |  |  \- org.apache.cxf:cxf-rt-ws-addr:jar:2.6.0:compile
  [INFO] |  |  |     \- org.apache.cxf:cxf-rt-ws-policy:jar:2.6.0:compile
  [INFO] |  |  |        \- org.apache.neethi:neethi:jar:3.0.2:compile
  [INFO] |  |  +- org.apache.cxf:cxf-rt-transports-http:jar:2.6.0:compile
  [INFO] |  |  \- org.apache.cxf:cxf-rt-transports-local:jar:2.6.0:compile
  [INFO] |  +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.5:compile
  [INFO] |  |  \- org.codehaus.jackson:jackson-core-asl:jar:1.9.5:compile
  [INFO] |  +- com.sun.jersey:jersey-server:jar:1.12:compile
  [INFO] |  |  +- asm:asm:jar:3.1:compile
  [INFO] |  |  \- com.sun.jersey:jersey-core:jar:1.12:compile
  [INFO] |  +- com.sun.jersey:jersey-client:jar:1.12:compile
  [INFO] |  +- com.sun.jersey:jersey-json:jar:1.12:compile
  [INFO] |  |  +- org.codehaus.jettison:jettison:jar:1.1:compile
  [INFO] |  |  |  \- stax:stax-api:jar:1.0.1:compile
  [INFO] |  |  +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
  [INFO] |  |  |  \- javax.xml.bind:jaxb-api:jar:2.2.2:compile
  [INFO] |  |  |     +- javax.xml.stream:stax-api:jar:1.0-2:compile
  [INFO] |  |  |     \- javax.activation:activation:jar:1.1:compile
  [INFO] |  |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.9.2:compile
  [INFO] |  |  \- org.codehaus.jackson:jackson-xc:jar:1.9.2:compile
  [INFO] |  \- com.sun.jersey.contribs:jersey-multipart:jar:1.6:compile
  [INFO] |     \- org.jvnet:mimepull:jar:1.4:compile
  [INFO] +- our.package.base:xx-security:jar:1.1-SNAPSHOT:compile
  [INFO] |  +- our.package.base:xx-data-jpa:jar:1.1-SNAPSHOT:compile
  [INFO] |  |  +- org.springframework.data:spring-data-jpa:jar:1.0.3.RELEASE:compile
  [INFO] |  |  +- org.springframework.data:spring-data-commons-core:jar:1.1.0.RELEASE:compile
  [INFO] |  |  +- org.hibernate:hibernate-core:jar:4.1.3.Final:compile
  [INFO] |  |  |  +- antlr:antlr:jar:2.7.7:compile
  [INFO] |  |  |  +- org.jboss.logging:jboss-logging:jar:3.1.0.GA:compile
  [INFO] |  |  |  +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar:1.0.0.Final:compile
  [INFO] |  |  |  +- dom4j:dom4j:jar:1.6.1:compile
  [INFO] |  |  |  +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final:compile
  [INFO] |  |  |  +- org.javassist:javassist:jar:3.15.0-GA:compile
  [INFO] |  |  |  \- org.hibernate.common:hibernate-commons-annotations:jar:4.0.1.Final:compile
  [INFO] |  |  +- org.hibernate:hibernate-entitymanager:jar:4.1.3.Final:compile
  [INFO] |  |  +- javax.validation:validation-api:jar:1.0.0.GA:compile
  [INFO] |  |  +- org.hibernate:hibernate-validator:jar:4.3.0.Final:compile
  [INFO] |  |  +- com.mysema.querydsl:querydsl-apt:jar:2.6.0:compile
  [INFO] |  |  |  \- com.mysema.querydsl:querydsl-codegen:jar:2.6.0:compile
  [INFO] |  |  |     \- com.mysema.codegen:codegen:jar:0.4.11:compile
  [INFO] |  |  +- com.mysema.querydsl:querydsl-jpa:jar:2.6.0:compile
  [INFO] |  |  |  \- com.mysema.querydsl:querydsl-core:jar:2.6.0:compile
  [INFO] |  |  |     \- com.mysema.commons:mysema-commons-lang:jar:0.2.2:compile
  [INFO] |  |  \- mysql:mysql-connector-java:jar:5.1.11:compile
  [INFO] |  +- our.package.base:xx-utils:jar:1.1-SNAPSHOT:compile
  [INFO] |  |  \- net.sf.opencsv:opencsv:jar:2.3:compile
  [INFO] |  +- org.springframework.security:spring-security-core:jar:3.1.0.RELEASE:compile
  [INFO] |  +- org.springframework.security:spring-security-config:jar:3.1.0.RELEASE:compile
  [INFO] |  +- org.springframework.security:spring-security-web:jar:3.1.0.RELEASE:compile
  [INFO] |  +- org.springframework.security:spring-security-acl:jar:3.1.0.RELEASE:compile
  [INFO] |  +- org.springframework.security:spring-security-crypto:jar:3.1.0.RELEASE:compile
  [INFO] |  \- net.sf.ehcache:ehcache-core:jar:2.4.6:compile
  [INFO] +- our.package.base:xx-view-mvc:jar:1.0-SNAPSHOT:compile
  [INFO] |  +- org.springframework:spring-webmvc:jar:3.1.0.RELEASE:compile
  [INFO] |  |  \- org.springframework:spring-context-support:jar:3.1.0.RELEASE:compile
  [INFO] |  +- org.springframework:spring-test:jar:3.1.0.RELEASE:compile
  [INFO] |  +- cglib:cglib-nodep:jar:2.2:compile
  [INFO] |  +- javax.servlet:jstl:jar:1.2:compile
  [INFO] |  \- org.freemarker:freemarker:jar:2.3.19:compile
  [INFO] +- our.package.company:xx-engine-integration-server:war:1.0-SNAPSHOT:test
  [INFO] +- javax.servlet:servlet-api:jar:2.5:provided
  [INFO] +- javax.servlet.jsp:jsp-api:jar:2.1:provided
  [INFO] +- org.springframework:spring-test-mvc:jar:1.0.0.BUILD-SNAPSHOT:test
  [INFO] +- xmlunit:xmlunit:jar:1.3:test
  [INFO] +- org.springframework:spring-aop:jar:3.1.0.RELEASE:compile
  [INFO] |  \- aopalliance:aopalliance:jar:1.0:compile
  [INFO] +- org.springframework:spring-asm:jar:3.1.0.RELEASE:compile
  [INFO] +- org.springframework:spring-context:jar:3.1.0.RELEASE:compile
  [INFO] +- org.springframework:spring-beans:jar:3.1.0.RELEASE:compile
  [INFO] +- org.springframework:spring-core:jar:3.1.0.RELEASE:compile
  [INFO] |  \- commons-logging:commons-logging:jar:1.1.1:compile
  [INFO] +- org.springframework:spring-tx:jar:3.1.0.RELEASE:compile
  [INFO] +- org.springframework:spring-web:jar:3.1.0.RELEASE:compile
  [INFO] +- org.springframework:spring-jdbc:jar:3.1.0.RELEASE:compile
  [INFO] \- org.springframework:spring-expression:jar:3.1.0.RELEASE:compile
  </code></pre>