Reputation: 7018
I remember a while back with eclipse or netbeans I was able to easily include my source files in my jar file. I have moved to intellij 10 community edition and find myself needing to do the same thing. Any hints?
Upvotes: 20
Views: 20304
Reputation: 987
Navigate as follows :
(i) Go the "File" in the Top Menu Bar
(ii) Select "Project Structure" from the File Menu
(iii) Select "Artifacts" in Project Settings
(iv) Select "Output Layout"
(v) Click on "+" , select "Directory Content" from the dropdown and choose "src" folder from the directories.
Upvotes: 3
Reputation: 7018
I figured it out...
Click the '+' button in the 'output layout' tab -> include directory contents -> select your src directory. That did it
Upvotes: 47
Reputation: 120168
did you try this
http://blogs.jetbrains.com/idea/tag/artifacts/
basically you
add a build artefact of type jar. You should see something like
Now in the build menu option you can build the jar.
Upvotes: 3