What’s the purpose of META-INF?

From the official JAR File Specification (link goes to the Java 7 version, but the text hasn’t changed since at least v1.3): The META-INF directory The following files/directories in the META-INF directory are recognized and interpreted by the Java 2 Platform to configure applications, extensions, class loaders and services: MANIFEST.MF The manifest file that is … Read more

Android Studio: Duplicate files copied in APK META-INF/DEPENDENCIES when compile

While Scott Barta’s answer is correct, is lacks a simple and common solution: just add android { packagingOptions { exclude ‘META-INF/DEPENDENCIES’ exclude ‘META-INF/NOTICE’ exclude ‘META-INF/LICENSE’ exclude ‘META-INF/LICENSE.txt’ exclude ‘META-INF/NOTICE.txt’ } } to your build.gradle to ignore those duplicates.

Idea to avoid that spring.handlers/spring.schemas get overwritten when merging multiple spring dependencies in a single jar

I managed to get rid of the bug using the shader plugin instead of the (buggy) assembler plugin: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation=”org.apache.maven.plugins.shade.resource.ManifestResourceTransformer”> <mainClass>at.seresunit.lecturemanager_connector.App</mainClass> </transformer> <transformer implementation=”org.apache.maven.plugins.shade.resource.AppendingTransformer”> <resource>META-INF/spring.handlers</resource> </transformer> <transformer implementation=”org.apache.maven.plugins.shade.resource.AppendingTransformer”> <resource>META-INF/spring.schemas</resource> </transformer> </transformers> </configuration> </execution> </executions> </plugin> I think I found the solution on the springsource … Read more

How to build an Uber JAR (Fat JAR) using SBT within IntelliJ IDEA?

Finally I totally skip using IntelliJ IDEA to avoid generating noise in my global understanding 🙂 I started reading the official SBT tutorial. I created my project with the following file structure : my-project/project/assembly.sbt my-project/src/main/scala/myPackage/MyMainObject.scala my-project/build.sbt Added the sbt-assembly plugin in my assembly.sbt file. Allowing me to build a fat JAR : addSbtPlugin(“com.eed3si9n” % “sbt-assembly” … Read more