Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [p2-dev] Repo2Runnable And Nested JARs


If you have a product build without features, then PDE/Build is likely guessing a value for the unpack and passing this on to the publisher.

The guessing is
1) if at build time, the bundle is a pre-built jar, then unpack=false
2) else, check the Bundle-ClassPath manifest header, if it is empty, or contains ".", then unpack = false
3) else unpack = true

(There is also a special case, if it is a fragment and the name starts with org.eclipse.equinox.launcher then unpack = true).


"Mark Melvin" <Mark.Melvin@xxxxxxxxxx>
Sent by: p2-dev-bounces@xxxxxxxxxxx

05/27/2009 10:42 AM

Please respond to
P2 developer discussions <p2-dev@xxxxxxxxxxx>

To
"P2 developer discussions" <p2-dev@xxxxxxxxxxx>
cc
Subject
RE: [p2-dev] Repo2Runnable And Nested JARs





Sure.  Here is one that gets auto-inflated for me (just a wrapper around the ANTLR runtime).  There is no Eclipse-BundleShape entry here, but this does provide its code as two nested JARs.  I know this is not the currently "accepted" way to do this, but it has been working for us for years and...well...I am slowly trying to get rid of nested JARs...
 
Mark.
 
<?xml version='1.0' encoding='UTF-8'?>
<?metadataRepository version='1.1.0'?>
<repository name='com.signaklara.antlr plugin repository' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'>
 <properties size='2'>
   <property name='p2.timestamp' value='1243019909524'/>
   <property name='p2.compressed' value='true'/>
 </properties>
 <units size='1'>
   <unit id='com.signaklara.antlr' version='2.5.0.v00000003'>
     <update id='com.signaklara.antlr' range='[0.0.0,2.5.0.v00000003)' severity='0'/>
     <properties size='5'>
       <property name='df_LT.providerName' value='ON Semiconductor'/>
       <property name='df_LT.pluginName' value='Antlr Plug-in'/>
       <property name='org.eclipse.equinox.p2.name' value='%pluginName'/>
       <property name='org.eclipse.equinox.p2.provider' value='%providerName'/>
       <property name='org.eclipse.equinox.p2.bundle.localization' value='plugin'/>
     </properties>
     <provides size='13'>
       <provided namespace='org.eclipse.equinox.p2.iu' name='com.signaklara.antlr' version='2.5.0.v00000003'/>
       <provided namespace='osgi.bundle' name='com.signaklara.antlr' version='2.5.0.v00000003'/>
       <provided namespace='java.package' name='com.signaklara.antlr' version='0.0.0'/>
       <provided namespace='java.package' name='org.antlr.runtime' version='0.0.0'/>
       <provided namespace='java.package' name='org.antlr.runtime.debug' version='0.0.0'/>
       <provided namespace='java.package' name='org.antlr.runtime.misc' version='0.0.0'/>
       <provided namespace='java.package' name='org.antlr.runtime.tree' version='0.0.0'/>
       <provided namespace='java.package' name='org.antlr.stringtemplate' version='0.0.0'/>
       <provided namespace='java.package' name='org.antlr.stringtemplate.language' version='0.0.0'/>
       <provided namespace='java.package' name='org.antlr.stringtemplate.misc' version='0.0.0'/>
       <provided namespace='java.package' name='org.antlr.stringtemplate.test' version='0.0.0'/>
       <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
       <provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
     </provides>
     <requires size='1'>
       <required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='[3.4.0,4.0.0)'/>
     </requires>
     <artifacts size='1'>
       <artifact classifier='osgi.bundle' id='com.signaklara.antlr' version='2.5.0.v00000003'/>
     </artifacts>
     <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
     <touchpointData size='1'>
       <instructions size='2'>
         <instruction key='manifest'>
           Bundle-RequiredExecutionEnvironment: J2SE-1.5&#xA;Bundle-Name: %pluginName&#xA;Bundle-Activator: com.signaklara.antlr.AntlrPlugin&#xA;Manifest-Version: 1.0&#xA;Bundle-Vendor: %providerName&#xA;Bundle-ClassPath: dspantlr.jar,antlr-runtime-3.0.1.jar,stringtemplate-3.1b1.jar&#xA;Bundle-ActivationPolicy: lazy&#xA;Bundle-SymbolicName: com.signaklara.antlr;singleton:=true&#xA;Bundle-ManifestVersion: 2&#xA;Bundle-Version: 2.5.0.v00000003&#xA;Bundle-Localization: plugin&#xA;Export-Package: com.signaklara.antlr,org.antlr.runtime,org.antlr.runtime.debug,org.antlr.runtime.misc,org.antlr.runtime.tree,org.antlr.stringtemplate,org.antlr.stringtemplate.language,org.antlr.stringtemplate.misc,org.antlr.stringtemplate.test&#xA;Require-Bundle: org.eclipse.core.runtime;bundle-version=&quot;[3.4.0,4.0.0)&quot;
         </instruction>
         <instruction key='zipped'>
           true
         </instruction>
       </instructions>
     </touchpointData>
   </unit>
 </units>
