1 /**
2 * Copyright 2010-2012 The Kuali Foundation
3 *
4 * Licensed under the Educational Community 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
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
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.
15 */
16 package org.kuali.maven.wagon;
17
18 import java.util.List;
19
20 import org.apache.maven.wagon.authentication.AuthenticationInfo;
21 import org.apache.maven.wagon.repository.Repository;
22 import org.junit.Test;
23
24 public class S3WagonTest {
25
26 @Test
27 public void simple() {
28 try {
29 AuthenticationInfo auth = new AuthenticationInfo();
30 auth.setUserName("AKIAJFD5IM7IPVVUEBNA");
31 auth.setPassword("jIKJP0sL9cu3GsHoti0mqcbH4MMLDCthsn0lms0y");
32 Repository repository = new Repository("kuali.release", "s3://maven.kuali.org/release");
33 S3Wagon wagon = new S3Wagon();
34 wagon.connect(repository, auth);
35 List<String> files = wagon.getFileList("");
36 System.out.println(files.size());
37
38 } catch (Exception e) {
39 e.printStackTrace();
40 }
41 }
42
43 }