use of org.eclipse.tycho.core.shared.TargetEnvironment in project tycho by eclipse.
the class P2ResolverImpl method resolveDependencies.
@Override
public List<P2ResolutionResult> resolveDependencies(TargetPlatform targetPlatform, ReactorProject project) {
setContext(targetPlatform, project);
if (project != null && PackagingType.TYPE_ECLIPSE_TEST_PLUGIN.equals(project.getPackaging())) {
addDependenciesForTests();
}
ArrayList<P2ResolutionResult> results = new ArrayList<>();
usedTargetPlatformUnits = new LinkedHashSet<>();
for (TargetEnvironment environment : environments) {
results.add(resolveDependencies(project, new ProjectorResolutionStrategy(logger), environment));
}
context.reportUsedLocalIUs(usedTargetPlatformUnits);
usedTargetPlatformUnits = null;
return results;
}
use of org.eclipse.tycho.core.shared.TargetEnvironment in project tycho by eclipse.
the class PublisherActionRunner method setTargetEnvironments.
/**
* Configure the list of target environments in the {@link PublisherInfo}. This information is
* for example needed by the ProductAction which generates different configuration IUs for each
* environment.
*/
private void setTargetEnvironments(PublisherInfo publisherInfo) {
int writeIx = 0;
String[] configSpecs = new String[environments.size()];
for (TargetEnvironment environment : environments) {
configSpecs[writeIx++] = environment.toConfigSpec();
}
publisherInfo.setConfigurations(configSpecs);
}
use of org.eclipse.tycho.core.shared.TargetEnvironment in project tycho by eclipse.
the class DirectorApplicationCommandTest method testAllDirectorApplicationArguments.
@Test
public void testAllDirectorApplicationArguments() {
subject.addMetadataSources(Arrays.asList(REPO_1, REPO_2));
subject.addArtifactSources(Arrays.asList(REPO_3));
subject.addUnitToInstall(UNIT_1);
subject.addUnitToInstall(UNIT_2);
subject.setEnvironment(new TargetEnvironment(OS, WS, ARCH));
subject.setProfileName(PROFILE_NAME);
subject.setInstallFeatures(true);
File dest = new File(".").getAbsoluteFile();
subject.setDestination(dest);
List<String> result = subject.getDirectorApplicationArguments();
assertThat(result, hasSequence("-metadataRepository", REPO_1 + "," + REPO_2));
assertThat(result, hasSequence("-artifactRepository", REPO_3.toString()));
assertThat(result, hasSequence("-installIU", UNIT_1 + "," + UNIT_2));
assertThat(result, hasSequence("-profile", PROFILE_NAME));
assertThat(result, hasSequence("-profileProperties", "org.eclipse.update.install.features=true"));
assertThat(result, hasSequence(PARAM_OS, OS));
assertThat(result, hasSequence(PARAM_WS, WS));
assertThat(result, hasSequence(PARAM_ARCH, ARCH));
assertThat(result, hasSequence("-destination", dest.toString()));
assertThat(result, hasItem("-roaming"));
}
Aggregations