Skip to Content
0

How to run Java EE 6 web profile server from command line ?

Mar 30 at 03:03 AM

57

avatar image

Hi,

I would like to know if and how we can run Java EE 6 Web profile server from command line / terminal.

(I would like to run the same in a docker container.)

Regards,

Akshay

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Gregor Wolf
Apr 04 at 06:03 AM
1

Please check out the Console Client Commands documentation. I think you're looking for the Local Server options.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks for your answer just what I was looking for.

Also do you know how to run the server in debug mode? From command line..

0
Ivan Mirisola
Apr 02 at 01:35 PM
0

Hi Akshay,

What do you mean by running the application from the terminal? Do you mean "start" the application from neo SDK command line or deploy the app via command line?

If so, both are supported. Neo's SDK comes with a command line tool in which you are able to do both tasks.

/path/to/neo deploy --host HOST --account ACCOUNT --user USER --application app_name --source path/to/application.war
/path/to/neo start --host HOST --account ACCOUNT --user USER --application app_name

You could also use Maven to accomplish the same. The Neo SDK comes with a samples directory where you can find the main application POM.xml with loads of configuration options to run your app locally for tests or to deploy and start it remotely.

Check also the following blog and this other one for further reference.

To the best of my knowledge, Java EE 6 Web Profile apps are web applications, thus in order to run them, you need to perform http requests (maybe you are looking for JUnit tests). As far as Docker containers, I understand they are "images" of a pre-built installation of Tomcat or something similar (JOnAs, etc). So it will require you to deploy the app the same way you are used to in a local tomcat installation (i.e.: WAR file).

Regards,
Ivan

Show 3 Share
10 |10000 characters needed characters left characters exceeded

I want to run the JAVA EE 6 Web Profile server similar to how we start tomcat with by running catalina.sh. Our use requires us to run it in a CI / CD environment for our tests.

0

Hi Akshay,

The main pom.xml file that comes with the samples contains an example that includes the "install-local" for integration tests such as the ones you are looking for. The maven plugin instructs the tests to download and install a local installation of Java EE 6 Web Profile and then run it, deploying the file onto it, perform the tests and exit.

Regards,
Ivan

1

Got it. Thanks Ivan.

Regards,

Akshay

0