[ 
http://jira.codehaus.org/browse/MANTRUN-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=157560#action_157560
 ] 

Stefan Franke commented on MANTRUN-92:
--------------------------------------

Creating a patched version is futile. You will end up with patching any wierd 
behaving program.

Solution:

antrun must assign overlay streams before invoking ant. so ant and other tasks 
can do whatever with those overlays. On exit of antrun the original streams are 
restored.

And the overlay streams must not pass the close to the original streams.

voila.

> sshexec task inside maven-ant-run and stdout problems
> -----------------------------------------------------
>
>                 Key: MANTRUN-92
>                 URL: http://jira.codehaus.org/browse/MANTRUN-92
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>         Environment: Issue seen on Windows and Linux
>            Reporter: Mateusz Stefek
>         Attachments: myapp.tgz
>
>
> When the sshexec ant task is executed by the maven-ant-run plugin:
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-antrun-plugin</artifactId>
>   <version>1.1</version>
>   <executions>
>     <execution>
>       <id>server-copy</id>
>         <goals>
>           <goal>run</goal>
>         </goals>
>         <phase>package</phase>
>         <configuration>
>                             <tasks>
>                                 <echo message="Step 1"/>
>                                 <sshexec host="yourhost" username="yourname" 
> password="yourpassword" command="echo Hello World" trust="true" />
>                                 <echo message="Step 2"/>
>                                 <mkdir dir="c:\xyz"/>
>                             </tasks>
>       </configuration>
>       </execution>
>   </executions>
>   <dependencies>
>       <dependency>
>         <groupId>ant</groupId>
>         <artifactId>ant-jsch</artifactId>
>         <version>1.6.2</version>
>   </dependency>
>  </plugin>
> maven process doesn't output anything after "Hello World". However, the build 
> continues fine after that. Only the output console seems to be closed by 
> sshexec.
> A simple example project attached.

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

        

Reply via email to