use of org.eclipse.tycho.DefaultArtifactKey in project tycho by eclipse.
the class IUXmlTransformerTest method initTestResources.
@BeforeClass
public static void initTestResources() throws Exception {
junit4InTP = new DefaultArtifactKey("eclipse-plugin", "org.junit4", "4.8.1.v20100302");
hamcrestInTP = new DefaultArtifactKey("eclipse-plugin", "org.hamcrest.core", "1.1.0.v20090501071000");
}
use of org.eclipse.tycho.DefaultArtifactKey in project tycho by eclipse.
the class P2DependencyResolver method newDefaultTargetPlatform.
protected DefaultDependencyArtifacts newDefaultTargetPlatform(ReactorProject project, Map<File, ReactorProject> projects, P2ResolutionResult result) {
DefaultDependencyArtifacts platform = new DefaultDependencyArtifacts(project);
platform.addNonReactorUnits(result.getNonReactorUnits());
for (P2ResolutionResult.Entry entry : result.getArtifacts()) {
ArtifactKey key = new DefaultArtifactKey(entry.getType(), entry.getId(), entry.getVersion());
ReactorProject otherProject = projects.get(entry.getLocation());
if (otherProject != null) {
platform.addReactorArtifact(key, otherProject, entry.getClassifier(), entry.getInstallableUnits());
} else {
platform.addArtifactFile(key, entry.getLocation(), entry.getInstallableUnits());
}
}
return platform;
}
use of org.eclipse.tycho.DefaultArtifactKey in project tycho by eclipse.
the class DefaultEquinoxInstallationFactoryTest method setup.
@Before
public void setup() {
bundles = new HashMap<>();
bundles.put(new DefaultArtifactKey("eclipse-plugin", "org.example.bundle1", "1.0"), mockFile("absolute/path/to/bundle1"));
bundles.put(new DefaultArtifactKey("eclipse-plugin", "org.example.bundle2", "1.0"), mockFile("absolute/path/to/bundle2"));
instDesc = new DefaultEquinoxInstallationDescription();
defaultLevel = new BundleStartLevel(null, 7, false);
subject = new DefaultEquinoxInstallationFactory(mock(Logger.class));
}
use of org.eclipse.tycho.DefaultArtifactKey in project tycho by eclipse.
the class DefaultDependencyArtifactsTest method testRelativePath.
@Test
public void testRelativePath() throws IOException {
DefaultDependencyArtifacts tp = new DefaultDependencyArtifacts();
File relative = new File("relative.xml");
File canonical = new File("canonical.xml");
tp.addArtifactFile(new DefaultArtifactKey("foo", "relative", "1"), relative, null);
tp.addArtifactFile(new DefaultArtifactKey("foo", "canonical", "1"), canonical.getAbsoluteFile(), null);
Assert.assertNotNull(tp.getArtifact(relative.getAbsoluteFile()));
Assert.assertNotNull(tp.getArtifact(canonical));
}
use of org.eclipse.tycho.DefaultArtifactKey in project tycho by eclipse.
the class DefaultDependencyArtifactsTest method testEqualArtifacts.
@Test
public void testEqualArtifacts() {
DefaultDependencyArtifacts tp = new DefaultDependencyArtifacts();
ArtifactKey key = new DefaultArtifactKey("type", "id", "version");
File location = new File("location");
tp.addArtifactFile(key, location, asSet("a"));
tp.addArtifactFile(key, location, asSet("a"));
Assert.assertEquals(1, tp.getArtifacts().size());
}
Aggregations