• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
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.
 
Sheriff
Posts: 21972
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu 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.
 
Saloon Keeper
Posts: 22272
151
Android Eclipse IDE Tomcat Server Redhat Java 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.
 
    Bookmark Topic Watch Topic
  • New Topic