-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract the RepositoryIdManager into an own component
Currently the RepositoryIdManager can only be fetched as an agent service but not with plexus. This renames and extracts the former RemoteRepositoryLoadingHelper into a dedicated component so it can be used directly in maven components as it is not dependent on the agent actually.
- Loading branch information
Showing
2 changed files
with
34 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...n/src/main/java/org/eclipse/tycho/p2maven/repository/RepositoryIdManagerAgentFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 Christoph Läubrich 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 | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Christoph Läubrich - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.tycho.p2maven.repository; | ||
|
||
import org.codehaus.plexus.component.annotations.Component; | ||
import org.codehaus.plexus.component.annotations.Requirement; | ||
import org.eclipse.equinox.p2.core.IProvisioningAgent; | ||
import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory; | ||
import org.eclipse.tycho.IRepositoryIdManager; | ||
|
||
@Component(role = IAgentServiceFactory.class, hint = IRepositoryIdManager.SERVICE_NAME) | ||
public class RepositoryIdManagerAgentFactory implements IAgentServiceFactory { | ||
|
||
@Requirement | ||
IRepositoryIdManager manager; | ||
|
||
@Override | ||
public Object createService(IProvisioningAgent agent) { | ||
return manager; | ||
} | ||
|
||
} |