private ProvisioningContext createNoRepoContext(ProfileChangeRequest request) { ProvisioningContext noRepoContext = new ProvisioningContext(agent); noRepoContext.setMetadataRepositories(new URI[0]); noRepoContext.setArtifactRepositories(new URI[0]); noRepoContext.setProperty(INCLUDE_PROFILE_IUS, Boolean.FALSE.toString()); noRepoContext.setExtraInstallableUnits(new ArrayList<>(request.getProfile() .query(QueryUtil.createIUAnyQuery(), new NullProgressMonitor()).toUnmodifiableSet())); return noRepoContext; }
@Override public IProvisioningPlan getDiffPlan(IProfile currentProfile, IProfile targetProfile, IProgressMonitor monitor) { SubMonitor sub = SubMonitor.convert(monitor, ExpandWork); sub.setTaskName(Messages.Director_Task_Resolving_Dependencies); try { IProfileChangeRequest profileChangeRequest = FormerState.generateProfileDeltaChangeRequest(currentProfile, targetProfile); ProvisioningContext context = new ProvisioningContext(agent); if (context.getProperty(INCLUDE_PROFILE_IUS) == null) context.setProperty(INCLUDE_PROFILE_IUS, Boolean.FALSE.toString()); context.setExtraInstallableUnits(Arrays.asList( targetProfile.available(QueryUtil.createIUAnyQuery(), null).toArray(IInstallableUnit.class))); return getProvisioningPlan(profileChangeRequest, context, sub.newChild(ExpandWork / 2)); } finally { sub.done(); } }
agentCtx.setMetadataRepositories(new URI[0]); ArrayList<IInstallableUnit> extraIUs = new ArrayList<>(unattachedState); agentCtx.setExtraInstallableUnits(extraIUs); Object agentSolution = getSolutionFor(agentRequest, agentCtx, monitor.newChild(3)); if (agentSolution instanceof IProvisioningPlan