Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
42 additions
and
17 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
project-model-maven/src/main/java/org/jboss/forge/maven/RepositoryUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.jboss.forge.maven; | ||
|
||
import org.sonatype.aether.repository.Authentication; | ||
|
||
/** | ||
* Repository Utils | ||
* | ||
* @author George Gastaldi <gegastaldi@gmail.com> | ||
* | ||
*/ | ||
public final class RepositoryUtils | ||
{ | ||
private RepositoryUtils() | ||
{ | ||
} | ||
|
||
public static org.sonatype.aether.repository.Proxy convertFromMavenProxy(org.apache.maven.settings.Proxy proxy) | ||
{ | ||
org.sonatype.aether.repository.Proxy result = null; | ||
if (proxy != null) | ||
{ | ||
Authentication auth = new Authentication(proxy.getUsername(), proxy.getPassword()); | ||
result = new org.sonatype.aether.repository.Proxy(proxy.getProtocol(), proxy.getHost(), proxy.getPort(), auth); | ||
} | ||
return result; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters