cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

gregorw
Active Contributor

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

0 Kudos

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..

Answers (1)

Answers (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert

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

0 Kudos

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.

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert

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

0 Kudos

Got it. Thanks Ivan.

Regards,

Akshay