ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 42770] New: - IndexOutOfBounds exception in <scp> when the URI is invalid
Date Thu, 28 Jun 2007 16:04:41 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42770>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42770

           Summary: IndexOutOfBounds exception in <scp> when the URI is
                    invalid
           Product: Ant
           Version: 1.7Alpha (nightly)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: stevel@apache.org


I'm doing an scp, but the path I am setting up is wrong; its an unexpanded property:

    <property name="ssh.path"
        value="${rpm.ssh.user}@${rpm.ssh.server}:${rpm.ssh.dir}" />
    <scp remoteToDir="${rpm.ssh.path}"
        passphrase="${rpm.ssh.passphrase}"
        keyfile="${rpm.ssh.keyfile}"
        trust="${rpm.ssh.trust}"
        verbose="${rpm.ssh.verbose}" >
      <fileset refid="rpm.upload.fileset"/>
    </scp>

This is breaking the code that cracks the string:

release.rpm-upload:
Property "ssh.server" has not been set
     [echo] SCP target is ${ssh.server}
  [ssh-rpm] Connecting to 16.25.169.163:22
Property "rpm.ssh.path" has not been set

======================================================================
Exiting failing project "release"
======================================================================

BUILD FAILED - at 28/06/07 17:02
/home/slo/Projects/SmartFrog/Forge/core/release/build.xml:547:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:215)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1938)
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.parseUri(Scp.java:321)
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.upload(Scp.java:253)
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:201)
        ... 16 more
--- Nested Exception ---
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1938)
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.parseUri(Scp.java:321)
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.upload(Scp.java:253)
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:201)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message