Awesome... thanks. That did the trick... Here is the final config fyi...
Remotely stops JBoss, copies over a new EAR file and remotely starts JBoss:

        <plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.ant</groupId>
                        <artifactId>ant-jsch</artifactId>
                        <version>1.7.0</version>
                    </dependency>
                    <dependency>
                        <groupId>com.jcraft</groupId>
                        <artifactId>jsch</artifactId>
                        <version>0.1.31</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <configuration>
                            <tasks>
                                <property environment="env"/>

                                <sshexec host="hostname"
                                         username="username"
                                        
keyfile="${env.USERPROFILE}/.ssh/id_rsa"
                                         command="service jboss stop"
                                        />

                                <scp file="c:/deploy/myApp.ear"
                                    
todir="[EMAIL PROTECTED]:/opt/jboss/server/default/deploy"
                                    
keyfile="${env.USERPROFILE}/.ssh/id_rsa"
                                     passphrase=""
                                     verbose="true"
                                        />

                                <sshexec host="hostname"
                                         username="username"
                                        
keyfile="${env.USERPROFILE}/.ssh/id_rsa"
                                         command="service jboss start"
                                        />
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

-- 
View this message in context: 
http://www.nabble.com/running-optional-ant-tasks-with-maven-antrun-plugin-tp15842721s177p15844991.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to