Found an automated build system called Buildr which is reasonably
simple to use (uses Ruby, not XML), and handles builds in a
declarative manner via a build file (Ruby like). Since Buildr has no
Visage support someone with a reasonable amount of Ruby experience
will need to extend it. What I like about Buildr is that it does
things in a similar way to Visage (without the ugly XML) which fits in
nicely despite using a different language (Ruby).
Buildr could be a good way to easily automate the building of a Visage
project for all developers without doing builds manually (no one
should ever be in this position). Interested in finding out what other
people think of Buildr, and if possible their experiences with using
it on some other projects.
I like the idea that SBT can build a project that is written in
multiple languages (seems to be restricted to Scala and Java). A few
Visage projects contain some Java code which would benefit from SBT if
it can be adapted (is it flexible?).
The biggest downside to SBT is its complexity where lots of different
operators are being used, which could mean anything and is not very
readable (it is just like Regular Expressions). A user is forced to
learn way too many operators which is rediculous. Also the examples
show an excessive amount of nesting (more difficult to troubleshoot).
Buildr certainly has an advantage over SBT with simplicity even though
Ruby is not as close to Visage as Scala is.
=================================================
require 'buildr/visage'
define 'hello-visage' do
project.version = '0.1'
compile.with Dir['lib/*.jar']
manifest['Main-Class'] = 'org.example.Hello'
package :jar
end
=================================================
As you can see above the build file is short and simple. Although
Buildr doesn't have Visage support yet if it did then the first line
would be needed so that Buildr knows it is dealing with a Visage
project. After the first line a block is defined for the "hello-
visage" project. In the block the project version is set, and it is
packaged as a JAR file.
With project dependencies any JARs that are in the lib directory (in
the project's directory) are picked up. The "Main-Class" property is
set for the manifest. Visage source files are placed in src/main/
visage (in the project's directory), but that will only work once
Buildr has support for Visage. Calling the buildr command from the
command line (using the project's directory as the working directory)
will produce a file called hello-visage-0.1.jar in the target
directory (in the project's directory).
How would a SBT script compare to the Buildr build file shown above?
I wonder what Steve Chin's plans are for versioning with Visage, and
if he look through the files providing the Visage support for Buildr.
There may be other stuff that is missing/needs to be fixed for the
Visage support. For your convenience I also have a Visage distribution
file called Visage SDK (03 Dec 2011).7z at the following URL -
http://sites.google.com/site/napperley/visage-files.