- new remote deployment including SSH transfer, FTP transfer, shared filesystem, and HTTP callback;
- log deployment actions and exceptions to run/debug output;
- improved runtime behaviour and deployment handling;
- major code refactorings and internal improvements.
After several users have encountered some troubles during deployment to the JBoss servers, here some explanations:
When manually deploying to the JBoss server, the item to be deployed is simply copied into the deploy directory of the JBoss server instance, e.g. $JBOSS_HOME/server/default/deploy. The JBoss server scans this directory periodically for any changes and deploys, undeploys, or re-deploys anything which has been added, removed, or modified.
The JBoss Integration Plugin uses a different approach. Instead of copying the deployment source into the deploy directory of the JBoss server instance, it instructs the JBoss server to load the deployment source from outside of the JBoss directory tree. The JBoss server then copies the deployment source's content into the temporary deployment directory (e.g. $JBOSS_HOME/server/default/tmp/deploy) and deploys it from there. Thus you won't see any trace of the deployment source in the deploy directory after deploying by means of the JBoss Integration Plugin.
Consequently you should never ever tamper with the deploy or the tmp/deploy directory of the JBoss server when you are using the JBoss Integration Plugin for deployment. A common mistake is to let IDEA generate the deployment source directly inside the deploy directory of the JBoss server and then try to deploy it through the JBoss Integration Plugin. This results in two attempts to deploy the same deployment source, one by the JBoss server detecting the modification in the deploy directory, and another one by the JBoss Integration Plugin. This ends up by some very nasty exceptions.While you may place the deployment source directly into the deploy directory of the JBoss server, you then shouldn't use the JBoss Integration Plugin for deployment (but you still may use the JBoss Integration Plugin for development and debugging).
The remote deployment facility has been greatly improved in this version, enabling deployment to a remote machine in almost any environment. This has been achieved by providing different remote deployment methods which can be configured by means of a new configuration panel in the IDE settings dialog:
This deployment method is used when the JBoss server is running on the development machine. The deployment behaviour is exactly the same as with local deployment when the JBoss server is started from within IDEA. Since there's nothing to configure for the Local deployment method, it won't show up in the configuration panel.
To make the deployment source accessible by the JBoss server, it is transferred to the remote machine using a SSH connection prior to deployment. The SSH connection is using SSH2 with either password or public key authentication. You have to specify a temporary directory on the remote machine where the deployment source is stored. This is NOT the deploy directory of the JBoss server, but any directory outside of the JBoss server directory tree (e.g. /tmp or /home/]]>/deploy). The deployment source is removed from the temporary directory after undeploying.
This works exactly like the SSH transfer deployment method, but a FTP connection is used to transfer the deployment source instead of a SSH connection. The FTP connection may be either active or passive.
This may be used when both the local development machine and the remote deployment machine have a common filesystem, e.g. through NFS, samba, or whatever. You have to specify a local path and a remote path, both pointing to the same shared directory. On deployment the local path part of the deployment source's path is replaced by the remote path. For example if you have access to /home/ on the remote machine through H:/ on the local machine and the deployment source is located in H:/projects/jboss/test/sample.ear, then the JBoss server will be instructed to load the deployment source from /home/]]>/projects/jboss/test/sample.ear.
With HTTP deployment the deployment source isn't transferred to the remote machine, but the JBoss server is instructed to open a HTTP connection back to the local development machine and load the deployment source from there. This implies that the local development machine has to be visible by the remote machine, i.e. the local development machine may not be connected to the network through DHCP. You have to specify the name or network address of the local development machine as it is accessible from the remote machine (not 'localhost'!) and a port on which the JBoss Integration Plugin is listening fro HTTP connections from the JBoss server. You also have to make sure that there's no firewall blocking this port on the local development machine. The JBoss Integration Plugin ensures that only the deployment source will be accessible by HTTP, so there's no risk of making anything visible to the outside.