Skip to content

Commit

Permalink
Generify PomDependencyCollector
Browse files Browse the repository at this point in the history
  • Loading branch information
akurtakov committed Jul 8, 2022
1 parent 74a1772 commit b7f1e0b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2021 Sonatype Inc. and others.
* Copyright (c) 2011, 2022 Sonatype Inc. and others.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -61,7 +61,7 @@ public void testAddArtifactWithExistingMetadataRespectsClassifier() throws Excep

subject.addArtifactWithExistingMetadata(artifact, existingMetadata());

Collection<IInstallableUnit> units = (Collection<IInstallableUnit>) subject.getMavenInstallableUnits().keySet();
Collection<IInstallableUnit> units = subject.getMavenInstallableUnits().keySet();
assertThat(units, hasItem(unitWithId("test.unit.source")));
assertEquals(1, units.size());
}
Expand All @@ -73,7 +73,7 @@ public void testAddArtifactWithExistingMetadataOfMainArtifact() throws Exception

subject.addArtifactWithExistingMetadata(artifact, existingMetadata());

Collection<IInstallableUnit> units = (Collection<IInstallableUnit>) subject.getMavenInstallableUnits().keySet();
Collection<IInstallableUnit> units = subject.getMavenInstallableUnits().keySet();
assertThat(units, hasItem(unitWithId("test.unit")));
assertEquals(1, units.size());
}
Expand All @@ -85,7 +85,7 @@ public void testAddArtifactWithExistingMetadataButNonMatchingClassifier() throws

subject.addArtifactWithExistingMetadata(artifact, existingMetadata());

Collection<IInstallableUnit> units = (Collection<IInstallableUnit>) subject.getMavenInstallableUnits().keySet();
Collection<IInstallableUnit> units = subject.getMavenInstallableUnits().keySet();
assertTrue(units.isEmpty());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ Bundle-Description: Tycho integrates Maven with Eclipse and OSGi
Bundle-SymbolicName: org.eclipse.tycho.p2.resolver.shared
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: %providerName
Import-Package: org.eclipse.tycho,
Import-Package: org.eclipse.equinox.p2.metadata;version="2.4.0",
org.eclipse.tycho,
org.eclipse.tycho.artifacts,
org.eclipse.tycho.core.ee.shared,
org.eclipse.tycho.core.resolver.shared,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2020 SAP AG and others.
* Copyright (c) 2011, 2022 SAP AG and others.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
Expand All @@ -15,7 +15,7 @@
package org.eclipse.tycho.p2.target.facade;

import java.util.Map;

import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.tycho.ArtifactKey;
import org.eclipse.tycho.p2.metadata.IArtifactFacade;

Expand All @@ -30,7 +30,7 @@ public interface PomDependencyCollector {

public void addArtifactWithExistingMetadata(IArtifactFacade artifact, IArtifactFacade p2MetadataFile);

Map<?/* IInstallableUnit */, IArtifactFacade> getMavenInstallableUnits();
Map<IInstallableUnit, IArtifactFacade> getMavenInstallableUnits();

ArtifactKey getArtifactKey(IArtifactFacade facade);

Expand Down

0 comments on commit b7f1e0b

Please sign in to comment.