Questions tagged [manifest.mf]

In software packaging, it is common to list the contents of a distribution in a manifest file

This file simply enumerates the files which are included in the distribution, either for processing by various packaging tools, or for human consumption.

The term is a loan from shipping, where a ship's manifest would list the crew or cargo of a vessel.

The manifest may optionally contain a cryptographic hash or checksum of each file. By creating a cryptographic signature for such a manifest file, the entire contents of the distribution package can be validated, as altering any of the files will invalidate the checksums in the manifest file.

The manifest files usually have .MF extension.

337 questions
5
votes
2 answers

Why we have to declare dependencies on manifest of JBOSS 8 (wildfly)?

given the following EAR: my-app.ear my-ejb.jar my-webapp.war lib my-lib.jar my-ejb need the oracle library to work with oracle spatial in order to construct geometry and to store data. The module of oracle is correctly loaded by JBOSS 8…
giusy
  • 365
  • 2
  • 5
  • 17
5
votes
1 answer

How to add custom lines to MANIFEST.MF?

Adding custom key-value-pairs to the MANIFEST.MF using Build.scala seems not to work. Here is my code: import sbt._ import Keys._ import java.util.Date object Build extends Build { packageOptions in (Compile, packageBin) += …
Coxer
  • 1,694
  • 2
  • 26
  • 44
5
votes
1 answer

maven-ear-plugin - How to manipulate Manifest.MF of webModule and ejbModule?

I have a multimodule maven project with the following structure: app (parent) -- pom.xml -- app-ear -- pom.xml -- app-ejb -- src -- pom.xml -- app-web -- src -- pom.xml app/pom.xml This is my…
Mauricio
  • 53
  • 1
  • 4
4
votes
1 answer

How to merge Manifest sections with Gradle and shadowJar

What I need We package our products with Gradle and shadowJar. Some of the libraries we use, utilize individual sections in Jar Manifests, specifically attributes like Implementation-Title and Implementation-Version. These sometimes show in (the…
Patrick Peer
  • 277
  • 1
  • 9
4
votes
3 answers

How to obfuscate an OSGi bundle with ProGuard?

I am currently trying to obfuscate my Eclipse RCP application with ProGuard. The problem is that it obfuscates the package names (the class My.Package.Class turns into something like a.b.c), but keeps the package names in the Export-Package section…
Sergey Borodavkin
  • 285
  • 1
  • 3
  • 7
4
votes
2 answers

Order of entries in MANIFEST.MF

I am adding entries to the MANIFEST.MF in Maven like maven-jar-plugin true
J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
4
votes
2 answers

Read Manifest file in Spring boot application

We are using Spring-boot to build micro-services. In my project set-up we have a common maven module named platform-boot with main class with annotation SpringBootApplication If we want to create a new micro-service (say Service-1), we simply add a…
jack
  • 435
  • 1
  • 4
  • 12
4
votes
1 answer

How to create Manifest file to my existing maven project

I have a maven project. The application has a class with main method. I am creating a jar file for this application which will be called by a batch. The batch will call the jar file and theoretically it will look for class with main method. But the…
romil gaurav
  • 1,121
  • 11
  • 23
  • 43
4
votes
2 answers

ClassPath in manifest does not work

Structure of files in my jar is: com/my/Main.class META-INF/MANIFEST.MF RXTXcomm.jar Manifest.mf consist: Manifest-Version: 1.0 Main-Class: com.my.Main Class-Path: RXTXcomm.jar (empty line present) When I run my jar as: java -jar my.jar I get:…
Cosdix
  • 107
  • 1
  • 10
4
votes
2 answers

How do I correctly use SNAPSHOTS dependencies with EARs and EJBs

I am trying to build an EJB in an EAR. My EJB has dependencies on SNAPSHOTS. So when I build the EAR my structure looks like this: my-ear-1.0.0-SNAPSHOT.ear + META-INF - application.xml - MANIFEST.MF - my-ejb-1.0.0-SNAPSHOT.jar -…
Andrew Wynham
  • 2,310
  • 21
  • 25
4
votes
5 answers

Is it correct or incorrect for a Java JAR to contain its own dependencies?

I guess this is a two-part question. I am trying to write my own Ant task (MyFirstTask) that can be used in other project's build.xml buildfiles. To do this, I need to compile and package my Ant task inside its own JAR. Because this Ant task that I…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
4
votes
1 answer

ManifestEntries when building jar-with-dependencies

I am trying to set my build server information into META-INF/MANIFEST.MF. It works very well when using maven-jar-plugin with manifestEntries . The problem is that when I am packaging the Jar with maven-assembly-plugin to a single Jar with…
eranh
  • 536
  • 1
  • 5
  • 10
4
votes
4 answers

After extracting files from a jar, how to recombine them into a valid jar again?

I extracted the files from a dacapo benchmark jar. jar -xf dacapo-2006-10-MR2.jar Then, I got this folder dacapo-2006-10-MR2 I tried to recombine them together in this way: jar cmf dacapo-2006-10-MR2/META-INF/MANIFEST.MF my-dacapo.jar…
JackWM
  • 10,085
  • 22
  • 65
  • 92
4
votes
7 answers

Using tools that the JDK and/or JRE provide, is there a way to view the Manifest file for a given JAR?

I'm able to read the Manifest file inside of my Java code, but I would also like to know if it's possible, and if it is, how to open up a JAR file from the command line and view its Manifest.MF file, or at the very least be able to specify a…
Thomas Owens
  • 114,398
  • 98
  • 311
  • 431
4
votes
1 answer

Support for manifest only jars in Java Compiler API

Does the Java Compiler API support manifest-only jar files with Class-Path entries in the classpath arguments? I am trying to use the Java Compiler API in Maven Surefire tests, but it seems that the Java Compiler API, or more precisely the…
Timo Westkämper
  • 21,824
  • 5
  • 78
  • 111