manifest.mf

Is it possible to add a custom manifest to a Java library compiled in Netbeans 6.7.1?

ε祈祈猫儿з 提交于 2019-12-07 16:17:05
问题 I tried adding manifest.file=${src.dir}/manifest.mf to project.properties, but looking through the build-impl.xml I see that the manifest.available is usually accompanied by main.class condition, so it makes me believe that my manifest would be added only if the package has a main class, which mine, being a library, does not have. No matter what I tried, the resulting library jar contains just the auto-generated manifest with only Ant-Version and Created-By. 回答1: I ended up adding a Jar task

what is correct internal structure of JAR file

北城以北 提交于 2019-12-07 01:47:17
问题 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 finished JAR file and I get the following when I 'unzip' the file META-INF/MANIFEST.MF MyMainFile.class which is consistent with that found on the oracle web site for the internal structure. (here http://docs.oracle.com/javase/tutorial/deployment/jar

Is it possible to add a custom manifest to a Java library compiled in Netbeans 6.7.1?

白昼怎懂夜的黑 提交于 2019-12-06 00:35:50
I tried adding manifest.file=${src.dir}/manifest.mf to project.properties, but looking through the build-impl.xml I see that the manifest.available is usually accompanied by main.class condition, so it makes me believe that my manifest would be added only if the package has a main class, which mine, being a library, does not have. No matter what I tried, the resulting library jar contains just the auto-generated manifest with only Ant-Version and Created-By. Remus Rusanu I ended up adding a Jar task in the build.xml, which was really good since it allowed me to add a Sign task also after the

Hiding manifest entries with maven

。_饼干妹妹 提交于 2019-12-05 13:51:50
问题 When building a jar file with maven, it will create a manifest file in META-INF/MANIFEST.MF. Its contents currently are: Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Built-By: <my username> Created-By: Apache Maven 3.1.0 Build-Jdk: 1.8.0_5 How can I hide manifest entries? In particular I would like to hide the "Built-By:" entry because I don't see any reason why a jar should include my username. 回答1: The maven-achiver plugin documentation seems pretty clear that you cannot remove

How to add custom lines to MANIFEST.MF?

你。 提交于 2019-12-05 09:49:49
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) += Package.ManifestAttributes( "Build" -> "true" ) } When I add: packageOptions in (Compile, packageBin) += Package.ManifestAttributes( "Sign" -> "true" ) To my build.sbt then only Sign reaches my MANIFEST.MF. Any thoughts? I think you may want something like this (note the manifestSettings added to the settings of the project). import sbt._ import Keys._ import java.util.Date

Conventions for additional content of the manifest.mf file?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 08:43:31
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 suggestions how to name the corresponding keys. Are there any de facto standards or at least common key names that are used in manifests for things that are not covered by the spec? The JAR Manifest: Overview mentions that "Attributes which are not understood are ignored." Anything but a Main Attribute should be OK. Here's a somewhat more comprehensive

what is correct internal structure of JAR file

亡梦爱人 提交于 2019-12-05 07:12:06
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 finished JAR file and I get the following when I 'unzip' the file META-INF/MANIFEST.MF MyMainFile.class which is consistent with that found on the oracle web site for the internal structure. (here http://docs.oracle.com/javase/tutorial/deployment/jar/view.html ) But when I try to run my file I get a 'main class not found' error ? I have seen some

What is use of MANIFEST.MF in WAR/JAR/EAR?

人盡茶涼 提交于 2019-12-04 15:42:43
问题 I am aware of usage of MANIFEST file in a mobile application, but am not aware of usage of same in a Java Application. My guess say like, its being used to keep BUILD information only. Am I correct?? Is this Mandatory?If not, then what are the key benefits that we can draw with this? 回答1: manifest.mf carries attributes of the artifact. One of the most well known ones is for example the main class of the jar that is used to start the jar file when no other class is specified. Syntax: Main

How can I tell which signed jar is causing maven-shade-plugin to fail?

半城伤御伤魂 提交于 2019-12-04 00:16:12
To run maven-shade-plugin, I have to use to method described here due to signed dependencies, as shown here: <plugin> <artifactId>maven-shade-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals><goal>shade</goal></goals> <configuration> <filters> <filter> <!-- filter out signature files from signed dependencies, else repackaging fails with security ex --> <artifact>*:*</artifact> <excludes> <exclude>META-INF/*.SF</exclude> <exclude>META-INF/*.DSA</exclude> <exclude>META-INF/*.RSA</exclude> </excludes> </filter> </filters> </configuration> </execution> </executions> <

How to read meta data from Manifest file

依然范特西╮ 提交于 2019-12-03 22:14:22
问题 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 Corporation) Main-Class: com.example.package1.myClass Name: com/example/package1 Specification-Title: MyPackage Specification-Version: v1.1 Specification-Vendor: MyCompanyName Implementation-Title: MP Implementation-Version: 2015-11-05-C Implementation-Vendor: