Java::Build::GenericBuild

Java::Build::GenericBuild is a high level driver to control Java builds.
Download

Java::Build::GenericBuild Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Java::Build::GenericBuild team
  • Publisher web site:
  • http://search.cpan.org/~philcrow/Java-Build-0.05/Build/GenericBuild.pm

Java::Build::GenericBuild Tags


Java::Build::GenericBuild Description

Java::Build::GenericBuild is a high level driver to control Java builds. Java::Build::GenericBuild is a high level driver to control Java builds.SYNOPSISThere are two (or more) code files needed to effectively use this module. First, create a subclass of this class: package Java::Build::MyBuild; use Carp; # Do the following in a BEGIN block before the use base statement: BEGIN { $ENV{CLASSPATH} .= ":/path/to/sun's/lib/tools.jar"; } use base 'Java::Build::GenericBuild'; # use any other Java::Build modules you need my @args = ( { BUILD_SUCCESS => sub { croak "You must supply a BUILD_SUCCESS" } }, { CONFIG_LOC => sub { croak "You must supply a CONFIG_LOC" } }, { MAIN_DIR => &_form_main_dir }, # ... ); # Include all the attributes that matter to your build here, and # what to do if the caller omits them. # If they are required, die in the subroutine, otherwise provide a # subroutine reference which will fill in the default sub new { my $class = shift; my $self = shift; $self->{ATTRIBUTES} = @attrs; process_attrs($self); return bless $self, $class; } # Include common targets callers can share here. Put unique targets # in the calling scripts (see below). sub init { my $self = shift; ... } sub cvs_refresh { my $self = shift; ... } sub compile { ... } # ... sub _form_main_dir { my $self = shift; $self->{MAIN_DIR} = '/usr/src'; }In some script: #!/usr/bin/perl use strict; use warnings; use Java::Build::MyBuild; my $project = Java::Build::MyBuild->new( BUILD_SUCCESS => '/where/this/module/can/store/build/state.info', CONFIG_LOC => '/some/path/to/my.conf', NAME => 'MyApplication', SRC_DIR => '/where/my/java/files/live', SUBPROJECTS => , ); $project->targets(qw( init cvs_refresh unique compile )); $project->GO(@ARGV); package Java::Build::MyBuild; # re-enter the build package to add targets sub unique {...} # a routine that MyBuild doesn't provide Requirements: · Perl


Java::Build::GenericBuild Related Software