</repository>

 
 


From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Pascal Rapicault
Sent:
May 26, 2009 8:43 PM
To:
P2 developer discussions
Cc:
P2 developer discussions; p2-dev-bounces@xxxxxxxxxxx
Subject:
RE: [p2-dev] Repo2Runnable And Nested JARs

The only other information that could be used to trigger the presence of this unzip section to be in the metadata is the presence of the Eclipse-BundleShape in the manifest of the bundle.
Would it be your case?
Could you please post the metadata of the IU for which you are seeing this free unzip behavior?
thx
PaScaL

Inactive hide details for "Mark Melvin" ---05/26/2009 11:38:43 AM---Hi Pascal,"Mark Melvin" ---05/26/2009 11:38:43 AM---Hi Pascal,


From:

"Mark Melvin" <Mark.Melvin@xxxxxxxxxx>

To:

"P2 developer discussions" <p2-dev@xxxxxxxxxxx>

Date:

05/26/2009 11:38 AM

Subject:

RE: [p2-dev] Repo2Runnable And Nested JARs





Hi Pascal,


You mention that "usually" the unzipped section is derived from the "unpack" flag. What other scenarios trigger its generation? In my particular case, I do not have any features involved at this point. Besides, the bundles that are being inflated do not have their "unpack" flag set in any features anyway, but P2 seems to be able to somehow tell that they contain nested JARs and inflates them. I cant' seem to figure out how it knows this, however...


Mark.



From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Pascal Rapicault
Sent:
May 22, 2009 5:24 PM
To:
P2 developer discussions
Cc:
P2 developer discussions; p2-dev-bounces@xxxxxxxxxxx
Subject:
Re: [p2-dev] Repo2Runnable And Nested JARs

The auto inflation is triggered by the presence of an "unzipped" section in the touchpoint data (for example look at the org.eclipse.pde.build IU in your profile).
It is the same information that causes the bundle to be unzipped at install time.
Usually this "unzipped" section is generated by the publisher / metadata generator and is derived from the "unpack" flag expressed in the feature.xml.

If the runtime shape does not match the build shape you need, then you will have to do some additional massaging like you would have had to do in the past.

HTH


Inactive hide details for "Mark Melvin" ---05/22/2009 04:08:11 PM---Hi,"Mark Melvin" ---05/22/2009 04:08:11 PM---Hi,


From:

"Mark Melvin" <Mark.Melvin@xxxxxxxxxx>

To:

"P2 developer discussions" <p2-dev@xxxxxxxxxxx>

Date:

05/22/2009 04:08 PM

Subject:

[p2-dev] Repo2Runnable And Nested JARs





Hi,

It looks like the repo2runnable operation is smart enough to detect when
a bundle contains a nested JAR and will inflate that bundle so PDE build
can handle it.  Can anyone tell me how it determines whether a bundle
contains a nested JAR?  I have a particular bundle that just ships
precompiled libraries that are needed at compile-time as nested JARs and
it doesn't seem to inflate this one for me, causing my build to fail.
I'd like to trigger the "auto-inflation" of this bundle as well.

Mark.
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/p2-dev

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/p2-dev

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


Back to the top