Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] touchpoint actions and feature artifacts

Are you looking at the feature.jar or feature.group IU?

Also, if you're using a feature.jar to deliver content be aware that there is a filter [ (org.eclipse.update.install.features=true) ] .

IMO you're better off delivering the content in a native iu although you'll have to author it yourself.
-Simon


Inactive hide details for Scott Lewis ---05/20/2009 09:29:25 PM---Question:Scott Lewis ---05/20/2009 09:29:25 PM---Question:


From:

Scott Lewis <slewis@xxxxxxxxxxxxxxxxx>

To:

P2 developer discussions <p2-dev@xxxxxxxxxxx>

Date:

05/20/2009 09:29 PM

Subject:

[p2-dev] touchpoint actions and feature artifacts




Question:

I'm creating a new touchpoint, and inside an action within this
touchpoint I have code that looks like this:

       IInstallableUnit iu = (IInstallableUnit) parameters
               .get(ActionConstants.PARM_IU);

       if (iu.getArtifacts() == null || iu.getArtifacts().length == 0)
           return Status.OK_STATUS;

       IArtifactKey artifactKey = iu.getArtifacts()[0];

the intention here is to get the artifact (jar) and then mess with it
(actually to get some stuff out of it but that's not material to this
question).

The problem I'm experiencing is that when the iu is a *feature* the call
to iu.getArtifacts() returns null and so

       if (iu.getArtifacts() == null || iu.getArtifacts().length == 0)
           return Status.OK_STATUS;

  is executed and my action doesn't do what I want it to do.

Obviously this isn't what is desired.  Is there some other pattern of
code to use to access the feature jar artifact from inside the action?  
Or is it necessary to always put these things in a bundle (rather than a
feature)?  I have verified that the feature jar exported to the repo
contains the artifacts that I'm looking for, so if I could get to the
feature.jar artifact then I would be there I believe.

Thanksinadvance for any info.

Scott



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


GIF image

GIF image


Back to the top