3

I have some ant scripts that create various things from the command line.

My command environment is complex, and we are doing some icky things I don't really want to do in eclipse, that won't really run from an ant script invoked inside eclipse. But if there is a way to have an ant script in eclipse start the server, that would be OK too.

Sometimes they take a while to run. It would be nice if when they were done, I could start my Java EE server inside eclipse. I happen to use JBoss 1.4.2 if that matters. I would like to start it in debug mode if possible. This way I could test without having to navigate to the server and start up debug from within eclipse as soon as my code finishes building. Is there any easy way to do this?

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
ggb667
  • 1,881
  • 2
  • 20
  • 44

1 Answers1

2

You can always manage your Application Server externally. by calling <JBOSS_HOME>/bin/run.(sh|bat) -b <ip_address> (JBoss 5) or <JBOSS_HOME>/bin/standalone.(sh|bat) -b <ip_address>

To start and stop your server from ant and having it appear as if you started it from within eclipse, that is a harder task. You would have to create a Run/Launch Configuration from within eclipse and then call it from ant see Launch an Eclipse Run Configuration from ANT

Community
  • 1
  • 1
Buddy
  • 86
  • 7
  • But will I see the server running inside eclipse and will eclipse capture the console output? Also, the ${env_var:XBOOTCLASSPATH} ${env_var:JBOSS_HOME}, etc. would need to be present in my command line invocation. Basically I want to make a call to ECLIPSE to start the server, not to the server. – ggb667 Oct 04 '12 at 16:14
  • I was not able to track down a concise example of the Launch an Eclipse Run Configuration from ANT task actually being used, and the documentation appears very incomplete. This does look like what I am looking for however. – ggb667 Oct 15 '12 at 13:19
  • As a follow up, in eclipse, it seems that the weblogic server seems to notice when it is started or stopped. I can't seem to get a hold of it's console, but I can "restart" it in the server. : – ggb667 May 01 '14 at 14:34