You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Håvard Wigtil (JIRA)" <ji...@codehaus.org> on 2008/04/22 10:00:55 UTC

[jira] Created: (SCM-375) Problems with svn export and

Problems with svn export and <exportDirectory>
----------------------------------------------

                 Key: SCM-375
                 URL: http://jira.codehaus.org/browse/SCM-375
             Project: Maven SCM
          Issue Type: Bug
          Components: maven-scm-provider-svn
    Affects Versions: 1.0
         Environment: Maven 2.0.8 / Linux
            Reporter: Håvard Wigtil


The behaviour of <exportDirectory> for svn export seems buggy. I have three (probably related problems):

1) Not setting exportDirectory on export results in a NPE. I can understand that the setting is required, but I would expect an error message instead.

2) Setting exportDirectory to a relative path gets me this path twice, e.g. setting exportDirectory to target/export results in an export in target/export/target/export

3) Setting exportDirectory to an absoulte path, e.g. ${basedir}/target/export results in an error from svn saying that the directory already exists:
[INFO] Executing: svn --non-interactive export https://example.com/svn/theproject/trunk/ /home/havwig/theproject/leveranse/target/export
[INFO] Working directory: /home/havwig/theproject/leveranse/target/export
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: Destination directory exists; please remove the directory or use --force to overwrite
svn: '/home/havwig/theproject/leveranse/target/export' already exists


I use the configuration below:
<plugin>
    <artifactId>maven-scm-plugin</artifactId>
    <version>1.0</version>
    <configuration>
        <connectionUrl>scm:svn:https://example.com/svn/theproject/trunk/ </connectionUrl>
        <exportDirectory>${basedir}/target/export</exportDirectory>
    </configuration>
    <executions>
        <execution>
            <id>leveranse</id>
            <phase>package</phase>
            <goals>
                <goal>export</goal>
            </goals>
        </execution>
    </executions>
</plugin>

-- 
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: (SCM-375) Problems with svn export and

Posted by "David Moss (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=160345#action_160345 ] 

David Moss edited comment on SCM-375 at 1/8/09 3:07 AM:
--------------------------------------------------------

{quote}
3) Setting exportDirectory to an absoulte path, e.g. ${basedir}/target/export results in an error from svn saying that the directory already exists:
[INFO] Executing: svn --non-interactive export https://example.com/svn/theproject/trunk/ /home/havwig/theproject/leveranse/target/export
[INFO] Working directory: /home/havwig/theproject/leveranse/target/export
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: Destination directory exists; please remove the directory or use --force to overwrite
svn: '/home/havwig/theproject/leveranse/target/export' already exists
{quote}

Same problem here.  This is a serious problem for me, with no apparent work around.
If there were some way of passing the --force parameter to the svn command we could use that, but I can't see any provision for passing provider specific parameters through.

Actually, what I need to achieve is merging two source trees - I'd hoped to export two projects into the same directory but obviously I'll need to be able to specify --force to do this.

      was (Author: dmosses):
    {quote}
3) Setting exportDirectory to an absoulte path, e.g. ${basedir}/target/export results in an error from svn saying that the directory already exists:
[INFO] Executing: svn --non-interactive export https://example.com/svn/theproject/trunk/ /home/havwig/theproject/leveranse/target/export
[INFO] Working directory: /home/havwig/theproject/leveranse/target/export
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: Destination directory exists; please remove the directory or use --force to overwrite
svn: '/home/havwig/theproject/leveranse/target/export' already exists
{quote}

Same problem here.  This is a serious problem for me, with no apparent work around.
If there were some way of passing the --force parameter to the svn command we could use that, but I can't see any provision for passing provider specific parameters through.

Actually, what I need to achieve is merging two source trees - I'd hoped to export two projects into the same directory to achieve this, but obviously I'll need to be able to specify --force to achieve this.
  
> Problems with svn export and <exportDirectory>
> ----------------------------------------------
>
>                 Key: SCM-375
>                 URL: http://jira.codehaus.org/browse/SCM-375
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-svn
>    Affects Versions: 1.0
>         Environment: Maven 2.0.8 / Linux
>            Reporter: Håvard Wigtil
>
> The behaviour of <exportDirectory> for svn export seems buggy. I have three (probably related problems):
> 1) Not setting exportDirectory on export results in a NPE. I can understand that the setting is required, but I would expect an error message instead.
> 2) Setting exportDirectory to a relative path gets me this path twice, e.g. setting exportDirectory to target/export results in an export in target/export/target/export
> 3) Setting exportDirectory to an absoulte path, e.g. ${basedir}/target/export results in an error from svn saying that the directory already exists:
> [INFO] Executing: svn --non-interactive export https://example.com/svn/theproject/trunk/ /home/havwig/theproject/leveranse/target/export
> [INFO] Working directory: /home/havwig/theproject/leveranse/target/export
> [ERROR] Provider message:
> [ERROR] The svn command failed.
> [ERROR] Command output:
> [ERROR] svn: Destination directory exists; please remove the directory or use --force to overwrite
> svn: '/home/havwig/theproject/leveranse/target/export' already exists
> I use the configuration below:
> <plugin>
>     <artifactId>maven-scm-plugin</artifactId>
>     <version>1.0</version>
>     <configuration>
>         <connectionUrl>scm:svn:https://example.com/svn/theproject/trunk/ </connectionUrl>
>         <exportDirectory>${basedir}/target/export</exportDirectory>
>     </configuration>
>     <executions>
>         <execution>
>             <id>leveranse</id>
>             <phase>package</phase>
>             <goals>
>                 <goal>export</goal>
>             </goals>
>         </execution>
>     </executions>
> </plugin>

