Skip to content

Commit a79737e

Browse files
committed
Fix maven client
1 parent e85f9a2 commit a79737e

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

snap-develop/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@
5050
<groupId>org.apache.maven.wagon</groupId>
5151
<artifactId>wagon-http-lightweight</artifactId>
5252
<version>2.10</version>
53-
<exclusions>
54-
<exclusion>
55-
<groupId>org.apache.maven.wagon</groupId>
56-
<artifactId>wagon-http-shared</artifactId>
57-
</exclusion>
58-
</exclusions>
5953
</dependency>
6054
<dependency>
6155
<groupId>org.snapscript</groupId>

snap-develop/src/main/java/org/snapscript/develop/maven/ManualWagonProvider.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import org.apache.maven.wagon.Wagon;
44
import org.apache.maven.wagon.providers.http.LightweightHttpWagon;
5+
import org.apache.maven.wagon.providers.http.LightweightHttpWagonAuthenticator;
56
import org.sonatype.aether.connector.wagon.WagonProvider;
67

78
public class ManualWagonProvider implements WagonProvider {
@@ -11,7 +12,11 @@ public class ManualWagonProvider implements WagonProvider {
1112
@Override
1213
public Wagon lookup(String roleHint) throws Exception {
1314
if (SCHEME.equals(roleHint)) {
14-
return new LightweightHttpWagon();
15+
LightweightHttpWagonAuthenticator authenticator = new LightweightHttpWagonAuthenticator();
16+
LightweightHttpWagon wagon = new LightweightHttpWagon();
17+
18+
wagon.setAuthenticator(authenticator);
19+
return wagon;
1520
}
1621
return null;
1722
}

snap-develop/work/.project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<location name="central">http://repo1.maven.org/maven2</location>
1414
</repository>
1515
<dependencies>
16-
<!--dependency>
16+
<dependency>
1717
<groupId>org.simpleframework</groupId>
1818
<artifactId>simple-http</artifactId>
1919
<version>6.0.1</version>
@@ -27,6 +27,6 @@
2727
<groupId>org.apache.commons</groupId>
2828
<artifactId>commons-lang3</artifactId>
2929
<version>3.4</version>
30-
</dependency-->
30+
</dependency>
3131
</dependencies>
3232
</project>

0 commit comments

Comments
 (0)