[ 
https://issues.apache.org/jira/browse/SCM-777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16731939#comment-16731939
 ] 

Michael Osipov edited comment on SCM-777 at 1/2/19 10:56 AM:
-------------------------------------------------------------

[~hboutemy], [~olamy], I know it has been sometime since you implemented those 
tickets. Can you remember what the purpose of the boolean property 
{{Boolean.getBoolean( CHECK_WORKING_DIRECTORY_URL )}} is and why not a simply 
not-null check on {{System.getProperty( 
"scmCheckWorkingDirectoryUrl.currentWorkingDirectory" )}} hasn't been 
performed? It pretty much seems like that proper documenation has been lost and 
a regression has been introduced.

I have pushed a branch with a simple solution to the problem. Works for me, 
though it does not fail properly if the target dir is not a working copy. 
[~schaller], can you confirm that this solves your issue?


was (Author: michael-o):
[~hboutemy], [~olamy], I know it has been sometime since you implemented those 
tickets. Can you remember what the purpose of the boolean property 
`Boolean.getBoolean( CHECK_WORKING_DIRECTORY_URL )` is and why not a simply 
not-null check on `System.getProperty( 
"scmCheckWorkingDirectoryUrl.currentWorkingDirectory" )` hasn't been performed? 
It pretty much seems like that proper documenation has been lost and a 
regression has been introduced.

> scm:validate ignores scmCheckWorkingDirectoryUrl configuration in favor of 
> system property
> ------------------------------------------------------------------------------------------
>
>                 Key: SCM-777
>                 URL: https://issues.apache.org/jira/browse/SCM-777
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-plugin
>    Affects Versions: 1.9.1
>         Environment: Java 7 x64 on Windows 7
>            Reporter: Mark Herman
>            Assignee: Michael Osipov
>            Priority: Major
>
> org.apache.maven.scm.manager.AbstractScmManager.checkWorkingDirectoryUrl() 
> uses... {code} Boolean.getBoolean( CHECK_WORKING_DIRECTORY_URL ) {code}  
> ...in order to check if it should check the repository on scm:validate.  This 
> will only react to the system property, and not to the maven configuration.
> *Result:* no maven config will enable the check working directory option, 
> only passing it in as a jvm argument.
> *Expected:* this should work:
> {code}
> <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-scm-plugin</artifactId>
>     <configuration>
>         <scmCheckWorkingDirectoryUrl>true</scmCheckWorkingDirectoryUrl>  <!-- 
> this configuration is ignored, don't know why -->
>     </configuration>
>     <executions>
>         <execution>
>           <phase>validate</phase>
>           <configuration>
>             <scmCheckWorkingDirectoryUrl>true</scmCheckWorkingDirectoryUrl> 
> <!-- neither does this -->
>           </configuration>
>           <goals>
>             <goal>validate</goal>
>           </goals>
>         </execution>
>     </executions>
> </plugin>
> {code}
> *Workaround:* Use <systemProperty> section.  Tried <systemPropertyVariables> 
> and for some reason that didn't appear to work.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to