Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable writing to .p4ticket during authentication. #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,4 @@ public String clientImpersonatedHostname() {
public int sockSoTimeout() {
return settings.getInt(SOCKSOTIMEOUT_PROP_KEY);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down