ch.sourcepond.maven.plugin.repobuilder.RepositorySwitchFactory Maven / Gradle / Ivy
The newest version!
/*Copyright (C) 2015 Roland Hauser,
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.*/
package ch.sourcepond.maven.plugin.repobuilder;
import java.nio.file.Path;
import javax.inject.Named;
import javax.inject.Singleton;
/**
* Factory component to create {@link RepositorySwitch} objects.
*
*/
@Named
@Singleton
class RepositorySwitchFactory {
/**
* Creates a new {@link RepositorySwitch} instance.
*
* @param pRoot
* Root directory which will contain sub-repositories or Maven
* structures (depending on the configuration set on the Mojo);
* must not be {@code null}.
* @param pSnapshotRepositoryOrNull
* Name of the sub-repository for snapshot artifacts or
* {@code null}.
* @param pReleaseRepositoryOrNull
* Name of the sub-repository for release artifacts or
* {@code null}.
* @return A new {@link RepositorySwitch} instance, never {@code null}
*/
public RepositorySwitch createSwitch(final Path pRoot, final String pSnapshotRepositoryOrNull,
final String pReleaseRepositoryOrNull) {
return new RepositorySwitch(pRoot, pSnapshotRepositoryOrNull, pReleaseRepositoryOrNull);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy