构建javadoc的Maven错误

时间:2016-07-08 13:05:17

标签: eclipse maven javadoc

我正在尝试为Eclipse Neon中的程序构建Javadoc,我收到以下错误:

error: error reading /home/jonathan/.m2/repository/org/apache/tika/tika-app/1.13/tika-app-1.13.jar; invalid LOC header (bad signature)
error: error reading /home/jonathan/.m2/repository/org/apache/tika/tika-xmp/1.13/tika-xmp-1.13.jar; invalid LOC header (bad signature)
error: error reading /home/jonathan/.m2/repository/net/arnx/jsonic/1.2.11/jsonic-1.2.11.jar; invalid LOC header (bad signature)
error: error reading /home/jonathan/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar; invalid LOC header (bad signature)

我的pom文件是:

<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">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.ayudante.play</groupId>
  <artifactId>scan</artifactId>
  <version>0.1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>scan</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.3.1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.tika</groupId>
        <artifactId>tika-app</artifactId>
        <version>1.13</version>
    </dependency>
    <dependency>
        <groupId>net.sourceforge.argparse4j</groupId>
        <artifactId>argparse4j</artifactId>
        <version>0.7.0</version>
    </dependency>
  </dependencies>
  <build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.5.1</version>
            <configuration>
              <source>1.8</source>
              <target>1.8</target>
            </configuration>
        </plugin>
    </plugins>
  </build>
</project>

我需要做些什么才能解决问题?

1 个答案:

答案 0 :(得分:2)

您在本地.m2仓库中的jar文件已损坏(或者是否可能是eclipse尝试读取不存在的文件?)

尝试清理.m2回购并重试。

如果您搜索invalid LOC header (bad signature),您会看到当zip文件损坏时会发生这种情况。