[
https://issues.apache.org/jira/browse/MCOMPILER-544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17767084#comment-17767084
]
Christoph Läubrich commented on MCOMPILER-544:
----------------------------------------------
Here is an example pom to reproduce the issue:
{code:java}
<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
https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>ejctest</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>sample for ejc</name>
<dependencies>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>10.0.0</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<compilerId>eclipse</compilerId>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-eclipse</artifactId>
<version>2.13.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
<version>3.32.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
{code}
please note that the error does not fail the build, it is just printed to the
system out:
{code:java}
[INFO] Compiling with eclipse [debug target 1.8] to target/classes
Failed to init Classpath for jar file jakarta.jakartaee-api-10.0.0.pom
java.util.zip.ZipException: zip END header not found
{code}
> ZipException: zip END header not found on POM dependency with Eclipse compiler
> ------------------------------------------------------------------------------
>
> Key: MCOMPILER-544
> URL: https://issues.apache.org/jira/browse/MCOMPILER-544
> Project: Maven Compiler Plugin
> Issue Type: Bug
> Affects Versions: 3.11.0
> Reporter: Václav Haisman
> Priority: Major
>
> There is an impedance matching issue between Maven Compiler Plugin,
> [plexus-compiler-eclipse|https://github.com/codehaus-plexus/plexus-compiler/issues/302],
> and
> [eclipse.jdt.core|https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1274].
> m-c-p adds POM dependency's POM file to classpath, which makes it through
> plexus-compiler-eclipse to JDT and that prints an exception {{ZipException:
> zip END header not found}}. Arguably, m-c-p should not be adding non-JAR,
> non-wildcard-directory path to classpath for the compiler.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)