Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] Question about generated ArtifactRepository

Hi,
I see some weird behavior when testing my mirroring approach of copying the .jar.pack.gz files and regenerating the .jar locally. I debugged and nailed it down to this:

1. My mirroring method finds two IArtifactDescriptors. One with no format and one that is 'packed'.
2. I issue a RawMirroringRequest to copy the packed descriptor.
3. The unpacked descriptor is copied!
4. Restoring the .jar now results in an error. "Artifact repository out of sync, overwriting ..."

As it turns out, this is because my source repository is generated from a site.xml and it contains these three rules (and no more):

(& (classifier=osgi.bundle)), ${repoUrl}/plugins/${id}_${version}.jar
(& (classifier=binary)), ${repoUrl}/binary/${id}_${version}
(& (classifier=org.eclipse.update.feature)), ${repoUrl}/features/${id}_${version}.jar

I'm missing this one normally present in repositories created with the publisher:

(& (classifier=osgi.bundle) (format=packed)), ${repoUrl}/plugins/${id}_${version}.jar.pack.gz

Well, in fact, I'm missing this one too:

(& (classifier=org.eclipse.update.feature) (format=packed)), ${repoUrl}/plugins/${id}_${version}.jar.pack.gz

or is it assumed that features are never packed? It wouldn't be much gain since they normally don't contain any Java binaries but tools like the site optimizer will pack features anyway I think.

My problem is that I have no way of detecting that this will happen. I.e. there's no way of knowing that both ArtifactDescriptors represent the same physical artifact since the rules are incomplete. Or is there? If so, how do I do that?

TIA
- thomas


Back to the top