-- 
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-375) Problems with svn export and

Posted by "David Moss (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=160345#action_160345 ] 

David Moss commented on SCM-375:
--------------------------------

{quote}
3) Setting exportDirectory to an absoulte path, e.g. ${basedir}/target/export results in an error from svn saying that the directory already exists:
[INFO] Executing: svn --non-interactive export https://example.com/svn/theproject/trunk/ /home/havwig/theproject/leveranse/target/export
[INFO] Working directory: /home/havwig/theproject/leveranse/target/export
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: Destination directory exists; please remove the directory or use --force to overwrite
svn: '/home/havwig/theproject/leveranse/target/export' already exists
{quote}

Same problem here.

> Problems with svn export and <exportDirectory>
> ----------------------------------------------
>
>                 Key: SCM-375
>                 URL: http://jira.codehaus.org/browse/SCM-375
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-svn
>    Affects Versions: 1.0
>         Environment: Maven 2.0.8 / Linux
>            Reporter: Håvard Wigtil
>
> The behaviour of <exportDirectory> for svn export seems buggy. I have three (probably related problems):
> 1) Not setting exportDirectory on export results in a NPE. I can understand that the setting is required, but I would expect an error message instead.
> 2) Setting exportDirectory to a relative path gets me this path twice, e.g. setting exportDirectory to target/export results in an export in target/export/target/export
> 3) Setting exportDirectory to an absoulte path, e.g. ${basedir}/target/export results in an error from svn saying that the directory already exists:
> [INFO] Executing: svn --non-interactive export https://example.com/svn/theproject/trunk/ /home/havwig/theproject/leveranse/target/export
> [INFO] Working directory: /home/havwig/theproject/leveranse/target/export
> [ERROR] Provider message:
> [ERROR] The svn command failed.
> [ERROR] Command output:
> [ERROR] svn: Destination directory exists; please remove the directory or use --force to overwrite
> svn: '/home/havwig/theproject/leveranse/target/export' already exists
> I use the configuration below:
> <plugin>
>     <artifactId>maven-scm-plugin</artifactId>
>     <version>1.0</version>
>     <configuration>
>         <connectionUrl>scm:svn:https://example.com/svn/theproject/trunk/ </connectionUrl>
>         <exportDirectory>${basedir}/target/export</exportDirectory>
>     </configuration>
>     <executions>
>         <execution>
>             <id>leveranse</id>
>             <phase>package</phase>
>             <goals>
>                 <goal>export</goal>
>             </goals>
>         </execution>
>     </executions>
> </plugin>

-- 
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: (SCM-375) Problems with svn export and

Posted by "David Moss (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=160345#action_160345 ] 

David Moss edited comment on SCM-375 at 1/8/09 3:04 AM:
--------------------------------------------------------

{quote}
3) Setting exportDirectory to an absoulte path, e.g. ${basedir}/target/export results in an error from svn saying that the directory already exists:
[INFO] Executing: svn --non-interactive export https://example.com/svn/theproject/trunk/ /home/havwig/theproject/leveranse/target/export
[INFO] Working directory: /home/havwig/theproject/leveranse/target/export
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: Destination directory exists; please remove the directory or use --force to overwrite
svn: '/home/havwig/theproject/leveranse/target/export' already exists
{quote}

Same problem here.  This is a serious problem for me, with no apparent work around.
If there were some way of passing the --force parameter to the svn command we could use that, but I can't see any provision for passing provider specific parameters through.

Actually, what I need to achieve is merging two source trees - I'd hoped to export two projects into the same directory to achieve this, but obviously I'll need to be able to specify --force to achieve this.

      was (Author: dmosses):
    {quote}
3) Setting exportDirectory to an absoulte path, e.g. ${basedir}/target/export results in an error from svn saying that the directory already exists:
[INFO] Executing: svn --non-interactive export https://example.com/svn/theproject/trunk/ /home/havwig/theproject/leveranse/target/export
[INFO] Working directory: /home/havwig/theproject/leveranse/target/export
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: Destination directory exists; please remove the directory or use --force to overwrite
svn: '/home/havwig/theproject/leveranse/target/export' already exists
{quote}

