use of org.eclipse.tycho.p2.repository.MavenRepositoryCoordinates in project tycho by eclipse.
the class GAVArtifactDescriptorTest method testSerializationOmitsDefaults.
@Test
public void testSerializationOmitsDefaults() {
MavenRepositoryCoordinates coordinates = new MavenRepositoryCoordinates(TEST_GAV, DEFAULT_CLASSIFIER, DEFAULT_CLASSIFIER);
subject = new GAVArtifactDescriptor(createP2Descriptor(), coordinates);
ArtifactDescriptor serialized = new ArtifactDescriptor(subject);
assertThat(serialized.getProperties().keySet(), not(hasItem("maven-classifier")));
assertThat(serialized.getProperties().keySet(), not(hasItem("maven-extension")));
}
use of org.eclipse.tycho.p2.repository.MavenRepositoryCoordinates in project tycho by eclipse.
the class GAVArtifactDescriptorTest method testGetLocalRepositoryPathWithDefaults.
@Test
public void testGetLocalRepositoryPathWithDefaults() {
MavenRepositoryCoordinates coordinates = new MavenRepositoryCoordinates(TEST_GAV, DEFAULT_CLASSIFIER, DEFAULT_EXTENSION);
subject = new GAVArtifactDescriptor(createP2Descriptor(), coordinates);
assertThat(subject.getMavenCoordinates().getLocalRepositoryPath(), is("mvn/group/mvn.id/4.3.0-SNAPSHOT/mvn.id-4.3.0-SNAPSHOT.jar"));
}
use of org.eclipse.tycho.p2.repository.MavenRepositoryCoordinates in project tycho by eclipse.
the class GAVArtifactDescriptorTest method testCreationFromPlainP2DescriptorForPackedArtifact.
@Test
public void testCreationFromPlainP2DescriptorForPackedArtifact() {
ArtifactDescriptor input = createP2Descriptor();
input.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
// no maven properties set
subject = new GAVArtifactDescriptor(input);
assertThat(subject.getArtifactKey(), is(TEST_KEY));
assertThat(subject.getMavenCoordinates(), is(new MavenRepositoryCoordinates("p2.p2.class", "p2.id", "4.3.0.20130614", "pack200", "jar.pack.gz")));
}
use of org.eclipse.tycho.p2.repository.MavenRepositoryCoordinates in project tycho by eclipse.
the class GAVArtifactDescriptorTest method testCreation.
@Test
public void testCreation() {
MavenRepositoryCoordinates coordinates = new MavenRepositoryCoordinates(TEST_GAV, OTHER_CLASSIFIER, OTHER_EXTENSION);
subject = new GAVArtifactDescriptor(createP2Descriptor(), coordinates);
assertThat(subject.getArtifactKey(), is(TEST_KEY));
assertThat(subject.getMavenCoordinates(), is(coordinates));
}
use of org.eclipse.tycho.p2.repository.MavenRepositoryCoordinates in project tycho by eclipse.
the class GAVArtifactDescriptorTest method testDeserializationWithRedundantDefaultExt.
@Test
public void testDeserializationWithRedundantDefaultExt() {
ArtifactDescriptor input = createP2Descriptor();
setGAVProperties(input);
input.setProperty("maven-extension", DEFAULT_EXTENSION);
subject = new GAVArtifactDescriptor(input);
assertThat(subject.getMavenCoordinates(), is(new MavenRepositoryCoordinates(TEST_GAV, DEFAULT_CLASSIFIER, DEFAULT_EXTENSION)));
}
Aggregations