use of org.apache.maven.plugins.ear.util.ArtifactRepository in project maven-plugins by apache.
the class ArtifactRepositoryTest method testRepositoryWithMultipleClassifiedArtifactsAndMainArtifact.
@Test
public void testRepositoryWithMultipleClassifiedArtifactsAndMainArtifact() throws PlexusConfigurationException, EarPluginException {
ArtifactTypeMappingService artifactTypeMappingService = new ArtifactTypeMappingService();
ArtifactRepository repo = new ArtifactRepository(createArtifacts(new String[] { "myartifact", "myartifact", "myartifact" }, null, null, new String[] { "class1", "class2", null }), MAIN_ARTIFACT_ID, artifactTypeMappingService);
assertNull(repo.getUniqueArtifact(DEFAULT_GROUPID, "myartifact", "jar"));
assertNotNull(repo.getUniqueArtifact(DEFAULT_GROUPID, "myartifact", "jar", "class1"));
assertNotNull(repo.getUniqueArtifact(DEFAULT_GROUPID, "myartifact", "jar", "class2"));
assertNotNull(repo.getUniqueArtifact(DEFAULT_GROUPID, "myartifact", "jar", MAIN_ARTIFACT_ID));
assertNull(repo.getUniqueArtifact(DEFAULT_GROUPID, "myartifact", "jar", "wrong"));
}
use of org.apache.maven.plugins.ear.util.ArtifactRepository in project maven-plugins by apache.
the class ArtifactRepositoryTest method testEmptyRepository.
@Test
public void testEmptyRepository() {
ArtifactTypeMappingService artifactTypeMappingService = new ArtifactTypeMappingService();
ArtifactRepository repo = new ArtifactRepository(createArtifacts(null), MAIN_ARTIFACT_ID, artifactTypeMappingService);
assertNull(repo.getUniqueArtifact("ear", "ar", "jar"));
assertNull(repo.getUniqueArtifact("ear", "ar", "jar", null));
assertNull(repo.getUniqueArtifact("ear", "ar", "jar", "class"));
}
Aggregations