Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: RE: [equinox-dev] OSGI Bundles: alternate manifest.mf location


I suggest we move this discussion into a bug enhancement request.

What you say is correct.  But it is not that simple.  PDE may be able to map everything correctly at build time (Wassim and Pascal probably can state many reasons this would be complicated).  But the runtime also needs to be aware of the mappings to find the bundle manifest and any other resources you may move out of the root of the project.  We currently special case the output folders used to build the java code so we can properly place them on the Bundle-ClassPath at runtime.  A more general mechanism would need to be implemented to do what you are requesting.

This is a good discussion that we need to capture in a bug report because it does not only effect the Equinox team.  Many things would need to align to make such an enhancement.  We need to understand the all the risks vs. rewards to make such a broad change to the way PDE and the runtime work together.

Thanks.

Tom





Ravindar Reddy <rroopreddy@xxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx

07/06/2006 12:46 AM

Please respond to
Ravindar Reddy <rroopreddy@xxxxxxxxx>; Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

To
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
cc
Subject
Re: RE: [equinox-dev] OSGI Bundles: alternate manifest.mf location





Just to add to what Alex said below - I understand that the OSGI package needs the META-INF in the jar at top level. All I am asking is that the source location in OSGI plugin project could be anywhere (like resources/META-INF/MANIFEST.MF) that gets relocated to META-INF/MANIFEST.MF for final bundle package.

The reason I am doing this is to use "Apache Maven" for headless builds and use Eclipse as IDE for OSGI bundles. Currently I am using normal java project for OSGI bundles as I can not relocate the META-INF and let build.properties know about it. Seems like all you need is to introduce an extra property to inform the PDE as to where META-INF is located. Just with this functionality I would be able to build OSGI bundles in both (Maven abd Eclipse) with the same source layout

- Ravi R

----- Original Message ----
From: Alex Blewitt <alex.blewitt@xxxxxxxxx>
To: Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
Sent: Wednesday, July 5, 2006 2:34:19 PM
Subject: Re: RE: [equinox-dev] OSGI Bundles: alternate manifest.mf location

That's only in the final Jar, though. There's no reason that it
couldn't be stored in different locations when it's being built in
source form. (But I suspect it's hard-coded in the PDE runtime.) As
long as it exports a Jar in the right place (just like classes may be
compiled to /bin or /classes, but there's no /bin or /classes in the
output Jar) then there should be no reason why this can't be done in
PDE.

Alex.

On 05/07/06, Philippe Ombredanne <pombredanne@xxxxxxxxx> wrote:
> Ravi:
> Note that a jarred bundle could not be a standard Jar anymore if the
> META-INF was anywhere else.
> http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html
>
> And an OSGi jarred bundle is always a valid Jar file.
> >From the OSGi R4 spec:
> "2.3.2 Java JAR File Restrictions
> OSGi bundles are always valid JAR files."
> "3.2.1 Bundle Manifest Headers
> A bundle can carry descriptive information about itself in the manifest
> file
> that is contained in its JAR file under the name of
> META-INF/MANIFEST.MF. "
>
> So putting the manifest anywhere would break OSGi compatibility afaict.
>
> --
> Cheers
> Philippe
>
> philippe ombredanne | 1 650 799 0949 | pombredanne at nexb.com
> nexB - Open by Design (tm) - http://www.nexb.com
> http://EasyEclipse.org  -  irc://irc.freenode.net/easyeclipse
>
>
> -----Original Message-----
> From: equinox-dev-bounces@xxxxxxxxxxx
> [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Pascal Rapicault
> Sent: Wednesday, July 05, 2006 10:51 AM
> To: Ravindar Reddy; Equinox development mailing list
> Cc: Equinox development mailing list; equinox-dev-bounces@xxxxxxxxxxx
> Subject: Re: [equinox-dev] OSGI Bundles: alternate manifest.mf location
>
>
>
> Yes, PDE requires the manifest file to be located in the META-INF/
> folder at the root of the project.
>
> PaScaL
>
>
>
> Ravindar Reddy <rroopreddy@xxxxxxxxx>
> Sent by: equinox-dev-bounces@xxxxxxxxxxx
> 07/05/2006 01:37 PM Please respond to
> Ravindar Reddy <rroopreddy@xxxxxxxxx>; Please respond to
> Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
>
> ToEquinox development mailing list <equinox-dev@xxxxxxxxxxx>
> cc
> Subject[equinox-dev] OSGI Bundles:  alternate manifest.mf location
>
>
>
>
>
>
>
> PDE Plugin project requires a valid Manifest to be present under
> /meta-inf of the current OSGi bundle project in the workspace, and the
> PDE dependencies virtual classpath variable mounts the deps mentioned in
> the Manifest. Is there a way to use alternate location for OSGI
> MANIFEST.MF file (e.g: resources/META-INF/MANIFEST.MF)?
>
> I created a sample OSGI project and moved to the file to
> resources/META-INF/MANIFEST.MF from META-INF/MANIFEST.MF. Updated
> "build.properties" to reflect this new location. The PDE generated
> errors and was unable to mount the plugin deps mentioned in manifest.mf.
>
>
> Is META-INf location is hard-coded somehow?
>
> Any help is appreciated, thanks
> -Ravi R_______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev



_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


Back to the top