[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Avoiding JRE IUs and Generator Mode?

Yeah, I'm not sure where that event buss is coming from, possibly exemplary setup. I'm looking at cleaning up some other messages in our headless tools, I'll see if I can track that down.

thanks for keeping us updated.

cheers,
ian

On Tue, May 12, 2009 at 8:28 AM, Mark Melvin <Mark.Melvin@xxxxxxxxxx> wrote:
I launched it via eclipsec.exe. 
 
The -source parameter was the culprit - thanks for that.  Removing "file:" fixed the problem and it ran successfully.  I still got the weird log message about the event bus, but it seems to have worked nonetheless.
 
Mark.


From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Ian Bull
Sent: May 12, 2009 11:23 AM

To: P2 developer discussions
Subject: Re: [p2-dev] Avoiding JRE IUs and Generator Mode?

How did you launch this?  Are you creating launch configurations and running it from Eclipse?

Also, source is a file location, not a URI (that is, I don't think you should have file:/ in front)


cheers,
ian

On Tue, May 12, 2009 at 7:52 AM, Mark Melvin <Mark.Melvin@xxxxxxxxxx> wrote:
Thanks, Ian - but following the directions I can't make it work.  I tried the first format and I get empty metadata and artifacts in my repository, with a .log file dumped into my Eclipse configuration directory with the following contents:
 
!SESSION 2009-05-12 10:50:27.551 -----------------------------------------------
eclipse.buildId=I20090507-2000
java.version=1.6.0_11
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_CA
Framework arguments:  -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher -metadataRepository file:C:/Temp/p2/testing_publisher/repository -artifactRepository file:C:/Temp/p2/testing_publisher/repository -source file:C:/Temp/p2/testing_publisher/update-site -append -publishArtifacts
Command-line arguments:  -os win32 -ws win32 -arch x86 -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher -metadataRepository file:C:/Temp/p2/testing_publisher/repository -artifactRepository file:C:/Temp/p2/testing_publisher/repository -source file:C:/Temp/p2/testing_publisher/update-site -append -publishArtifacts
 
!ENTRY org.eclipse.equinox.p2.repository 4 0 2009-05-12 10:50:28.504
!MESSAGE ProvisioningEventBus could not be obtained. Metadata caches may not be cleaned up properly.
 
Mark.


From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Ian Bull
Sent: May 11, 2009 5:43 PM

To: P2 developer discussions
Subject: Re: [p2-dev] Avoiding JRE IUs and Generator Mode?

I'm starting the publisher docs here:
http://wiki.eclipse.org/Equinox/p2/Publisher

There is still long way to go, but it's a start.

This brings up a good question.  Andrew, should I include the PDE Build publishing related tasks (the ones contributed by build) in this documentation?

cheers,
ian

On Mon, May 11, 2009 at 2:26 PM, Andrew Niefer <aniefer@xxxxxxxxxx> wrote:

There are these:

Contributed by org.eclipse.pde.build:
eclipse.gatherFeature : publish a feature from source (ie feature has build.properties), also does the root properties.  implemented by GatherFeatureTask.
eclipse.gatherBundle : publish a bundle from source (.class files have been compiled), implemented by GatherBundleTask
eclipse.publish.featuresAndBundles : publishes binary features/bundles.  Also does categories. implemented by FeaturesAndBundlesTask
eclipse.brand.p2.artifacts : brands launcher artifacts for a product (normally provided by org.eclipse.equinox.executable), changes launcher name/icon, etc.  Republishes them under a new IU matching the product.

The two eclipse.gather* tasks are used by pde.build to create the jars from source during a publish.bin.parts target in the generated build.xml, this replaces the gather.bin.parts from before.

Contributed by org.eclipse.equinox.p2.publisher:
p2.publish.featuresAndBundles : just like eclipse.publish.featuresAndBundles above, but doesn't do categories.  implemented by FeaturesAndBundlesPublisherTask
p2.publish.product : publish a .product file assuming required things are already in the repo, implemented by ProductPublisherTask.  This will publish a JRE IU, which will be required if your product includes bundles that import packages that are provided by the system.
p2.publisher : I don't know about this one, might not be tested.  probably a replacement of p2.generator, implemented by PublisherTask

Contributed by org.eclipse.equinox.p2.repository.tools
p2.repo2runnable : transform repositories into "runnable" form which can be compiled against., Repo2RunnableTask
p2.mirror : mirroring for artifacts and metadata, with slicing and filters.  MirrorTask
p2.process.artifacts : optionally sign/condition/pack jars using the jarprocessor task.  Also update the artifact repo with new descriptors for pack200 and update the MD5 sums to match the artifacts. ProcessRepoTask
p2.composite.repository: create composite repositories.  CompositeRepositoryTask


Both the build and publisher tasks above support the p2.inf file.  For bundles and features, the difference is the pde.build gather tasks publish directly from source at build time.  For these tasks, you don't actually need to include the p2.inf in your binary bundles (although you can), it just needs to be there with the source.  The publisher featuresAndBundles task publishes from binary jars, so you do need to included the p2.inf in the jar if you are using it.

(Note, in all of the above, when I say source, I mean your project checked out from CVS, not a generated source bundle org.foo.source.)

-Andrew


05/11/2009 02:48 PM

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

To
"P2 developer discussions" <p2-dev@xxxxxxxxxxx>
cc
Subject
RE: [p2-dev] Avoiding JRE IUs and Generator Mode?





Aha - well I didn't realize that was an old task.  So, the tasks I can use that are not documented - where are they located source-wise?  I'm fine digging through source.  I have found that the PDE call to "eclipse.gatherFeature" seems to work without the JRE cruft as well.
 
However, the "p2.publish.featuresAndBundles" task seems to be what I need.  Does this handle p2.inf when it is called?  I'm a little confused as to when this file is needed.  Is it just a "publish-time" thing, or is it needed at build time as well.  I guess what I am asking is - should I just build my features and plugins the way I always did, but include the p2.inf file in my JAR, then later use it as part of a publish or metadata generation step?
 
Mark.


From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Andrew Niefer
Sent:
May 11, 2009 1:26 PM
To:
P2 developer discussions
Subject:
Re: [p2-dev] Avoiding JRE IUs and Generator Mode?



Mark,

I don't see any way to turn off the generation of this IU using that task.


The incremental mode keeps the results of the generation around in memory so that the next invocation of the task will add to them.  Mode "final" will then clear those accumulated results and also generate a parent container IU if a .product file is used or root id is provided.


Note that this "p2.generator" task is the 3.4 based metadata generator.  3.5 has a new publisher which supports more customization (through the p2.inf file) that the generator didn't.  There are publisher tasks that could be used to avoid the jre IU if you were only doing features, unfortunately they aren't yet documented.


The "p2.publish.featuresAndBundles" task will publish built feature and plugin jars.  It supports a  "source" attribute specifying a directory containing features and plugins subfolders.  It also supports nested <features> and <bundles> elements which are ant Filesets specifying features and bundles to publish.  It also has the following attributes that should correspond to the same thing on the p2.generator task: artifactRepository, metadataRepository, artifactRepositoryName, metadataRepositoryName, append, compress, publishArtifacts.  Using this task won't create jre IUs.


-Andrew




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

05/11/2009 11:50 AM

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


To
"P2 developer discussions" <p2-dev@xxxxxxxxxxx>
cc
Subject
[p2-dev] Avoiding JRE IUs and Generator Mode?







Hi There,

I am trying to integrate the P2 stuff into my build and I am getting
entries in my metadata for individual features like this:

<unit id='config.a.jre' version='1.6.0' singleton='false'>
 ...
</unit>

<unit id='a.jre' version='1.6.0' singleton='false'>
<provides size='159'>
    <provided namespace='org.eclipse.equinox.p2.iu' name='a.jre'
version='1.6.0'/>
 ....
</unit>


I am calling the "p2.generator" Ant task with noDefaultIUs set to "true"
(which avoids generating a whole pile of cruft), but the JRE stuff still
gets in there.  Is there any way to avoid the JRE stuff?  I plan on
merging all of my metadata at the end when I combine all of my features
into one large repository.

Also, what is the difference between "incremental" mode and "final"
mode?  I build my features individually using a custom set of scripts
and I think I want mode="final", but I'd like to know that the
difference is between the two.

Thanks,
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




--
R. Ian Bull | EclipseSource Victoria | +1 250 477 7484
http://eclipsesource.com | http://twitter.com/eclipsesource

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




--
R. Ian Bull | EclipseSource Victoria | +1 250 477 7484
http://eclipsesource.com | http://twitter.com/eclipsesource

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




--
R. Ian Bull | EclipseSource Victoria | +1 250 477 7484
http://eclipsesource.com | http://twitter.com/eclipsesource