jar cf helloworld.ear web-app.war META-INF
Had a look at the syntax of jar cf. Here's the syntax:
jar cf jar-file input-file(s)
The command that you are using mentions META-INF as an input file but such a file is not present hence its throwing the error
By default, a META-INF directory is ignored by the jar utility being that it's a special directory in the archive. To tell the jar tool to do what you want execute
jar cvfM helloworld.ear web-app.war META-INF
Use of the 'M' flag shuts the default behavior off. Note, usually people use Ant for this type of stuff being that when you use the above command a MANIFEST.MF file is not generated for you automatically. If you want to use the form above and you required a MANIFEST.MF file, you will have to write/generate it yourself and place it in the META-INF directory.
Note...as previously mentioned, META-INF has to exist ;-)
Yes sorry to have wasted your time fellas but I missed the part where your supposed to create the META-INF directory... DOH!!!
Feel free to give me a cyber slap!
Thanx for the quick response.
No problem. Do take note thought that when you do the jar command, you will have to use the 'M' flag if you want it to take your META-INF directory. So, it's not a total loss ;-)
Will do, thanx.