Maven 构建 javadoc 时出错
Maven error building 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>
我需要做什么来解决这个问题?
您在本地 .m2 存储库中的 jar 文件已损坏(或者可能是 eclipse 试图读取不存在的文件?)
尝试清理您的 .m2 存储库并重试。
如果您搜索 invalid LOC header (bad signature)
,您会发现当 zip 文件损坏时会发生这种情况。
我正在尝试为 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>
我需要做什么来解决这个问题?
您在本地 .m2 存储库中的 jar 文件已损坏(或者可能是 eclipse 试图读取不存在的文件?)
尝试清理您的 .m2 存储库并重试。
如果您搜索 invalid LOC header (bad signature)
,您会发现当 zip 文件损坏时会发生这种情况。