diff --git a/README.md b/README.md index 4200cbd..56c9527 100644 --- a/README.md +++ b/README.md @@ -29,5 +29,5 @@ sonar.perforce.clientImpersonatedHostname | Name of the host computer to imperso * No auto-detection since nothing in workspace seems to show this is under Perforce control management (like .git folder for Git workspace). * Blame is not executed in parallel since we are not confident in the thread safety of p4java library. -## Developper informations -The plugin use the p4java pure Java implementation of Perforce client: http://www.perforce.com/perforce/doc.current/manuals/p4java/01_p4java.html +## Developer information +The plugin uses the p4java pure Java implementation of Perforce client: http://www.perforce.com/perforce/doc.current/manuals/p4java/01_p4java.html diff --git a/src/main/java/org/sonar/plugins/scm/perforce/PerforceConfiguration.java b/src/main/java/org/sonar/plugins/scm/perforce/PerforceConfiguration.java index 2939165..dc0061c 100644 --- a/src/main/java/org/sonar/plugins/scm/perforce/PerforceConfiguration.java +++ b/src/main/java/org/sonar/plugins/scm/perforce/PerforceConfiguration.java @@ -168,5 +168,4 @@ public String clientImpersonatedHostname() { public int sockSoTimeout() { return settings.getInt(SOCKSOTIMEOUT_PROP_KEY); } - } diff --git a/src/main/java/org/sonar/plugins/scm/perforce/PerforceExecutor.java b/src/main/java/org/sonar/plugins/scm/perforce/PerforceExecutor.java index 0030223..4ad8607 100644 --- a/src/main/java/org/sonar/plugins/scm/perforce/PerforceExecutor.java +++ b/src/main/java/org/sonar/plugins/scm/perforce/PerforceExecutor.java @@ -30,6 +30,7 @@ import com.perforce.p4java.impl.mapbased.rpc.RpcPropertyDefs; import com.perforce.p4java.impl.mapbased.rpc.sys.helper.RpcSystemFileCommandsHelper; import com.perforce.p4java.option.UsageOptions; +import com.perforce.p4java.option.server.LoginOptions; import com.perforce.p4java.option.server.TrustOptions; import com.perforce.p4java.server.IOptionsServer; import com.perforce.p4java.server.ServerFactory; @@ -126,7 +127,8 @@ private void initServer() { if (!isLogin(server)) { // Login to the server with a password. // Password can be null if it is not needed (i.e. SSO logins). - server.login(config.password(), null); + LoginOptions options = new LoginOptions(false, true); + server.login(config.password(), options); } } } catch (URISyntaxException e) {