public static ModuleArtifactRepository restoreInstance( IProvisioningAgent agent, File repositoryDir) throws ProvisionException { ModuleArtifactRepository restoredInstance = new ModuleArtifactRepository( agent, repositoryDir.toURI(), ModuleArtifactMap.restoreInstance(repositoryDir)); restoredInstance.load(); return restoredInstance; }
public static ModuleArtifactRepository createInstance( IProvisioningAgent agent, File repositoryDir) throws ProvisionException { ModuleArtifactRepository newInstance = new ModuleArtifactRepository( agent, repositoryDir.toURI(), createArtifactLocationMap(repositoryDir)); // make sure p2artifacts.xml exists newInstance.storeOrProvisioningException(); return newInstance; }