001package org.apache.maven.wagon.providers.webdav; 002 003import org.mortbay.jetty.Connector; 004import org.mortbay.jetty.Server; 005import org.mortbay.jetty.security.SslSocketConnector; 006 007/* 008 * Licensed to the Apache Software Foundation (ASF) under one 009 * or more contributor license agreements. See the NOTICE file 010 * distributed with this work for additional information 011 * regarding copyright ownership. The ASF licenses this file 012 * to you under the Apache License, Version 2.0 (the 013 * "License"); you may not use this file except in compliance 014 * with the License. You may obtain a copy of the License at 015 * 016 * http://www.apache.org/licenses/LICENSE-2.0 017 * 018 * Unless required by applicable law or agreed to in writing, 019 * software distributed under the License is distributed on an 020 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 021 * KIND, either express or implied. See the License for the 022 * specific language governing permissions and limitations 023 * under the License. 024 */ 025 026 027/** 028 * WebDAV Wagon Test 029 * 030 * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a> 031 * @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a> 032 */ 033public class WebDavsWagonTest 034 extends WebDavWagonTest 035{ 036 protected String getProtocol() 037 { 038 return "davs"; 039 } 040 041 protected void addConnectors( Server server ) 042 { 043 System.setProperty( "javax.net.ssl.trustStore", 044 getTestFile( "src/test/resources/ssl/keystore" ).getAbsolutePath() ); 045 046 SslSocketConnector connector = new SslSocketConnector(); 047 connector.setPort( server.getConnectors()[0].getPort() ); 048 connector.setKeystore( getTestPath( "src/test/resources/ssl/keystore" ) ); 049 connector.setPassword( "wagonhttp" ); 050 connector.setKeyPassword( "wagonhttp" ); 051 connector.setTruststore( getTestPath( "src/test/resources/ssl/keystore" ) ); 052 connector.setTrustPassword( "wagonhttp" ); 053 server.setConnectors( new Connector[] { connector } ); 054 } 055 056}