• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Java Project Generator

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I create a new project, I often start by creating the following folder/file structure:


This is a bit of a pain, and I would like to automate it. It wouldn't be too difficult to write a shell script that can basically do this, but I was wondering if I could save some time by using an existing script that is robust, mature, and tested.

I know that a lot of tools like Eclipse can do something like this for you automatically, but I work on a lot of projects that don't use Eclipse (or some similar IDE).

Any help would be greatly appreciated. Thanks in advance for the help!

Tom Purl
 
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is exactly the problem that I have been attempting to solve over the last few weeks. The problem with your solution is that you have unnecessary duplication - that is, if you find a mistake in build.xml, you must update the file for each project.

The optimal solution involves an independent expression of project dependencies. That is, you'd express that your project is a "jar" project - and therefore, requires the resources to "build" a jar, etc. These resources would be resolved by the dependency manager. The problem with that is there are no decent tools out there for expression of dependency. The best I've found is Ivy by Jayasoft, but that is quite inflexible in terms of the different types of dependencies - for example, I write DocBook articles that depend on the DocBook DTD and DocBook XSL for "building" (transforming into presentation formats). There are other problems with Ivy that have caused me to abandon it.

I keep all project dependencies in a SCM repository (Subversion). There are some great articles that answer the question "should I keep dependencies in SCM or on the file system?". I confidentally conclude the former (in fact, I don't see the point of using the file system for non-static content much anymore).

I believe that this problem should be solved in a manner that is as flawless as possible, otherwise, what's the point of bothering about it? I have concluded that the only reasonable way to solve this issue is to write a decent (emphasis: flexible) project dependency manager. This, of course, costs time. Until that time comes around, I've merely conceded to what you suggest yourself - cringing every time I have to use it.

Good luck whatever you choose.
 
I've never won anything before. Not even a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic