Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

creating jar file of maven projects with netbeans

I am using netbeans to work on a project. I am using svn, so that I can commit to newer versions and revert to an older version in case I mess up. Now I want to create a jar file of this project but the build tab in the project properties does not display the packaging option, it only displays one option and that is of 'compile'.

If I create a new project (Java Application) it does show the packaging option and then I can easily create a jar file, but this maven project that I am working on does not work like this.

Please suggest me a way to create jar file out of my maven project.

Thanks,

like image 551
comatose Avatar asked Dec 20 '11 12:12

comatose


1 Answers

  1. Open cmd (if you are on Windows) or any shell (if you are on Linux)
  2. Navigate to your project directory (use cd command)
  3. Run mvn clean package there.

Your jar will be in <project dir>/target.

like image 134
yatskevich Avatar answered Sep 28 '22 11:09

yatskevich