Skip to content

Commit e3de2ec

Browse files
mleshchyshyndmitriy-abramov
authored andcommitted
SDKJAVA-508: appropriate plexus bean injection for RepositoryLayoutFactory
Signed-off-by: mleshchyshyn <[email protected]>
1 parent cde7ea8 commit e3de2ec

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/main/java/com/here/platform/artifact/maven/wagon/layout/HereRepositoryLayoutFactory.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,15 @@
1818
*/
1919
package com.here.platform.artifact.maven.wagon.layout;
2020

21+
import org.codehaus.plexus.component.annotations.Component;
2122
import org.eclipse.aether.RepositorySystemSession;
2223
import org.eclipse.aether.internal.impl.Maven2RepositoryLayoutFactory;
2324
import org.eclipse.aether.repository.RemoteRepository;
2425
import org.eclipse.aether.spi.connector.layout.RepositoryLayout;
2526
import org.eclipse.aether.spi.connector.layout.RepositoryLayoutFactory;
2627
import org.eclipse.aether.transfer.NoRepositoryLayoutException;
2728

28-
import javax.inject.Named;
29-
30-
@Named("here")
29+
@Component(role = RepositoryLayoutFactory.class, hint = "here")
3130
public class HereRepositoryLayoutFactory implements RepositoryLayoutFactory {
3231

3332
private final Maven2RepositoryLayoutFactory mavenLayoutFactory;

src/main/resources/META-INF/plexus/components.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,12 @@
3030
<implementation>com.here.platform.artifact.maven.wagon.layout.HereArtifactRepositoryLayout</implementation>
3131
<instantiation-strategy>per-lookup</instantiation-strategy>
3232
</component>
33+
34+
<component>
35+
<role>org.eclipse.aether.spi.connector.layout.RepositoryLayoutFactory</role>
36+
<role-hint>here</role-hint>
37+
<implementation>com.here.platform.artifact.maven.wagon.layout.HereRepositoryLayoutFactory</implementation>
38+
<instantiation-strategy>per-lookup</instantiation-strategy>
39+
</component>
3340
</components>
3441
</component-set>

0 commit comments

Comments
 (0)