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).
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.
"privilege" comes from the Latin words for "private" and "law" (legal) and dates to feudal times. To "claim privilege" meant that you were above the laws that applied to the common people.