Newbie - Can I get Netbeans to use my own MANIFEST.MF, exactly?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie - Can I get Netbeans to use my own MANIFEST.MF, exactly?

ohaya
Hi,

I am using Netbeans to built a JAR for a Felix-style plugin.  This requires a specific MANIFEST.MF file under the META-INF directory which is at the top of the JAR.

So, in Netbeans, I created a META-INF directory under the default package under src, but when I run Clean and Build, and then look at the resulting JAR, it has a completely different MANIFEST.MF?

I found some posts about editing the manifest.mf property in project.properties, but so far that hasn't worked for me?

I've tried:

manifest.mf = MANIFEST.MF

and

manifest.ms = META-INF/MANIFEST.MF

but Netbeans still seems to putting one of its own MANIFEST.MF into my output JAR.

I am able to work by unzipping the JAR and manually copying in my MANIFEST.MF but that is kind of painful and easy to messg up, so I am hoping that there is a way to get Netbeans to just use the MANIFEST.MF that I put under the <default package>/META-INF/MANIFEST.MF??

Thanks!

Jim




Reply | Threaded
Open this post in threaded view
|

Newbie - Can I get Netbeans to use my own MANIFEST.MF, exactly?

ohaya
Hi,

For the record, this worked for me:

http://app-security.blogspot.com/2014/03/including-custom-manifestmf-file-in.html

I commented out the:

manifest.file=manifest.mf

and added these 2 lines:

manifest.available=true
manifest.file=${src.dir}/META-INF/manifest.mf




Reply | Threaded
Open this post in threaded view
|

Re: Newbie - Can I get Netbeans to use my own MANIFEST.MF, exactly?

geertjan.wielenga@oracle.com
In reply to this post by ohaya

There’s a wizard in NetBeans for creating OSGi bundles, if that’s what you’re trying to do.


Geertjan Wielenga | Principal Product Manager
Phone: +31620320056 | 
Oracle Developer Tools

ORACLE Netherlands | Hertogswetering 163-167 | 3543 AS Utrecht | Netherlands


Oracle is committed to developing practices and products that help protect the environment

On 20 Oct 2017, at 02:41, ohaya <[hidden email]> wrote:

Hi,

I am using Netbeans to built a JAR for a Felix-style plugin.  This requires a specific MANIFEST.MF file under the META-INF directory which is at the top of the JAR.

So, in Netbeans, I created a META-INF directory under the default package under src, but when I run Clean and Build, and then look at the resulting JAR, it has a completely different MANIFEST.MF?

I found some posts about editing the manifest.mf property in project.properties, but so far that hasn't worked for me?

I've tried:

manifest.mf = MANIFEST.MF

and 

manifest.ms = META-INF/MANIFEST.MF

but Netbeans still seems to putting one of its own MANIFEST.MF into my output JAR.

I am able to work by unzipping the JAR and manually copying in my MANIFEST.MF but that is kind of painful and easy to messg up, so I am hoping that there is a way to get Netbeans to just use the MANIFEST.MF that I put under the <default package>/META-INF/MANIFEST.MF??

Thanks!

Jim