You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Thibaut CAZENAVE (JIRA)" <ji...@codehaus.org> on 2006/04/28 14:48:19 UTC

[jira] Commented: (SCM-191) Difficult to disable cvs compress mode using system property -Dmaven.scm.cvs.use_compression=false and cvs-settings.xml property file

    [ http://jira.codehaus.org/browse/SCM-191?page=comments#action_64335 ] 

Thibaut CAZENAVE commented on SCM-191:
--------------------------------------

Juste one more thing : 
Modify the "Provider Configuration" part in http://maven.apache.org/scm/cvs.html

after "If you don't want compression, you can define the system property 'maven.scm.cvs.use_compression'."
it should be mvn -Dmaven.scm.cvs.use_compression=false scm:changelog
and not mvn -Dmaven.scm.cvs.use_compression=true scm:changelog

Tibo

> Difficult to disable cvs compress mode using system property -Dmaven.scm.cvs.use_compression=false and cvs-settings.xml property file
> -------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: SCM-191
>          URL: http://jira.codehaus.org/browse/SCM-191
>      Project: Maven SCM
>         Type: Bug

>   Components: maven-scm-provider-cvs
>     Versions: 1.0-beta-3
>     Reporter: Thibaut CAZENAVE
>     Priority: Minor

>
>
> 1st bug :
> The system property -Dmaven.scm.cvs.use_compression=false doesn't work if getSettings() method of CvsUtil class doesn't find the cvs-settings.xml file.
> In this case, this method return a new Settings() for which compressionLevel=3 (constructor of Settings class).
> In method getBaseCommand() of CvsCommandUtils class (org.apache.maven.scm.provider.cvslib.command), since settings.getCompressionLevel()  = 3, if condition is true and then it adds -z3 to CommandLine cl.
> 2nd bug : 
> If you set <compressionLevel>0</compressionLevel> in cvs-settings.xml without setting system property -Dmaven.scm.cvs.use_compression=false, -z3 cvs compression is used.
> In method getBaseCommand(), since settings.getCompressionLevel()  > 0, if condition is false and then we go in else if condition (!System.getProperty( "maven.scm.cvs.use_compression", "true" ).equals( "false" )) which happens to be true so it adds -z3 to CommandLine cl.
> Patch proposed : 
> Replace in CvsCommandUtils getBaseCommand() method :
> ---------------------
> if ( settings.getCompressionLevel() > 0 )
>         {
>             cl.createArgument().setValue( "-z" + settings.getCompressionLevel() );
>         }
>         else if ( !System.getProperty( "maven.scm.cvs.use_compression", "true" ).equals( "false" ) )
>         {
>             cl.createArgument().setValue( "-z3" );
>         }
> ---------------------
> with :
> ---------------------
> if (settings.getCompressionLevel() > 0 && System.getProperty("maven.scm.cvs.use_compression", "true").equals("true"))
> cl.createArgument().setValue("-z" + settings.getCompressionLevel());
> --------------------
> Tibo

-- 
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