1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 }