Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Traditional Open Source Java Application [closed]

I've been using Java for my "home projects" for a while and now there's a need to make some of my projects available through the repositories like github or Google Code.

As long as I'm the only developer for the project and as long as I always work in Eclipse, there are absolutely no questions about building and running it. Everything just work fine. The question is basically, what do I do if someone asks me to share? :-)

The first thing to do is, making the project buildable with tools like Maven. In this case, no matter if someone has Eclipse installed, or prefers IDEA, he may just download my project and build using Maven. Or, import to Eclipse/IDEA and build.

So, to clarify the question, here are 2 points:

  1. What should my directory structure look like? Folders like src, bin, anything else?
  2. What is the way my application should run? For instance, my application requires log4j in order to run. Maven resolves this dependency, when building the package. But when the package is built, you should manually provide the path to you log4j (with java -cp ...) - what's the way to eliminate this requirement if I'd like to just provide .sh and .cmd scripts for user's convenience?
like image 905
Andrey Agibalov Avatar asked Jan 19 '23 23:01

Andrey Agibalov


1 Answers

If you and your peers just want to keep using Eclipse then share the projects including .project and other hidden files, and avoid from referencing external jar-files and other resources. If you need log4j.jar then put it in your project and add it to the build path.

This works very well, even for multiple programmers and is the fastest way to get up and running.

like image 76
Thorbjørn Ravn Andersen Avatar answered Jan 21 '23 14:01

Thorbjørn Ravn Andersen