I use maven 3.0.3 and have tried to generate pom for third-party jar like this:
mvn install:install-file -Dfile=cobra.jar -DgroupId=com.cobra -Darti
If you are having trouble with the command line version of Maven, you might want to try the M2E plugin for eclipse. It is far more user friendly for people without very much experience with Maven.
I had that error when I was using maven in Windows, what worked for me was opening the cmd and not the PowerShell. Apparently certain errors appear when you don't do it with the cmd. I hope it works.