]>
git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.support.maven/src/main/java/org/argeo/slc/maven/ManualWagonProvider.java
d264bb7844ffa65d98a93ddc096c49d276d22e7e
2 * Copyright (C) 2007-2012 Argeo GmbH
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org
.argeo
.slc
.maven
;
18 /*******************************************************************************
19 * Copyright (c) 2010 Sonatype, Inc.
20 * All rights reserved. This program and the accompanying materials
21 * are made available under the terms of the Eclipse Public License v1.0
22 * which accompanies this distribution, and is available at
23 * http://www.eclipse.org/legal/epl-v10.html
24 *******************************************************************************/
26 import org
.apache
.maven
.wagon
.Wagon
;
27 import org
.apache
.maven
.wagon
.providers
.file
.FileWagon
;
28 import org
.apache
.maven
.wagon
.providers
.http
.LightweightHttpWagon
;
29 import org
.apache
.maven
.wagon
.providers
.webdav
.WebDavWagon
;
30 import org
.eclipse
.aether
.connector
.wagon
.WagonProvider
;
32 public class ManualWagonProvider
implements WagonProvider
{
34 public Wagon
lookup(String roleHint
) throws Exception
{
35 if ("file".equals(roleHint
)) {
36 return new FileWagon();
37 } else if ("http".equals(roleHint
)) {
38 return new LightweightHttpWagon();
39 } else if ("webdav".equals(roleHint
)) {
40 return new WebDavWagon();
45 public void release(Wagon wagon
) {