Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create EAR file using command prompt instead of using RSA ?  RSS feed

 
Ramy Nady
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All ,

We have java enterprise project that I always generate the ear file using RSA 9.1 export ear file tools.

But recently we have other team members don't have such IDE installed and I need to know how to generate the ear file using command prompt.

The main application located at D:\Projects\OLXX\GW (that is the resource deployed on the app server)
and I need to export ear file with name sample.ear

Please help to explain in details how to use any command for such purpose - as I have read about jar command also.


Thanks in advance.
 
Rob Spoor
Sheriff
Posts: 21092
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not use Maven? It has a plugin for creating EARs. Just setup the POM file(s) and build the project. The EAR file can then be found in the target folder (of the EAR module if you have multiple modules).
 
Ramy Nady
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately we are not the owner of the project and can't use maven.
We have to work with the existing structure.

So please advice if there is a way to generate the EAR using any command line tool.
 
Tim Holloway
Bartender
Posts: 18713
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Obviously "any" command line tool isn't sufficient, if Maven isn't.

You have 3 options that I can think of, not counting simply manually running all the steps one at a time yourself.

1. Maven. If your project isn't structured for Maven, you should be able to override Maven's default structure. It's better not to, since aside from everything else, the consistent structure of a standard project reduces the time it takes for new people to learn how to work with it. But if you have no choice...

2. Ant. Ant lets you structure your project any way you want to, but you have to build your own set of build rules (build.xml)

3. OS command (batch) files. I used to to this before Maven and Ant came out. It was not very much fun, however. Maven and Ant are designed specifically to build Java projects, so they're easier to work with.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!