/** * Copyright (c) 2010 Perforce Software. All rights reserved. */ package com.perforce.maven.scm.provider.p4.repository; import org.apache.maven.scm.provider.ScmProviderRepositoryWithHost; import org.codehaus.plexus.util.StringUtils; /** * This class will contain all SCM information about your SCM connection (user, * password, host, port, path...). */ public class P4ScmProviderRepository extends ScmProviderRepositoryWithHost { /** The Constant P4_PORT_PROPERTY. */ public static final String P4_PORT_PROPERTY = "maven.scm.p4.port"; /** The Constant P4_USER_PROPERTY. */ public static final String P4_USER_PROPERTY = "maven.scm.p4.user"; /** The Constant P4_PASSWD_PROPERTY. */ public static final String P4_PASSWD_PROPERTY = "maven.scm.p4.password"; /** The Constant P4_CHARSET_PROPERTY. */ public static final String P4_CHARSET_PROPERTY = "maven.scm.p4.charset"; /** The Constant P4_CLIENT_PROPERTY. */ public static final String P4_CLIENT_PROPERTY = "maven.scm.perforce.clientspec.name"; /** The Constant P4_JOBS_PROPERTY. */ public static final String P4_JOBS_PROPERTY = "maven.scm.jobs"; /** The Constant P4_CHANGELIST_PROPERTY. */ public static final String P4_CHANGELIST_PROPERTY = "maven.scm.p4.changelist"; /** The Constant P4_CHANGELIST_PROPERTY. */ public static final String P4_CHANGELIST_DESCRIPTION_PROPERTY = "maven.scm.p4.changelist.description"; /** The Constant P4_FROM_CHANGELIST_PROPERTY. */ public static final String P4_FROM_CHANGELIST_PROPERTY = "maven.scm.p4.fromchangelist"; /** The Constant P4_TO_CHANGELIST_PROPERTY. */ public static final String P4_TO_CHANGELIST_PROPERTY = "maven.scm.p4.tochangelist"; /** The Constant P4_LOCK_TAG_PROPERTY. */ public static final String P4_LOCK_TAG_PROPERTY = "maven.scm.locktag"; private String protocol;//when empty perforce treats it as 'tcp' /** The path. */ private String path; private String p4Port; /** * Instantiates a new p4 scm provider repository. * * @param host * the host * @param port * the port * @param path * the path * @param user * the user * @param password * the password */ public P4ScmProviderRepository(String protocol, String host, int port, String path, String user, String password) { this.protocol = protocol; setHost(host); setPort(port); this.path = path; //override provided password when system password is set String systemUser = System.getProperty( P4_USER_PROPERTY ); if ( ! StringUtils.isBlank( systemUser )) { user = systemUser; } setUser(user); //override provided password when system password is set String systemPass = System.getProperty( P4_PASSWD_PROPERTY ); if ( ! StringUtils.isBlank( systemPass )) { password = systemPass; } setPassword(password); p4Port = ""; if (!StringUtils.isBlank( protocol )) { p4Port += protocol + ":"; } p4Port += getHost() + ":" + getPort(); } /** * Gets the path. * * @return the path */ public String getPath() { return path; } public void setPath( String path ) { this.path = path; } /** * Gets protocol type. * * @return protocol */ public String getProtocol() { return protocol; } public String getP4Port() { return p4Port; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#7 | 9519 | dantran | folder rename to match with its artifactId | ||
#6 | 9514 | dantran |
- Remove support to pick up p4port and its credential from ENV and System properties. These setttings has no use since Maven requires user to provide the required URL which has both p4port and credential. Also user can always fall back to settings.xml to store credential - Rewrite URL parser and also support password as part of URL - TCK test now has default URL and its credential is store under settings.xml - User can also issue her how scmTckUrl system properties ( to be doc as part of maven site) |
||
#5 | 9471 | dantran |
- cleanup diff command - simplify branch command and full compliant with maven-scm-test - add checkout with branch - add repo's path as client manager lookup key in addition to p4port and rootdir so that we can handle mutiple clients on the same rootdir |
||
#4 | 9259 | dantran |
hookup with maven-scm-test. Pickup user/password from system properties |
||
#3 | 9236 | dantran | back to 2014.6.1-SNAPSHOT | ||
#2 | 9184 | dantran | Correctly handle perforce protocols rather then hardwire only 'ssl' | ||
#1 | 9167 | dantran |
Populate //guest/dantran/p4maven/... from //guest/perforce_software/p4maven/main/.... |
||
//guest/perforce_software/p4maven/main/com.perforce.maven/src/main/java/com/perforce/maven/scm/provider/p4/repository/P4ScmProviderRepository.java | |||||
#2 | 9014 | Matt Attaway |
Add SSL support to P4Maven (committed on behalf of Dan Tran) USer visible change |
||
#1 | 8496 | Matt Attaway | Move P4Ant and P4Maven into their proper homes | ||
//public/perforce/p4maven/main/com.perforce.maven/src/main/java/com/perforce/maven/scm/provider/p4/repository/P4ScmProviderRepository.java | |||||
#1 | 8270 | Matt Attaway | Initial add of P4Maven source code |