Same problem here.
  
> Problems with svn export and <exportDirectory>
> ----------------------------------------------
>
>                 Key: SCM-375
>                 URL: http://jira.codehaus.org/browse/SCM-375
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-svn
>    Affects Versions: 1.0
>         Environment: Maven 2.0.8 / Linux
>            Reporter: Håvard Wigtil
>
> The behaviour of <exportDirectory> for svn export seems buggy. I have three (probably related problems):
> 1) Not setting exportDirectory on export results in a NPE. I can understand that the setting is required, but I would expect an error message instead.
> 2) Setting exportDirectory to a relative path gets me this path twice, e.g. setting exportDirectory to target/export results in an export in target/export/target/export
> 3) Setting exportDirectory to an absoulte path, e.g. ${basedir}/target/export results in an error from svn saying that the directory already exists:
> [INFO] Executing: svn --non-interactive export https://example.com/svn/theproject/trunk/ /home/havwig/theproject/leveranse/target/export
> [INFO] Working directory: /home/havwig/theproject/leveranse/target/export
> [ERROR] Provider message:
> [ERROR] The svn command failed.
> [ERROR] Command output:
> [ERROR] svn: Destination directory exists; please remove the directory or use --force to overwrite
> svn: '/home/havwig/theproject/leveranse/target/export' already exists
> I use the configuration below:
> <plugin>
>     <artifactId>maven-scm-plugin</artifactId>
>     <version>1.0</version>
>     <configuration>
>         <connectionUrl>scm:svn:https://example.com/svn/theproject/trunk/ </connectionUrl>
>         <exportDirectory>${basedir}/target/export</exportDirectory>
>     </configuration>
>     <executions>
>         <execution>
>             <id>leveranse</id>
>             <phase>package</phase>
>             <goals>
>                 <goal>export</goal>
>             </goals>
>         </execution>
>     </executions>
> </plugin>

-- 
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] Closed: (SCM-375) Problems with svn export and

Posted by "Dan Tran (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Tran closed SCM-375.
------------------------

      Assignee: Dan Tran
    Resolution: Fixed

fixed at 

Revision: 733437
Author: dantran
Date: 1:25:52 AM, Sunday, January 11, 2009
Message:
SCM-375
  - Export Mojo should not pre-create initial export directory, the provider should be the one.  This make checkout and export behave the same
  - Use File for exportDirector configuration rather than using String.
  - Convert bad file URL which derived from windows directory to unix path.
  - Add --force param into svn export command to support export to existing directory
  - No need to set workingDirectory for SvnExportCommand, actually workingDirectory has no meaning to all providers when dealing with export command.
  - Add various export tests
  
----
Modified : /maven/scm/trunk
Modified : /maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ExportMojo.java
Added : /maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/ExportMojoTest.java
Added : /maven/scm/trunk/maven-scm-plugin/src/test/resources/mojos/export
Added : /maven/scm/trunk/maven-scm-plugin/src/test/resources/mojos/export/export.xml
Modified : /maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src/main/java/org/apache/maven/scm/provider/svn/SvnCommandUtils.java
Modified : /maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/SvnCommandLineUtils.java
Modified : /maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/export/SvnExeExportCommand.java
Added : /maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/test/java/org/apache/maven/scm/provider/svn/svnexe/command/export
Added : /maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/test/java/org/apache/maven/scm/provider/svn/svnexe/command/export/SvnExportCommandTest.java



> Problems with svn export and <exportDirectory>
> ----------------------------------------------
>
>                 Key: SCM-375
>                 URL: http://jira.codehaus.org/browse/SCM-375
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-svn
>    Affects Versions: 1.0
>         Environment: Maven 2.0.8 / Linux
>            Reporter: Håvard Wigtil
>            Assignee: Dan Tran
>             Fix For: 1.1.1
>
>
> The behaviour of <exportDirectory> for svn export seems buggy. I have three (probably related problems):
> 1) Not setting exportDirectory on export results in a NPE. I can understand that the setting is required, but I would expect an error message instead.
> 2) Setting exportDirectory to a relative path gets me this path twice, e.g. setting exportDirectory to target/export results in an export in target/export/target/export
> 3) Setting exportDirectory to an absoulte path, e.g. ${basedir}/target/export results in an error from svn saying that the directory already exists:
> [INFO] Executing: svn --non-interactive export https://example.com/svn/theproject/trunk/ /home/havwig/theproject/leveranse/target/export
> [INFO] Working directory: /home/havwig/theproject/leveranse/target/export
> [ERROR] Provider message:
> [ERROR] The svn command failed.
> [ERROR] Command output:
> [ERROR] svn: Destination directory exists; please remove the directory or use --force to overwrite
> svn: '/home/havwig/theproject/leveranse/target/export' already exists
> I use the configuration below:
> <plugin>
>     <artifactId>maven-scm-plugin</artifactId>
>     <version>1.0</version>
>     <configuration>
>         <connectionUrl>scm:svn:https://example.com/svn/theproject/trunk/ </connectionUrl>
>         <exportDirectory>${basedir}/target/export</exportDirectory>
>     </configuration>
>     <executions>
>         <execution>
>             <id>leveranse</id>
>             <phase>package</phase>
>             <goals>
>                 <goal>export</goal>
>             </goals>
>         </execution>
>     </executions>
> </plugin>

