[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.equinox] An error occurred while collecting items to be installed in headless p2 update example

Hello,

I am trying to get the headless p2 update example to run on a local repository. I have pulled the code from the MailRCP example found here.

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/?root=RT_Project

I have modified P2Util to change the URI repository locations that are searched. I have replaced:

final URI[] reposToSearch = manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);

with

URI[] tempReposToSearch = null;
try {
	tempReposToSearch = new URI[] {(new 	
URI("file:///C:/Documents%20and%20Settings/Mike/Desktop/test/"))};
} catch (Exception e) {
	System.err.println("Exception");
}
		
final URI[] reposToSearch = tempReposToSearch;


when the update runs with the above modification on my repo the line

IStatus status = engine.perform(profile,
									new DefaultPhaseSet(), plan.getOperands(),
									pc, sub.newChild(100, SubMonitor.SUPPRESS_ALL_LABELS));


returns an Error status with a message of "An error occurred while collecting items to be installed", an error code of "4" and no exception.


I have even tried

final URI[] reposToSearch = new URI[] {(new File("C:\\Documents and Settings\\Mike\\Desktop\\test\\").toURI())};

with no luck. Can someone please help.

Thanks,
Mike