out of my head comes 'megg' a sort of pre-project helper tool.
coming to sourceforge soon (well as soon as they approve it)
Here is an example of the (current) usage, note that the subdirectory
called 'foo' didn't exist before these commands, i.e. a completely blank
slate.
j6wbs@justyce:~/projects> java -jar ~/megg.jar
templateDirectory : java
domainName : com.javanicus
projectName : foo
mainClassName : Bar
generate:
[apply] Generating 4 file(s)
j6wbs@justyce:~/projects> find foo
foo
foo/src
foo/src/manifest.txt
foo/src/com
foo/src/com/javanicus
foo/src/com/javanicus/foo
foo/src/com/javanicus/foo/test
foo/src/com/javanicus/foo/test/BarTest.java
foo/src/com/javanicus/foo/Bar.java
foo/build.xml
j6wbs@justyce:~/projects> cd foo
j6wbs@justyce:~/projects/foo> ant
Buildfile: build.xml
init:
javac:
[mkdir] Created dir: /home/j6wbs/projects/foo/build
[mkdir] Created dir: /home/j6wbs/projects/foo/lib
[javac] Compiling 2 source files to /home/j6wbs/projects/foo/build
run:
[java] foo
BUILD SUCCESSFUL
|
Before you say, 'Code Generation is so last year', agreed, but I always start my little subprojects with the same step, so wanted a more efficient way to get to that starting point.
Hopefully, once in sourceforge, people could help me refine the java template, and add others (e.g. ruby/webapps etc), sort of like a 'HelloWorld' repository.
P.S. it is all powered by velocity