[jira] Commented: (CONTINUUM-1402) Syncing with Perforce on Linux/Unix/Bash fails
[ http://jira.codehaus.org/browse/CONTINUUM-1402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_109974 ] Matthias Wurm commented on CONTINUUM-1402: -- I'll have a look at the maven-scm-provider-perforce hopefully until tomorrow and file the issue... > Syncing with Perforce on Linux/Unix/Bash fails > -- > > Key: CONTINUUM-1402 > URL: http://jira.codehaus.org/browse/CONTINUUM-1402 > Project: Continuum > Issue Type: Bug > Components: Integration - Maven 2, SCM >Affects Versions: 1.1-beta-2 > Environment: Bash >Reporter: Sebastian Annies >Priority: Critical > > When a client is created it is named: > E.g.{{monospaced}} > sannies-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\6{{monospaced}} > that is ok, but now comes the sync command and uses following commandline > {{monospaced}} > /bin/bash -c "p4 -d > /opt/continuum-1.1-beta-3-SNAPSHOT/apps/continuum/webapp/WEB-INF/working-directory/1 > > -cbackground-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\1 > sync" > {{monospaced}} > The Bash now removes the backslashes in the client name! The result is that > the client is not existent and perforce returns with an error. > I think continuum does everything allright but we need the ticket here to be > reminded to switch to a new plexus-utils or maven-scm if it is fixed there. > The Problem starts in 'PerforceCheckOutCommand': > {{monospaced}} > public static Commandline createCommandLine( > PerforceScmProviderRepository repo, File workingDirectory, > ScmVersion version, String > specname ) > { > Commandline command = PerforceScmProvider.createP4Command( repo, > workingDirectory ); > {color:red} > command.createArgument().setValue( "-c" + specname ); > {color} > command.createArgument().setValue( "sync" ); > // Use a simple heuristic to determine if we should use the Force flag > // on sync. Forcing sync is a HUGE performance hit but is required in > // rare instances where source is somehow deleted. If the target > // directory is completely empty, assume a force is required. If > // not empty, we assume a previous checkout was already done and a > normal > // sync will suffice. > // SCM-110 > String[] files = workingDirectory.list(); > if ( files == null || files.length == 0 ) > { > // We need to force so checkout to an empty directory will work. > command.createArgument().setValue( "-f" ); > } > // Not sure what to do here. I'm unclear whether we should be > // sync'ing each file individually to the label or just sync the > // entire contents of the workingDir. I'm going to assume the > // latter until the exact semantics are clearer. > if ( version != null && StringUtils.isNotEmpty( version.getName() ) ) > { > command.createArgument().setValue( "@" + version.getName() ); > } > return command; > {{monospaced}} > The {{monospaced}}specname {{monospaced}} contains the backslashes and is > these are neither escaped nor quoted! Hmm ... Is that a job that the > CommandLine should handle? I think so! > The next thing I will do is to file an issue at plexus-utils and link the > issues. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (CONTINUUM-1402) Syncing with Perforce on Linux/Unix/Bash fails
[ http://jira.codehaus.org/browse/CONTINUUM-1402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_109966 ] Matthias Wurm edited comment on CONTINUUM-1402 at 10/15/07 9:22 AM: Single quotes in the p4 command is indeed a problem under windows. I just tried that out under XP: {{p4 -c 'myclientspec' sync -n}} Result: {{Client ''myclientspec'' unknown - use 'client' command to create it.}} The quick fix would be to avoid characters that are used as escape characters in identifiers and replace the path separators with a different symbol (like an underscore) to generate the client spec name. What about backwards compatibility here? was: Single quotes in the p4 command is indeed a problem under windows. I just tried that out under XP: {{monospaced}} p4 -c 'myclientspec' sync -n {{monospaced}} Result: Client ''myclientspec'' unknown - use 'client' command to create it. The quick fix would be to avoid characters that are used as escape characters in identifiers and replace the path separators with a different symbol (like an underscore) to generate the client spec name. What about backwards compatibility here? > Syncing with Perforce on Linux/Unix/Bash fails > -- > > Key: CONTINUUM-1402 > URL: http://jira.codehaus.org/browse/CONTINUUM-1402 > Project: Continuum > Issue Type: Bug > Components: Integration - Maven 2, SCM >Affects Versions: 1.1-beta-2 > Environment: Bash >Reporter: Sebastian Annies >Priority: Critical > > When a client is created it is named: > E.g.{{monospaced}} > sannies-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\6{{monospaced}} > that is ok, but now comes the sync command and uses following commandline > {{monospaced}} > /bin/bash -c "p4 -d > /opt/continuum-1.1-beta-3-SNAPSHOT/apps/continuum/webapp/WEB-INF/working-directory/1 > > -cbackground-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\1 > sync" > {{monospaced}} > The Bash now removes the backslashes in the client name! The result is that > the client is not existent and perforce returns with an error. > I think continuum does everything allright but we need the ticket here to be > reminded to switch to a new plexus-utils or maven-scm if it is fixed there. > The Problem starts in 'PerforceCheckOutCommand': > {{monospaced}} > public static Commandline createCommandLine( > PerforceScmProviderRepository repo, File workingDirectory, > ScmVersion version, String > specname ) > { > Commandline command = PerforceScmProvider.createP4Command( repo, > workingDirectory ); > {color:red} > command.createArgument().setValue( "-c" + specname ); > {color} > command.createArgument().setValue( "sync" ); > // Use a simple heuristic to determine if we should use the Force flag > // on sync. Forcing sync is a HUGE performance hit but is required in > // rare instances where source is somehow deleted. If the target > // directory is completely empty, assume a force is required. If > // not empty, we assume a previous checkout was already done and a > normal > // sync will suffice. > // SCM-110 > String[] files = workingDirectory.list(); > if ( files == null || files.length == 0 ) > { > // We need to force so checkout to an empty directory will work. > command.createArgument().setValue( "-f" ); > } > // Not sure what to do here. I'm unclear whether we should be > // sync'ing each file individually to the label or just sync the > // entire contents of the workingDir. I'm going to assume the > // latter until the exact semantics are clearer. > if ( version != null && StringUtils.isNotEmpty( version.getName() ) ) > { > command.createArgument().setValue( "@" + version.getName() ); > } > return command; > {{monospaced}} > The {{monospaced}}specname {{monospaced}} contains the backslashes and is > these are neither escaped nor quoted! Hmm ... Is that a job that the > CommandLine should handle? I think so! > The next thing I will do is to file an issue at plexus-utils and link the > issues. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (CONTINUUM-1402) Syncing with Perforce on Linux/Unix/Bash fails
[ http://jira.codehaus.org/browse/CONTINUUM-1402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106308 ] Matthias Wurm edited comment on CONTINUUM-1402 at 10/15/07 9:22 AM: I guess there is a problem with backslashes in the command: After setting loglevel to debug I've seen that maven-scm wants to do the following: {{2007-09-03 19:55:35,908 [pool-1-thread-1] DEBUG ScmManager:default - Executing: /bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p p4server:1666 -chostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3 sync -f"}} Executing the command manually on my console removes the backslashes, hence the command fails {noformat}Client 'hostname-MavenSCM-datalocalcontinuum-1.1-beta-2appscontinuumwebappWEB-INFworking-directory2' unknown - use 'client' command to create it.{noformat} Setting the clientspec inside single quotes like this works on the console: {noformat}/bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p perforce.e.secunet.de:1666 -c'hostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3' sync -f"{noformat} Maybe changing the maven-scm-provider to add single quotes around the clientspec name might fix this issue. was: I guess there is a problem with backslashes in the command: After setting loglevel to debug I've seen that maven-scm wants to do the following: {noformat} 2007-09-03 19:55:35,908 [pool-1-thread-1] DEBUG ScmManager:default - Executing: /bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p p4server:1666 -chostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3 sync -f"{noformat} Executing the command manually on my console removes the backslashes, hence the command fails {noformat}Client 'hostname-MavenSCM-datalocalcontinuum-1.1-beta-2appscontinuumwebappWEB-INFworking-directory2' unknown - use 'client' command to create it.{noformat} Setting the clientspec inside single quotes like this works on the console: {noformat}/bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p perforce.e.secunet.de:1666 -c'hostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3' sync -f"{noformat} Maybe changing the maven-scm-provider to add single quotes around the clientspec name might fix this issue. > Syncing with Perforce on Linux/Unix/Bash fails > -- > > Key: CONTINUUM-1402 > URL: http://jira.codehaus.org/browse/CONTINUUM-1402 > Project: Continuum > Issue Type: Bug > Components: Integration - Maven 2, SCM >Affects Versions: 1.1-beta-2 > Environment: Bash >Reporter: Sebastian Annies >Priority: Critical > > When a client is created it is named: > E.g.{{monospaced}} > sannies-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\6{{monospaced}} > that is ok, but now comes the sync command and uses following commandline > {{monospaced}} > /bin/bash -c "p4 -d > /opt/continuum-1.1-beta-3-SNAPSHOT/apps/continuum/webapp/WEB-INF/working-directory/1 > > -cbackground-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\1 > sync" > {{monospaced}} > The Bash now removes the backslashes in the client name! The result is that > the client is not existent and perforce returns with an error. > I think continuum does everything allright but we need the ticket here to be > reminded to switch to a new plexus-utils or maven-scm if it is fixed there. > The Problem starts in 'PerforceCheckOutCommand': > {{monospaced}} > public static Commandline createCommandLine( > PerforceScmProviderRepository repo, File workingDirectory, > ScmVersion version, String > specname ) > { > Commandline command = PerforceScmProvider.createP4Command( repo, > workingDirectory ); > {color:red} > command.createArgument().setValue( "-c" + specname ); > {color} > command.createArgument().setValue( "sync" ); > // Use a simple heuristic to determine if we should use the Force flag > // on sync. Forcing sync is a HUGE performance hit but is required in > // rare instances where source is somehow deleted. If the target > // directory is completely empty, assume a force is required. If > // not empty, we assume a previous checkout was already done and a > normal > // sync will suffice. > // SCM-110 > String[
[jira] Issue Comment Edited: (CONTINUUM-1402) Syncing with Perforce on Linux/Unix/Bash fails
[ http://jira.codehaus.org/browse/CONTINUUM-1402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_109966 ] Matthias Wurm edited comment on CONTINUUM-1402 at 10/15/07 9:22 AM: Single quotes in the p4 command is indeed a problem under windows. I just tried that out under XP: {{monospaced}} p4 -c 'myclientspec' sync -n {{monospaced}} Result: Client ''myclientspec'' unknown - use 'client' command to create it. The quick fix would be to avoid characters that are used as escape characters in identifiers and replace the path separators with a different symbol (like an underscore) to generate the client spec name. What about backwards compatibility here? was: Single quotes in the p4 command is indeed a problem under windows. I just tried that out under XP: p4 -c 'myclientspec' sync -n Result: Client ''myclientspec'' unknown - use 'client' command to create it. The quick fix would be to avoid characters that are used as escape characters in identifiers and replace the path separators with a different symbol (like an underscore) to generate the client spec name. What about backwards compatibility here? > Syncing with Perforce on Linux/Unix/Bash fails > -- > > Key: CONTINUUM-1402 > URL: http://jira.codehaus.org/browse/CONTINUUM-1402 > Project: Continuum > Issue Type: Bug > Components: Integration - Maven 2, SCM >Affects Versions: 1.1-beta-2 > Environment: Bash >Reporter: Sebastian Annies >Priority: Critical > > When a client is created it is named: > E.g.{{monospaced}} > sannies-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\6{{monospaced}} > that is ok, but now comes the sync command and uses following commandline > {{monospaced}} > /bin/bash -c "p4 -d > /opt/continuum-1.1-beta-3-SNAPSHOT/apps/continuum/webapp/WEB-INF/working-directory/1 > > -cbackground-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\1 > sync" > {{monospaced}} > The Bash now removes the backslashes in the client name! The result is that > the client is not existent and perforce returns with an error. > I think continuum does everything allright but we need the ticket here to be > reminded to switch to a new plexus-utils or maven-scm if it is fixed there. > The Problem starts in 'PerforceCheckOutCommand': > {{monospaced}} > public static Commandline createCommandLine( > PerforceScmProviderRepository repo, File workingDirectory, > ScmVersion version, String > specname ) > { > Commandline command = PerforceScmProvider.createP4Command( repo, > workingDirectory ); > {color:red} > command.createArgument().setValue( "-c" + specname ); > {color} > command.createArgument().setValue( "sync" ); > // Use a simple heuristic to determine if we should use the Force flag > // on sync. Forcing sync is a HUGE performance hit but is required in > // rare instances where source is somehow deleted. If the target > // directory is completely empty, assume a force is required. If > // not empty, we assume a previous checkout was already done and a > normal > // sync will suffice. > // SCM-110 > String[] files = workingDirectory.list(); > if ( files == null || files.length == 0 ) > { > // We need to force so checkout to an empty directory will work. > command.createArgument().setValue( "-f" ); > } > // Not sure what to do here. I'm unclear whether we should be > // sync'ing each file individually to the label or just sync the > // entire contents of the workingDir. I'm going to assume the > // latter until the exact semantics are clearer. > if ( version != null && StringUtils.isNotEmpty( version.getName() ) ) > { > command.createArgument().setValue( "@" + version.getName() ); > } > return command; > {{monospaced}} > The {{monospaced}}specname {{monospaced}} contains the backslashes and is > these are neither escaped nor quoted! Hmm ... Is that a job that the > CommandLine should handle? I think so! > The next thing I will do is to file an issue at plexus-utils and link the > issues. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (CONTINUUM-1402) Syncing with Perforce on Linux/Unix/Bash fails
[ http://jira.codehaus.org/browse/CONTINUUM-1402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_109966 ] Matthias Wurm commented on CONTINUUM-1402: -- Single quotes in the p4 command is indeed a problem under windows. I just tried that out under XP: p4 -c 'myclientspec' sync -n Result: Client ''myclientspec'' unknown - use 'client' command to create it. The quick fix would be to avoid characters that are used as escape characters in identifiers and replace the path separators with a different symbol (like an underscore) to generate the client spec name. What about backwards compatibility here? > Syncing with Perforce on Linux/Unix/Bash fails > -- > > Key: CONTINUUM-1402 > URL: http://jira.codehaus.org/browse/CONTINUUM-1402 > Project: Continuum > Issue Type: Bug > Components: Integration - Maven 2, SCM >Affects Versions: 1.1-beta-2 > Environment: Bash >Reporter: Sebastian Annies >Priority: Critical > > When a client is created it is named: > E.g.{{monospaced}} > sannies-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\6{{monospaced}} > that is ok, but now comes the sync command and uses following commandline > {{monospaced}} > /bin/bash -c "p4 -d > /opt/continuum-1.1-beta-3-SNAPSHOT/apps/continuum/webapp/WEB-INF/working-directory/1 > > -cbackground-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\1 > sync" > {{monospaced}} > The Bash now removes the backslashes in the client name! The result is that > the client is not existent and perforce returns with an error. > I think continuum does everything allright but we need the ticket here to be > reminded to switch to a new plexus-utils or maven-scm if it is fixed there. > The Problem starts in 'PerforceCheckOutCommand': > {{monospaced}} > public static Commandline createCommandLine( > PerforceScmProviderRepository repo, File workingDirectory, > ScmVersion version, String > specname ) > { > Commandline command = PerforceScmProvider.createP4Command( repo, > workingDirectory ); > {color:red} > command.createArgument().setValue( "-c" + specname ); > {color} > command.createArgument().setValue( "sync" ); > // Use a simple heuristic to determine if we should use the Force flag > // on sync. Forcing sync is a HUGE performance hit but is required in > // rare instances where source is somehow deleted. If the target > // directory is completely empty, assume a force is required. If > // not empty, we assume a previous checkout was already done and a > normal > // sync will suffice. > // SCM-110 > String[] files = workingDirectory.list(); > if ( files == null || files.length == 0 ) > { > // We need to force so checkout to an empty directory will work. > command.createArgument().setValue( "-f" ); > } > // Not sure what to do here. I'm unclear whether we should be > // sync'ing each file individually to the label or just sync the > // entire contents of the workingDir. I'm going to assume the > // latter until the exact semantics are clearer. > if ( version != null && StringUtils.isNotEmpty( version.getName() ) ) > { > command.createArgument().setValue( "@" + version.getName() ); > } > return command; > {{monospaced}} > The {{monospaced}}specname {{monospaced}} contains the backslashes and is > these are neither escaped nor quoted! Hmm ... Is that a job that the > CommandLine should handle? I think so! > The next thing I will do is to file an issue at plexus-utils and link the > issues. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (CONTINUUM-1402) Syncing with Perforce on Linux/Unix/Bash fails
[ http://jira.codehaus.org/browse/CONTINUUM-1402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106308 ] Matthias Wurm edited comment on CONTINUUM-1402 at 9/3/07 1:06 PM: -- I guess there is a problem with backslashes in the command: After setting loglevel to debug I've seen that maven-scm wants to do the following: {noformat} 2007-09-03 19:55:35,908 [pool-1-thread-1] DEBUG ScmManager:default - Executing: /bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p p4server:1666 -chostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3 sync -f"{noformat} Executing the command manually on my console removes the backslashes, hence the command fails {noformat}Client 'hostname-MavenSCM-datalocalcontinuum-1.1-beta-2appscontinuumwebappWEB-INFworking-directory2' unknown - use 'client' command to create it.{noformat} Setting the clientspec inside single quotes like this works on the console: {noformat}/bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p perforce.e.secunet.de:1666 -c'hostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3' sync -f"{noformat} Maybe changing the maven-scm-provider to add single quotes around the clientspec name might fix this issue. was: I guess there is a problem with backslashes in the command: After setting loglevel to debug I've seen that maven-scm wants to do the following: {noformat} 2007-09-03 19:55:35,908 [pool-1-thread-1] DEBUG ScmManager:default - Executing: /bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p perforce.e.secunet.de:1666 -chostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3 sync -f"{noformat} Executing the command manually on my console removes the backslashes, hence the command fails {noformat}Client 'hostname-MavenSCM-datalocalcontinuum-1.1-beta-2appscontinuumwebappWEB-INFworking-directory2' unknown - use 'client' command to create it.{noformat} Setting the clientspec inside single quotes like this works on the console: {noformat}/bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p perforce.e.secunet.de:1666 -c'hostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3' sync -f"{noformat} Maybe changing the maven-scm-provider to add single quotes around the clientspec name might fix this issue. > Syncing with Perforce on Linux/Unix/Bash fails > -- > > Key: CONTINUUM-1402 > URL: http://jira.codehaus.org/browse/CONTINUUM-1402 > Project: Continuum > Issue Type: Bug > Components: Integration - Maven 2, SCM >Affects Versions: 1.1-beta-2 > Environment: Bash >Reporter: Sebastian Annies >Priority: Critical > > When a client is created it is named: > E.g.{{monospaced}} > sannies-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\6{{monospaced}} > that is ok, but now comes the sync command and uses following commandline > {{monospaced}} > /bin/bash -c "p4 -d > /opt/continuum-1.1-beta-3-SNAPSHOT/apps/continuum/webapp/WEB-INF/working-directory/1 > > -cbackground-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\1 > sync" > {{monospaced}} > The Bash now removes the backslashes in the client name! The result is that > the client is not existent and perforce returns with an error. > I think continuum does everything allright but we need the ticket here to be > reminded to switch to a new plexus-utils or maven-scm if it is fixed there. > The Problem starts in 'PerforceCheckOutCommand': > {{monospaced}} > public static Commandline createCommandLine( > PerforceScmProviderRepository repo, File workingDirectory, > ScmVersion version, String > specname ) > { > Commandline command = PerforceScmProvider.createP4Command( repo, > workingDirectory ); > {color:red} > command.createArgument().setValue( "-c" + specname ); > {color} > command.createArgument().setValue( "sync" ); > // Use a simple heuristic to determine if we should use the Force flag > // on sync. Forcing sync is a HUGE performance hit but is required in > // rare instances where source is somehow deleted. If the target > // directory is completely empty, assume a force is required. If > // not empty, we assume a previous checkout was already done and a > normal > // sync will suffice. > //
[jira] Issue Comment Edited: (CONTINUUM-1402) Syncing with Perforce on Linux/Unix/Bash fails
[ http://jira.codehaus.org/browse/CONTINUUM-1402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106308 ] Matthias Wurm edited comment on CONTINUUM-1402 at 9/3/07 1:05 PM: -- I guess there is a problem with backslashes in the command: After setting loglevel to debug I've seen that maven-scm wants to do the following: {noformat} 2007-09-03 19:55:35,908 [pool-1-thread-1] DEBUG ScmManager:default - Executing: /bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p perforce.e.secunet.de:1666 -chostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3 sync -f"{noformat} Executing the command manually on my console removes the backslashes, hence the command fails {noformat}Client 'hostname-MavenSCM-datalocalcontinuum-1.1-beta-2appscontinuumwebappWEB-INFworking-directory2' unknown - use 'client' command to create it.{noformat} Setting the clientspec inside single quotes like this works on the console: {noformat}/bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p perforce.e.secunet.de:1666 -c'hostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3' sync -f"{noformat} Maybe changing the maven-scm-provider to add single quotes around the clientspec name might fix this issue. was: I guess there is a problem with backslashes in the command: After setting loglevel to debug I've seen that maven-scm wants to do the following: 2007-09-03 19:55:35,908 [pool-1-thread-1] DEBUG ScmManager:default - Executing: /bin/bash --c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p perforce.e.secunet.de:1666 -chostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3 sync -f" Executing the command manually on my console removes the backslashes, hence the command fails Client 'hostname-MavenSCM-datalocalcontinuum-1.1-beta-2appscontinuumwebappWEB-INFworking-directory2' unknown - use 'client' command to create it. Setting the clientspec inside single quotes like this works on the console: /bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p perforce.e.secunet.de:1666 -c'hostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3' sync -f" Maybe changing the maven-scm-provider to add single quotes around the clientspec name might fix this issue. > Syncing with Perforce on Linux/Unix/Bash fails > -- > > Key: CONTINUUM-1402 > URL: http://jira.codehaus.org/browse/CONTINUUM-1402 > Project: Continuum > Issue Type: Bug > Components: Integration - Maven 2, SCM >Affects Versions: 1.1-beta-2 > Environment: Bash >Reporter: Sebastian Annies >Priority: Critical > > When a client is created it is named: > E.g.{{monospaced}} > sannies-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\6{{monospaced}} > that is ok, but now comes the sync command and uses following commandline > {{monospaced}} > /bin/bash -c "p4 -d > /opt/continuum-1.1-beta-3-SNAPSHOT/apps/continuum/webapp/WEB-INF/working-directory/1 > > -cbackground-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\1 > sync" > {{monospaced}} > The Bash now removes the backslashes in the client name! The result is that > the client is not existent and perforce returns with an error. > I think continuum does everything allright but we need the ticket here to be > reminded to switch to a new plexus-utils or maven-scm if it is fixed there. > The Problem starts in 'PerforceCheckOutCommand': > {{monospaced}} > public static Commandline createCommandLine( > PerforceScmProviderRepository repo, File workingDirectory, > ScmVersion version, String > specname ) > { > Commandline command = PerforceScmProvider.createP4Command( repo, > workingDirectory ); > {color:red} > command.createArgument().setValue( "-c" + specname ); > {color} > command.createArgument().setValue( "sync" ); > // Use a simple heuristic to determine if we should use the Force flag > // on sync. Forcing sync is a HUGE performance hit but is required in > // rare instances where source is somehow deleted. If the target > // directory is completely empty, assume a force is required. If > // not empty, we assume a previous checkout was already done and a > normal > // sync will suffice. > // SCM-110 > String[] files = workingDire
[jira] Commented: (CONTINUUM-1402) Syncing with Perforce on Linux/Unix/Bash fails
[ http://jira.codehaus.org/browse/CONTINUUM-1402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106308 ] Matthias Wurm commented on CONTINUUM-1402: -- I guess there is a problem with backslashes in the command: After setting loglevel to debug I've seen that maven-scm wants to do the following: 2007-09-03 19:55:35,908 [pool-1-thread-1] DEBUG ScmManager:default - Executing: /bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p perforce.e.secunet.de:1666 -chostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3 sync -f" Executing the command manually on my console removes the backslashes, hence the command fails Client 'hostname-MavenSCM-datalocalcontinuum-1.1-beta-2appscontinuumwebappWEB-INFworking-directory2' unknown - use 'client' command to create it. Setting the clientspec inside single quotes like this works on the console: /bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p perforce.e.secunet.de:1666 -c'hostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3' sync -f" Maybe changing the maven-scm-provider to add single quotes around the clientspec name might fix this issue. > Syncing with Perforce on Linux/Unix/Bash fails > -- > > Key: CONTINUUM-1402 > URL: http://jira.codehaus.org/browse/CONTINUUM-1402 > Project: Continuum > Issue Type: Bug > Components: Integration - Maven 2, SCM >Affects Versions: 1.1-beta-2 > Environment: Bash >Reporter: Sebastian Annies >Priority: Critical > > When a client is created it is named: > E.g.{{monospaced}} > sannies-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\6{{monospaced}} > that is ok, but now comes the sync command and uses following commandline > {{monospaced}} > /bin/bash -c "p4 -d > /opt/continuum-1.1-beta-3-SNAPSHOT/apps/continuum/webapp/WEB-INF/working-directory/1 > > -cbackground-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\1 > sync" > {{monospaced}} > The Bash now removes the backslashes in the client name! The result is that > the client is not existent and perforce returns with an error. > I think continuum does everything allright but we need the ticket here to be > reminded to switch to a new plexus-utils or maven-scm if it is fixed there. > The Problem starts in 'PerforceCheckOutCommand': > {{monospaced}} > public static Commandline createCommandLine( > PerforceScmProviderRepository repo, File workingDirectory, > ScmVersion version, String > specname ) > { > Commandline command = PerforceScmProvider.createP4Command( repo, > workingDirectory ); > {color:red} > command.createArgument().setValue( "-c" + specname ); > {color} > command.createArgument().setValue( "sync" ); > // Use a simple heuristic to determine if we should use the Force flag > // on sync. Forcing sync is a HUGE performance hit but is required in > // rare instances where source is somehow deleted. If the target > // directory is completely empty, assume a force is required. If > // not empty, we assume a previous checkout was already done and a > normal > // sync will suffice. > // SCM-110 > String[] files = workingDirectory.list(); > if ( files == null || files.length == 0 ) > { > // We need to force so checkout to an empty directory will work. > command.createArgument().setValue( "-f" ); > } > // Not sure what to do here. I'm unclear whether we should be > // sync'ing each file individually to the label or just sync the > // entire contents of the workingDir. I'm going to assume the > // latter until the exact semantics are clearer. > if ( version != null && StringUtils.isNotEmpty( version.getName() ) ) > { > command.createArgument().setValue( "@" + version.getName() ); > } > return command; > {{monospaced}} > The {{monospaced}}specname {{monospaced}} contains the backslashes and is > these are neither escaped nor quoted! Hmm ... Is that a job that the > CommandLine should handle? I think so! > The next thing I will do is to file an issue at plexus-utils and link the > issues. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (CONTINUUM-1402) Syncing with Perforce on Linux/Unix/Bash fails
[ http://jira.codehaus.org/browse/CONTINUUM-1402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106308 ] Matthias Wurm edited comment on CONTINUUM-1402 at 9/3/07 1:02 PM: -- I guess there is a problem with backslashes in the command: After setting loglevel to debug I've seen that maven-scm wants to do the following: 2007-09-03 19:55:35,908 [pool-1-thread-1] DEBUG ScmManager:default - Executing: /bin/bash --c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p perforce.e.secunet.de:1666 -chostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3 sync -f" Executing the command manually on my console removes the backslashes, hence the command fails Client 'hostname-MavenSCM-datalocalcontinuum-1.1-beta-2appscontinuumwebappWEB-INFworking-directory2' unknown - use 'client' command to create it. Setting the clientspec inside single quotes like this works on the console: /bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p perforce.e.secunet.de:1666 -c'hostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3' sync -f" Maybe changing the maven-scm-provider to add single quotes around the clientspec name might fix this issue. was: I guess there is a problem with backslashes in the command: After setting loglevel to debug I've seen that maven-scm wants to do the following: 2007-09-03 19:55:35,908 [pool-1-thread-1] DEBUG ScmManager:default - Executing: /bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p perforce.e.secunet.de:1666 -chostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3 sync -f" Executing the command manually on my console removes the backslashes, hence the command fails Client 'hostname-MavenSCM-datalocalcontinuum-1.1-beta-2appscontinuumwebappWEB-INFworking-directory2' unknown - use 'client' command to create it. Setting the clientspec inside single quotes like this works on the console: /bin/bash -c "p4 -d /data/local/continuum-1.1-beta-2/apps/continuum/webapp/WEB-INF/working-directory/3 -p perforce.e.secunet.de:1666 -c'hostname-MavenSCM-\data\local\continuum-1.1-beta-2\apps\continuum\webapp\WEB-INF\working-directory\3' sync -f" Maybe changing the maven-scm-provider to add single quotes around the clientspec name might fix this issue. > Syncing with Perforce on Linux/Unix/Bash fails > -- > > Key: CONTINUUM-1402 > URL: http://jira.codehaus.org/browse/CONTINUUM-1402 > Project: Continuum > Issue Type: Bug > Components: Integration - Maven 2, SCM >Affects Versions: 1.1-beta-2 > Environment: Bash >Reporter: Sebastian Annies >Priority: Critical > > When a client is created it is named: > E.g.{{monospaced}} > sannies-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\6{{monospaced}} > that is ok, but now comes the sync command and uses following commandline > {{monospaced}} > /bin/bash -c "p4 -d > /opt/continuum-1.1-beta-3-SNAPSHOT/apps/continuum/webapp/WEB-INF/working-directory/1 > > -cbackground-sojus-MavenSCM-\opt\continuum-1.1-beta-3-SNAPSHOT\apps\continuum\webapp\WEB-INF\working-directory\1 > sync" > {{monospaced}} > The Bash now removes the backslashes in the client name! The result is that > the client is not existent and perforce returns with an error. > I think continuum does everything allright but we need the ticket here to be > reminded to switch to a new plexus-utils or maven-scm if it is fixed there. > The Problem starts in 'PerforceCheckOutCommand': > {{monospaced}} > public static Commandline createCommandLine( > PerforceScmProviderRepository repo, File workingDirectory, > ScmVersion version, String > specname ) > { > Commandline command = PerforceScmProvider.createP4Command( repo, > workingDirectory ); > {color:red} > command.createArgument().setValue( "-c" + specname ); > {color} > command.createArgument().setValue( "sync" ); > // Use a simple heuristic to determine if we should use the Force flag > // on sync. Forcing sync is a HUGE performance hit but is required in > // rare instances where source is somehow deleted. If the target > // directory is completely empty, assume a force is required. If > // not empty, we assume a previous checkout was already done and a > normal > // sync will suffice. > // SCM-110 > String[] files = workingDirectory.list(); > if ( files == null || files.length ==
[jira] Created: (CONTINUUM-1320) DefaultBuildController.makeAndStoreBuildResult cannot save build result due to maximum size of COMMAND_LINE
DefaultBuildController.makeAndStoreBuildResult cannot save build result due to maximum size of COMMAND_LINE --- Key: CONTINUUM-1320 URL: http://jira.codehaus.org/browse/CONTINUUM-1320 Project: Continuum Issue Type: Bug Affects Versions: 1.1-alpha-2 Environment: Continuum with Perforce SCM Reporter: Matthias Wurm Since the maven perforce scm provider creates temporary client specs with a long name (see below), the checkout command gets quite long, too, and hence cannot be save in the COMMAND_LINE column due to the maximum size of 256. Here is the stack trace: 2007-06-19 13:06:40,122 [Thread-6] ERROR TaskQueueExecutor:build-project - Error executing task edu.emory.mathcs.backport.java.util.concurrent.ExecutionException: javax.jdo.JDOFatalUserException: Attempt to store value "p4 -d /home/continuum/local/continuum-1.1-alpha-2/apps/continuum/webapp/WEB-INF/working-directory/1 -p perforce.mycompany.com:1666 -cperforce-host.mycompany.com-MavenSCM-\home\continuum\local\continuum-1.1-alpha-2\apps\continuum\webapp\WEB-INF\working-directory\1 sync" in column "COMMAND_LINE" that has maximum length of 256. Please correct your data! at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.getResult(FutureTask.java:299) at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.get(FutureTask.java:128) at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable.waitForTask(ThreadedTaskQueueExecutor.java:165) at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable.run(ThreadedTaskQueueExecutor.java:127) Caused by: javax.jdo.JDOFatalUserException: Attempt to store value "p4 -d /home/continuum/local/continuum-1.1-alpha-2/apps/continuum/webapp/WEB-INF/working-directory/1 -p perforce.mycompany.com:1666 -cperforce-host.mycompany.com-MavenSCM-\home\continuum\local\continuum-1.1-alpha-2\apps\continuum\webapp\WEB-INF\working-directory\1 sync" in column "COMMAND_LINE" that has maximum length of 256. Please correct your data! at org.jpox.store.rdbms.mapping.CharRDBMSMapping.setString(CharRDBMSMapping.java:214) at org.jpox.store.mapping.SingleFieldMapping.setString(SingleFieldMapping.java:203) at org.jpox.store.rdbms.fieldmanager.ParameterSetter.storeStringField(ParameterSetter.java:122) at org.jpox.state.StateManagerImpl.providedStringField(StateManagerImpl.java:2757) at org.apache.maven.continuum.model.scm.ScmResult.jdoProvideField(ScmResult.java) at org.apache.maven.continuum.model.scm.ScmResult.jdoProvideFields(ScmResult.java) at org.jpox.state.StateManagerImpl.provideFields(StateManagerImpl.java:3115) at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:252) at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2519) at org.jpox.store.StoreManager.insert(StoreManager.java:920) at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3667) at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3646) at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1198) at org.jpox.AbstractPersistenceManager.makePersistentInternal(AbstractPersistenceManager.java:1243) at org.jpox.store.mapping.PersistenceCapableMapping.setObject(PersistenceCapableMapping.java:450) at org.jpox.store.rdbms.fieldmanager.ParameterSetter.storeObjectField(ParameterSetter.java:144) at org.jpox.state.StateManagerImpl.providedObjectField(StateManagerImpl.java:2771) at org.apache.maven.continuum.model.project.BuildResult.jdoProvideField(BuildResult.java) at org.apache.maven.continuum.model.project.BuildResult.jdoProvideFields(BuildResult.java) at org.jpox.state.StateManagerImpl.provideFields(StateManagerImpl.java:3115) at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:252) at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2519) at org.jpox.store.StoreManager.insert(StoreManager.java:920) at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3667) at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3646) at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1198) at org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1261) at org.codehaus.plexus.jdo.PlexusJdoUtils.makePersistent(PlexusJdoUtils.java:175) at org.apache.maven.continuum.store.JdoContinuumStore.makePersistent(JdoContinuumStore.java:714) at org.apache.maven.continuum.store.JdoContinuumStor
[jira] Commented: (MNG-2800) Default layout .pathOf(Artifact) resolution of SNAPSHOT incorrect.
[ http://jira.codehaus.org/browse/MNG-2800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_96254 ] Matthias Wurm commented on MNG-2800: Could you post your tentative patch for DefaultArtifact? I'm using Archiva together with the Maven Antlib, and due to this bug all dependencies with SNAPSHOT-Versions in my classpaths are screwed. > Default layout .pathOf(Artifact) resolution of SNAPSHOT incorrect. > -- > > Key: MNG-2800 > URL: http://jira.codehaus.org/browse/MNG-2800 > Project: Maven 2 > Issue Type: Bug > Components: General >Affects Versions: 2.0.4 >Reporter: Joakim Erdfelt >Priority: Minor > > When working with SNAPSHOT deps from within Archiva, the resolution of the > Artifact to a file system path is incorrect. > Example: > * groupId: {{com.foo}} > * artifactId: {{foo-lib}} > * version: {{1.0-20070130.172557-1}} > * type: {{jar}} > Resolves to the incorrect path > {{/com/foo/foo-lib/1.0-20070130.172557-1/foo-lib-1.0-20070130.172557-1.jar}} > It should be > {{/com/foo/foo-lib/1.0-SNAPSHOT/foo-lib-1.0-20070130.172557-1.jar}} > This is the apparent fault of > org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout.pathOf(Artifact) > method not having a check for .isSnapshot() -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (SCM-258) The perforce provider should be able to accept complex filespecs using a clientspec rather than the path in the SCM url
[ http://jira.codehaus.org/browse/SCM-258?page=comments#action_82229 ] Matthias Wurm commented on SCM-258: --- Actually, the property to make the dynamically created clientspec persistent is _maven.scm.persistcheckout_ > The perforce provider should be able to accept complex filespecs using a > clientspec rather than the path in the SCM url > --- > > Key: SCM-258 > URL: http://jira.codehaus.org/browse/SCM-258 > Project: Maven SCM > Issue Type: Improvement > Components: maven-scm-provider-perforce > Environment: All OS, Maven 2.x using the SCM plugin to talk to > perforce >Reporter: Dana Lacoste > > One of the strengths of perforce is the ability to do fairly complex actions > with the clientspec. > For example: > 1 - Checkout two file structures into one location: > //depot1/tree1/... //client/project/tree1 > //depot2/tree2/... //client/project/tree2 > 2 - Rename file structures at checkout time : > //depot/tree/sample-configuration.xml //client/tree/configuration.xml > The SCM URL format doesn't allow this (and implementing it would be difficult) > Currently, the perforce provider doesn't seem to allow a way to use an > existing clientspec (all codepaths seem to create a new clientspec based on > the URL) > If the provider could allow an existing clientspec to define the file > structure, this functionality could be enabled. > Testing: > I don't have any JUnit experience, but I think this could be tested by: > 1 - Create a clientspec that defines some complex content, for example: > //depot/project/src/... //clientspec/project/src/... > //ThirdParty/... //clientspec/project/ThirdParty/... > 2 - run "mvn scm:checkout" and all files should be checked out. > Implementation Ideas: > I can see multiple ways of doing this, depending on the > restrictions/conventions required > A - Use the existing "bootstrap/target/checkout" dynamic directory structure > - Using "p4 client -o" with the given/predefined/assumed clientspec, > alter the p4_root (the line containing "Root:") and do a "p4 sync -f" >(Definition of the clientspec ideas defined separately below) > B - Assume the clientspec has a defined "Root:" and use that for the purposes > of "locating" files (needed for tag/editing/checkin purposes) > - As I'm only checking out, I really don't know how this would affect a > checkin :) > C - Separate from above, how to define which clientspec to use: > - In the SCM URL, perhaps with scm:perforce:[EMAIL > PROTECTED]:port:@clientspec_name > (the second @ being a placeholder for a delimiter) > - As an environment variable (perhaps the existing > maven.scm.perforce.clientspec.name, > enabling this functionality (re-use vs. re-create) with a different > property > - Defined in the settings.xml or in the pom.xml in the SCM configuration > properties > I'm sure more details will be required, this is only what I've identified > within my particular situation. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira