The project name is not necessarily the same as the artifactId (some projects use *-parent), so it's better to guess from the git remote. Also "git add -A <a file>" can easily fail if you add an ignored file by mistake. It's better just to add the directory.