scalasbtxsbt-web-plugin

SBT prepare WAR file, duplicate entry: META-INF/MANIFEST.MF


I am trying to pack one of the modules of my application into a war. I have chosen xsbt-web-plugin to help me out.

I have prepared the sbt, I guess correctly:

lazy val `my-project` = (project in file("my-project"))
                         ...
                         .enablePlugins(TomcatPlugin)

But during sbt package I get this error:

[info] Packaging /home/siatkowskim/Documents/....target/scala-2.11/my-project_2.11-1.2-SNAPSHOT.war ...
[error] java.util.zip.ZipException: duplicate entry: META-INF/MANIFEST.MF

I am familiar with sbt-assembly but I see no way of deduplication here. How can I even debug, where is it duplicated from? Or how to solve this duplication?


Solution

  • Turned out I had MANIFEST.MF file in my classpath. I do not know what it was for, but removing it solved the problem.