Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6332929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:22:06+00:00 2026-05-24T18:22:06+00:00

I’ve been using Java for my home projects for a while and now there’s

  • 0

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?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:22:07+00:00Added an answer on May 24, 2026 at 6:22 pm

    From my personal experience, maven is the best available tool for building and managing dependencies, so my answers for your questions are all about maven. Also, with maven you need to provide only pom.xml file containing definition of dependencies and project build configuration. Project you share does not need to contain any JARs inside, as it used to be with ant based projects.

    What should my directory structure look like? Folders like src, bin,
    anything else?

    As in a standard maven project 🙂 (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html)

    • src/main/java application sources (Java classes)
    • src/test/java application tests (unit test for class com.company.Foo
      should be also in the com.company package, it introduces some order
      and sometimes makes testing easier)
    • src/main/resources application resources, for example message.properties file serving internationalization
    • src/test/resources resources for tests, for example dumps of websites if you would like to do integration tests with http server returning some content.

    There are also other directories, such as src/main/webapp – all of them are described in the maven docs.

    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?

    Maven takes care about all of these things, following your configuration defined in pom.xml file. If you program requires some extra-libraries, maven will download it for you, and place in the package containing your application. If, for example some dependencies will be provided by your application server (log4j JAR), you can also set that dependency is gonna be provided and then, it will be available for running application, for unit tests, but it will not be places in the final package.

    What is additional great feature provided by maven is build profiles. You can for example use some setting in the day-to-day development mode, but in case of building package for production, other settings will be used.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to loop through a bunch of documents I have to put
I'm making a simple page using Google Maps API 3. My first. One marker
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.