-- 
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] Updated: (SCM-375) Problems with svn export and

Posted by "Dan Tran (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Tran updated SCM-375:
-------------------------

    Fix Version/s: 1.1.1

> Problems with svn export and <exportDirectory>
> ----------------------------------------------
>
>                 Key: SCM-375
>                 URL: http://jira.codehaus.org/browse/SCM-375
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-svn
>    Affects Versions: 1.0
>         Environment: Maven 2.0.8 / Linux
>            Reporter: Håvard Wigtil
>             Fix For: 1.1.1
>
>
> The behaviour of <exportDirectory> for svn export seems buggy. I have three (probably related problems):
> 1) Not setting exportDirectory on export results in a NPE. I can understand that the setting is required, but I would expect an error message instead.
> 2) Setting exportDirectory to a relative path gets me this path twice, e.g. setting exportDirectory to target/export results in an export in target/export/target/export
> 3) Setting exportDirectory to an absoulte path, e.g. ${basedir}/target/export results in an error from svn saying that the directory already exists:
> [INFO] Executing: svn --non-interactive export https://example.com/svn/theproject/trunk/ /home/havwig/theproject/leveranse/target/export
> [INFO] Working directory: /home/havwig/theproject/leveranse/target/export
> [ERROR] Provider message:
> [ERROR] The svn command failed.
> [ERROR] Command output:
> [ERROR] svn: Destination directory exists; please remove the directory or use --force to overwrite
> svn: '/home/havwig/theproject/leveranse/target/export' already exists
> I use the configuration below:
> <plugin>
>     <artifactId>maven-scm-plugin</artifactId>
>     <version>1.0</version>
>     <configuration>
>         <connectionUrl>scm:svn:https://example.com/svn/theproject/trunk/ </connectionUrl>
>         <exportDirectory>${basedir}/target/export</exportDirectory>
>     </configuration>
>     <executions>
>         <execution>
>             <id>leveranse</id>
>             <phase>package</phase>
>             <goals>
>                 <goal>export</goal>
>             </goals>
>         </execution>
>     </executions>
> </plugin>

-- 
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-375) Problems with svn export and

Posted by "Dan Tran (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=160478#action_160478 ] 

Dan Tran commented on SCM-375:
------------------------------

here is a proposed solution to add --force

SCM-434

> Problems with svn export and <exportDirectory>
> ----------------------------------------------
>
>                 Key: SCM-375
>                 URL: http://jira.codehaus.org/browse/SCM-375
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-svn
>    Affects Versions: 1.0
>         Environment: Maven 2.0.8 / Linux
>            Reporter: Håvard Wigtil
>
> The behaviour of <exportDirectory> for svn export seems buggy. I have three (probably related problems):
> 1) Not setting exportDirectory on export results in a NPE. I can understand that the setting is required, but I would expect an error message instead.
> 2) Setting exportDirectory to a relative path gets me this path twice, e.g. setting exportDirectory to target/export results in an export in target/export/target/export
> 3) Setting exportDirectory to an absoulte path, e.g. ${basedir}/target/export results in an error from svn saying that the directory already exists:
> [INFO] Executing: svn --non-interactive export https://example.com/svn/theproject/trunk/ /home/havwig/theproject/leveranse/target/export
> [INFO] Working directory: /home/havwig/theproject/leveranse/target/export
> [ERROR] Provider message:
> [ERROR] The svn command failed.
> [ERROR] Command output:
> [ERROR] svn: Destination directory exists; please remove the directory or use --force to overwrite
> svn: '/home/havwig/theproject/leveranse/target/export' already exists
> I use the configuration below:
> <plugin>
>     <artifactId>maven-scm-plugin</artifactId>
>     <version>1.0</version>
>     <configuration>
>         <connectionUrl>scm:svn:https://example.com/svn/theproject/trunk/ </connectionUrl>
>         <exportDirectory>${basedir}/target/export</exportDirectory>
>     </configuration>
>     <executions>
>         <execution>
>             <id>leveranse</id>
>             <phase>package</phase>
>             <goals>
>                 <goal>export</goal>
>             </goals>
>         </execution>
>     </executions>
> </plugin>

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