[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [tycho-dev] How to get P2 dependency URL with tycho.
|
Hi Tobias
Thank you very much! I archived all my targets. You hint was very valuable. You show me where is no solution. That significantly narrow my field of decisions and I save huge chunk of time.
I just rewrote a little DefaultEquinoxEmbedder and then right after resolution process:
val agentClass = equinox.getClass.getClassLoader().loadClass("org.eclipse.equinox.p2.core.IProvisioningAgent")
val remoteAgent = equinox.getService(agentClass).asInstanceOf[{ def getService(serviceName: String): AnyRef }]
val remoteMetadataRepositoryManager = remoteAgent.getService(IMetadataRepositoryManager.SERVICE_NAME).asInstanceOf[IMetadataRepositoryManager]
val remoteArtifactRepositoryManager = remoteAgent.getService(IArtifactRepositoryManager.SERVICE_NAME).asInstanceOf[IArtifactRepositoryManager]
val repos = remoteArtifactRepositoryManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL)
for (i <- repos) {
val x = remoteArtifactRepositoryManager.loadRepository(i, null) <---- Hurray!!! Bingo. All bundles per URL + bundles with source code as a bonus!!! Wow
System.err.println("!!!" + x)
}
Only few lines, splendid. I will buy to you your favorite alcohol drink (or cup of coffee, tea, chai, cocoa, etc.) if there will be occasion ;-)
Thank you for help.
Alexey