I am trying to run an Maven Ant Task with plugin version 2.1.3 and for some reason running into this error:
[javac] Compiling 101 source files to /home/raido/Workspace2/foobar/classes
[javac] error: error reading /home/raido/.m2/repository/foobar/1.0/foobar-1.0.pom; error in opening zip file
[javac] 1 error
Why is it trying to read a xml file as an zip file and how can I avoid this? The file itself is perfectly fine and readable.
That part from the build.xml file:
<target name="compile" depends="init">
<mkdir dir="${build.dir}" />
<mkdir dir="${classes.dir}" />
<javac classpathref="compile.dependency.path" debug="on"
encoding="UTF-8"
deprecation="on" destdir="${classes.dir}"
includes="bar/**/*.java" optimize="off"
srcdir="${src.dir}" />
</target>
The error is targeted to the closing sign >
on the srcdir
row i.e. the whole tag.
I finally figured it out. The problem was that the main ant file had a specific task that produced JAR-s of the modules but I hadn't done it. This shows how important documentation sometimes is which this project doesn't have at all!