|
|
|
mvn -Dmaven.persist.checkout=true -Dmaven.scm.perforce.clientspec.name=<clientspec-name> scm:checkout
This will sync the contents of that clientspec to the current directory. If the current directory is empty, it will force sync. The persistcheckout flag ensures that the command will not delete the clientspec when the command is complete (as it does by default). Note this command is exactly the same as your other issue with update. Unfortunately, the same problem as in the other issue occurs:
update and checkout are the same, and they both (in the first try {} block of executeCheckoutCommand()) overwrite the existing clientspec with the fileset information provided in the SCM URL.... Actually, the property to make the dynamically created clientspec persistent is maven.scm.persistcheckout
The ability to provide a complex filespec using perforce's own clientspec rather than the minimal path in the scm url seems like a FUNDAMENTAL issue to be resolved in order for the maven perforce plug-in to be useable. (please, correct me if I'm wrong!!!
Considering that it's been over 6 months since the issue has been reported and it's still not fixed, the question is really: is my understanding of what is fundamental to the functioning of maven perforce plug-in incorrect or is the development of the plug-in stagnated? p.s. I'm now also running into the problem that the plugin overwrites the existing clientspec (seemingly during release only?) If I set maven.scm.persistcheckout, will that prevent it from overwriting the existing clientspec?
I haven't investigated the code since November 2006, but at that time, Brian, but at that time this would happen :
1 - read filespec line so you always lost your current clientspec, though you could keep it for manual work later. It's just the way the code was written. the persist variable was not investigated at clientspec create, only at clientspec delete. Is there any way to make the perforce plugin work with the release plugin if you don't have a one directory clientspec? I'm quite confused. The release:prepare task seems to be blocked but it's unclear if this is the issue - but it looks like it might be because of the message that "+//myspec" doesn't match "//myspec", the release:prepare task reports.
[INFO] The SCM location in your pom.xml (//myspec) is not equal to the depot location (+//myspec). This happens frequently with branches. Ignoring the SCM location. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
You should be able to set up a clientspec by hand and then use 'mvn -Dmaven.scm.perforce.clientspec.name=<clientspec-name> scm:checkout' to check out the contents of that clientspec to the current directory. Note the checkout command will update the clientspec to change the Root to the current directory.
See
SCM-110for details on force syncing.If this is sufficient for your needs, please let me know so I can close this issue.