[
https://issues.apache.org/jira/browse/SCM-717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Osipov closed SCM-717.
------------------------------
Resolution: Auto Closed
This issue has been auto closed because it has been inactive for a long period
of time. If you think this issue still applies, retest your problem with the
most recent version of Maven and the affected component, reopen and post your
results.
> Perforce Provider Add/Remove functions do not work correctly with ** wildcard.
> ------------------------------------------------------------------------------
>
> Key: SCM-717
> URL: https://issues.apache.org/jira/browse/SCM-717
> Project: Maven SCM
> Issue Type: Bug
> Components: maven-scm-provider-perforce
> Affects Versions: 1.8.1
> Environment: Windows 7
> Reporter: Benjamin Irwin
> Priority: Major
>
> I ran the following maven command: mvn -DworkingDirectory=src -Dincludes=**/*
> scm:add
> I expected this to add all the files under a given directory (say src) to
> perforce. The perforce provider finds all the files, but it tries to add them
> to the "src" directory instead of adding them to the directory where the file
> actually exists. E.g. suppose src/main/java/sample/Example.java exists, after
> I run the command above perforce will attempt to add the file Example.java to
> the src directory.
> I read through the code, and I'm pretty confident I found the bug. In
> org.apache.maven.scm.provider.perforce.command.add.PerforceAddCommand.createCommandLine
> (line 87): this line says file.getName(), which per the java spec will
> return just the file name, but not the path. I believe if this call were
> changed to file.getPath(), that it would resolve the problem.
> While finding this problem, I noticed that PerforceRemoveCommand:90 has
> exactly the same bug.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)