Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 1.2 KB

testing-maven-passwords.adoc

File metadata and controls

29 lines (24 loc) · 1.2 KB

Secrets/Passwords and Maven

You can reuse Maven settings.xml server files, including the encrypted ones. org.talend.sdk.component.maven.MavenDecrypter allows yo to find a username/password from a server identifier:

final MavenDecrypter decrypter = new MavenDecrypter();
final Server decrypted = decrypter.find("my-test-server");
// decrypted.getUsername();
// decrypted.getPassword();

It is very useful to avoid storing secrets and to perform tests on real systems on a continuous integration platform.

Tip
Even if you don’t use Maven on the platform, you can generate the settings.xml and`settings-security.xml` files to use that feature. See https://maven.apache.org/guides/mini/guide-encryption.html for more details.