<commit_before>#!/usr/bin/env perl

use Cwd qw(abs_path);
use File::Basename qw(dirname);

# include script functions
use vars qw(
	$PREFIX
	$TESTS
);
$TESTS = 1;
$PREFIX = abs_path(dirname($0));
require($PREFIX . "/functions.pl");

if (not defined $GIT) {
	exit 1;
}

clean_git() unless (exists $ENV{'SKIP_CLEAN'});

my @command = ($MVN, '-Dmaven.test.skip.exec=true', '-N', 'install');
info("running:", @command);
handle_errors_and_exit_on_failure(system(@command));

my @other_args = ();
for my $module (@ARGS) {
	if ($module =~ /^-/) {
		push(@other_args, $module);
		next;
	}

	my $moduledir = $PREFIX . "/" . $module;
	if (-d $moduledir) {
		my $deps = get_dependencies($module);
	
		my %realdeps = ('org.opennms:opennms' => 1);
	
		for my $project (keys %$deps) {
			debug("project = $project");
			for my $dep (@{$deps->{$project}}) {
				debug("dep = $dep");
				$realdeps{$dep}++;
			}
		}

		chdir($PREFIX);

		if ($module =~ /assembl/) {
			my @command = ($MVN, '-Dmaven.test.skip.exec=true', @other_args, 'install');
			info("running:", @command);
			handle_errors_and_exit_on_failure(system(@command));
			chdir($PREFIX . "/opennms-full-assembly");
			my @command = ($MVN, '-Dmaven.test.skip.exec=true', @other_args, 'install');
			info("running:", @command);
			handle_errors_and_exit_on_failure(system(@command));
		} else {
			my @command = ($MVN, '--projects', join(',', sort(keys(%realdeps))), '-Dmaven.test.skip.exec=true', @other_args, 'install');
			info("running:", @command);
			handle_errors_and_exit_on_failure(system(@command));
		}

		chdir($moduledir);
		my @command = ($MVN, @other_args, 'install');
		info("running:", @command);
		handle_errors_and_exit_on_failure(system(@command));
	} else {
		error("directory $module does not exist in $PREFIX!");
		exit 1;
	}
}

exit 0;
<commit_msg>just build everything<commit_after>#!/usr/bin/env perl

use Cwd qw(abs_path);
use File::Basename qw(dirname);

# include script functions
use vars qw(
	$PREFIX
	$TESTS
);
$TESTS = 1;
$PREFIX = abs_path(dirname($0));
require($PREFIX . "/functions.pl");

if (not defined $GIT) {
	exit 1;
}

clean_git() unless (exists $ENV{'SKIP_CLEAN'});

my @command = ($MVN, '-Dmaven.test.skip.exec=true', 'install');
info("running:", @command);
handle_errors_and_exit_on_failure(system(@command));

my @other_args = ();
for my $module (@ARGS) {
	if ($module =~ /^-/) {
		push(@other_args, $module);
		next;
	}

	my $moduledir = $PREFIX . "/" . $module;
	if (-d $moduledir) {
		chdir($moduledir);
		my @command = ($MVN, @other_args, 'install');
		info("running:", @command);
		handle_errors_and_exit_on_failure(system(@command));
	} else {
		error("directory $module does not exist in $PREFIX!");
		exit 1;
	}
}

exit 0;

{'fraction_non_alphanumeric': 0.20345207491737055, 'fraction_numerical': 0.004039662137348513, 'mean_word_length': 4.663201663201663, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5122330', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1022, 'n_words': 219}