Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Plugins jboss-maven-plugin and cargo-maven2-plugin with JBoss 5

 
Jean-Claude Rouvinez
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm trying to deploy EAR artifacts to a remote JBoss server using cargo or the JBoss Maven Plugin but unfortunately none of this plugin works.

Who has managed it? How?
Any help is greatly appreciated.

Best Regards
Jean-Claude

Further Details:

Configuration
Maven version: 2.0.9
Java version: 1.6.0_07
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

jBoss 5.0.0.CR2
build: SVNTag=JBoss_5_0_0_CR2
date=200809171140

cargo-maven2-plugin
It is officially not possible to deploy an EAR file to a remote JBoss server using cargo according to Nabble - cargo eploy

jboss-maven-plugin
No success with the jboss-maven-plugin. Further information under Nabble - jboss eploy
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jean-Claude,

How have you configured the maven plugin in particular? I not4ieced from the Nabble post that the final 'slash' is a forward one as opposed to a backwards one:

c:\jp\projects\ipi-ear-example\ipi-ear-example-ear\target/ear-example.ear
 
Jean-Claude Rouvinez
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Martijn,

The configuration is very simple. I didn't configure anything but the final name of the artifact:


Configuration of the plugins:

1). jboss-maven-plugin


2). cargo-maven2-plugin
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, I was hoping to spot something there but as you say it's pretty simple. I'm afraid I can't help any further at this stage (we still manually deploy by unzipping several files including the EAR to the correct directories).
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deploying to a remote JBoss AS has always been problematic because JBoss AS provides no help in this area (though with the new admin console, Embedded Jopr, there might be a way once tools, such as cargo, catch up).

The only way to do a remote deployment is to copy the file(s) to the remote host using network file copy, or ftp, or some other similar mechanism (or writing a web app that does deployment - I've done this before but like I said Embedded Jopr can do this now).

And a hint on doing a remote deploy: copy the file(s) to a temporary location first, and after the copy is complete, move the file(s) to the deploy directory. (You want to avoid having the hot deployer attempt to deploy your app when it is only partially copied, that can sometimes give bizarre error messages.)

Personally, I don't deploy often enough to worry about automation so I do it by hand. If I were to automate it, I would do it via an Ant script that did a network copy followed by a move. But then my PC and the server are both behind the firewall and I have the luxury of connecting to the server's disk.
 
Jean-Claude Rouvinez
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter,

Thank you for your answer. It makes me feel more confident using this solution:

1).
I define an ant target (deploy_ear_file) in build.xml to deploy the artifact. This target uses scp to copy the artifact remotely and sshexec to move it to the deploy directory.

2).
I call this ant target from Maven

3).
I deploy the artifact to the remote host with the command:
mvn clean deploy


Appendix:
The section of the file pom.xml
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic