use of org.talend.sdk.component.maven.MavenDecrypter in project component-runtime by Talend.
the class BaseMavenDecrypter method createInstance.
public Server createInstance(final DecryptedServer config) {
if (config.alwaysTryLookup()) {
try {
return new MavenDecrypter().find(config.value());
} catch (final IllegalArgumentException iae) {
if (ifActive(config.conditions())) {
throw iae;
}
}
} else if (ifActive(config.conditions())) {
return new MavenDecrypter().find(config.value());
}
final Server server = new Server();
server.setUsername(config.defaultUsername());
server.setPassword(config.defaultPassword());
return server;
}
use of org.talend.sdk.component.maven.MavenDecrypter in project component-runtime by Talend.
the class Github method main.
public static void main(final String[] args) {
final Server server = new MavenDecrypter().find("github");
final Collection<Contributor> contributors = new Github(server.getUsername(), server.getPassword()).load();
System.out.println(contributors);
}
Aggregations