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
8
votes
1 answer

Java unit tests set Manifest property

Is there a way at test time, to inject a property into the Java Manifest (or inject an entire manifest)? We're reading a value from the manifest (version number) which at test time resolves to null. So far we've tried putting a hard coded…
Andrew M
  • 9,149
  • 6
  • 44
  • 63
8
votes
3 answers

What is product ID in Eclipse plugin?

It is said here, that product Id should be set "as defined in your plugin manifest". What does it mean? That product Id should coincide with plugin Id? But this can't be true, since product can contain many plugins. How to specify product in plugin…
Dims
  • 47,675
  • 117
  • 331
  • 600
7
votes
1 answer

what is correct internal structure of JAR file

This is a really silly question that I can't fine a difinitive answer to. Background. I'm using Eclipse (with one of the ANT plugins, on an XP terminal). I have just started playing with ANT, in the [jar] directive I am setting the location of my…
DaveM
  • 734
  • 4
  • 11
  • 35
7
votes
2 answers

manifest.mf is overwritten by eclipse during jar export

I would like make an executable jar archive with eclipse. So into my project I created file src/META-INF/MANIFEST.MF : Manifest-Version: 1.0 Main-Class: MainClass Class-Path: . But when I export my java eclipse project eclipse warn me with…
freedev
  • 25,946
  • 8
  • 108
  • 125
7
votes
5 answers

jar ignores my manifest

Jar is ignoring my manifest file and replaces it with auto-generated manifest. my manifest is : Manifest-Version: 1.0 Created-By: Student Name Main-Class: ua.sumdu.j2se.studentName.tasks.PrintMonth (with empty line) cmd: jar -cvf build/tasks.jar…
ovnia
  • 2,412
  • 4
  • 33
  • 54
7
votes
2 answers

How to get package version at running Tomcat?

How to get package version at running Tomcat? I try getClass().getPackage().getImplementationVersion() but this always returns null. I guess it is because my war wasn't yet packaged and Tomcat executes .classes (aka exploded…
Paul Verest
  • 60,022
  • 51
  • 208
  • 332
6
votes
2 answers

java.class.path doesn't bring Manifest.mf Class-Path property

I'm trying to get my application classpath. I have a jar (named application.jar) and it have in its Manifest.mf other jar files, like Class-Path: a.jar b.jar. Why when I use System.getProperty("java.class.path") my jars a.jar and b.jar are not…
patricK
  • 1,045
  • 11
  • 27
5
votes
1 answer

Best practices for embedding SVN version number in Java jar manifest?

I see questions like How to get revision number from subversion using maven? but are there any standards (defacto or otherwise) for which actual fields to use in the manifest, for the version # and for the repository URL (i.e., showing that it's on…
Steven R. Loomis
  • 4,228
  • 28
  • 39
5
votes
3 answers

Conventions for additional content of the manifest.mf file?

Are there any conventions for the MANIFEST.MF file in a Java JAR beyond the JAR specification? Interesting information I might want to include are: Build date and other build information, SVN Revision, perhaps a description. I haven't found…
Dr. Hans-Peter Störr
  • 25,298
  • 30
  • 102
  • 139
5
votes
2 answers

Couldn't find or load main class when running jar file

I know this is a common issue, but i've tried many things to make this work. Main Class name: Test I've included a MANIFEST.MF with Main-Class attribute, as follows: Main-Class: src.client.Test Main-Class: classes.client.Test Main-Class:…
Phill Alexakis
  • 1,449
  • 1
  • 12
  • 31
5
votes
2 answers

How to build a jar using an own MANIFEST.MF in Eclipse

I have a custom MANIFEST.MF in my java-project in Eclipse. When exporting the project to a jar, I choose Use existing manifest from workspace Extracting the .jar shows that eclipse generated its own manifest. My manifest: Manifest-Version: 1.0…
Sven
  • 111
  • 2
  • 2
  • 5
5
votes
3 answers

How to read meta data from Manifest file

I'm trying to extract information from my manifest file to display in one of the methods in my jar file, but seem to be having some issues. Any help is appreciated. Manifest file: Manifest-Version: 1.0 Created-By: 1.8.0_60 (Oracle…
Chad Estes
  • 371
  • 1
  • 3
  • 15
5
votes
1 answer

Reading own MANIFEST.MF in Java servlet

I am trying to read an own MANIFEST.MF resource in a Java servlet. My situation: I have a WAR (with the manifest I want to read) inside an EAR. There are several other WARs and JARs in the EAR. A class path is really long. I tried several ways found…
user1608790
  • 393
  • 1
  • 3
  • 12
5
votes
1 answer

Does the jar MANIFEST.MF max line length of 72 include the EOL bytes

My understanding of the Manifest specification is a little vague around the exact definition of a line. Specifically the part that reads No line may be longer than 72 bytes (not characters), in its UTF8-encoded form. I'm unsure as to whether a…
Matt
  • 722
  • 10
  • 20
5
votes
0 answers

Maven Assembly Plugin not including Main Class in my jar

I am using the maven assembly plugin to generate an app client that is included in an EAR. However, it isn't including the Main Class for whatever reason. I can't figure out what is wrong. My Maven Assembly plugin:
user924069
1 2
3
22 23