Skip to content

Commit

Permalink
Merge branch 'master' into feature-separate-remote-poller
Browse files Browse the repository at this point in the history
  • Loading branch information
soleger committed Jun 12, 2014
2 parents 9d6441f + f76ce70 commit becc5b7
Show file tree
Hide file tree
Showing 734 changed files with 2,497 additions and 2,005 deletions.
32 changes: 27 additions & 5 deletions bin/functions.pl
Expand Up @@ -19,6 +19,7 @@
$HELP
$JAVA_HOME
@JAVA_SEARCH_DIRS
$LOGLEVEL
$MVN
$MAVEN_VERSION
$MAVEN_OPTS
Expand All @@ -33,6 +34,7 @@
$JAVA_HOME = undef;
$PATHSEP = $Config{'path_sep'};
$VERBOSE = undef;
$LOGLEVEL = 'debug' unless (defined $LOGLEVEL);
@ARGS = ();

@JAVA_SEARCH_DIRS = qw(
Expand All @@ -42,8 +44,11 @@
/Library/Java/JavaVirtualMachines
/Library/Java/Home
/opt
/opt/ci/java
);

push(@JAVA_SEARCH_DIRS, File::Spec->catdir($ENV{'HOME'}, 'ci', 'java'));

eval {
setpriority(0, 0, 10);
};
Expand Down Expand Up @@ -85,6 +90,7 @@
"profile|p=s" => \$BUILD_PROFILE,
"java-home|java|j=s" => \$JAVA_HOME,
"verbose|v" => \$VERBOSE,
"log-level|l=s" => \$LOGLEVEL,
);

if (not $result) {
Expand All @@ -108,11 +114,25 @@
(default: $MAVEN_OPTS)
-p/--profile PROFILE default, dir, full, or fulldir
-t/--enable-tests enable tests when building
-v/--verbose be more verbose
-l/--log-level log level (error/warning/info/debug)
END
exit 1;
}

if ($VERBOSE) {
$LOGLEVEL = 'debug';
}

if (not defined $LOGLEVEL or $LOGLEVEL eq '') {
$LOGLEVEL = 'info';
}

$LOGLEVEL = lc($LOGLEVEL);
if ($LOGLEVEL !~ /^(error|warning|info|debug)$/) {
print STDERR "Log level $LOGLEVEL invalid. Must be one of 'error', 'warning', 'info', or 'debug'.\n";
exit 1;
}

if ((defined $JAVA_HOME and -d $JAVA_HOME) or (exists $ENV{'JAVA_HOME'} and -d $ENV{'JAVA_HOME'})) {
if (not defined $JAVA_HOME or not -d $JAVA_HOME) {
$JAVA_HOME = $ENV{'JAVA_HOME'};
Expand All @@ -122,7 +142,9 @@ END
my $minimumversion = get_minimum_java();

if ($shortversion < $minimumversion) {
die "You specified a Java home of $JAVA_HOME, but it does not meet minimum java version $minimumversion!\n";
warning("You specified a Java home of $JAVA_HOME, but it does not meet minimum java version $minimumversion! Will try detecting instead.");
undef $JAVA_HOME;
delete $ENV{'JAVA_HOME'};
}
}

Expand Down Expand Up @@ -496,15 +518,15 @@ sub run_command {
}

sub debug {
print "[DEBUG] " . join(' ', @_) . "\n" if ($VERBOSE);
print "[DEBUG] " . join(' ', @_) . "\n" if ($LOGLEVEL eq 'debug');
}

sub warning {
print "[WARN] " . join(' ', @_) . "\n";
print "[WARN] " . join(' ', @_) . "\n" if ($LOGLEVEL =~ /^(debug|warning)$/);
}

sub info {
print "[INFO] " . join(' ', @_) . "\n";
print "[INFO] " . join(' ', @_) . "\n" if ($LOGLEVEL =~ /^(debug|warning|info)$/);
}

sub error {
Expand Down
18 changes: 18 additions & 0 deletions bin/javahome.pl
@@ -0,0 +1,18 @@
#!/usr/bin/env perl

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

# include script functions
use vars qw(
$LOGLEVEL
$PREFIX
);
$LOGLEVEL = 'error';
$PREFIX = abs_path(dirname($0));

require($PREFIX . "/functions.pl");

print STDOUT $JAVA_HOME, "\n";

exit 0;
4 changes: 2 additions & 2 deletions container/branding/pom.xml
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.opennms</groupId>
<artifactId>container</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>

<groupId>org.opennms.container</groupId>
Expand All @@ -28,7 +28,7 @@
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
<Bundle-SymbolicName>manual</Bundle-SymbolicName>
<Import-Package>*</Import-Package>
<Private-Package>!*</Private-Package>
Expand Down
2 changes: 1 addition & 1 deletion container/bridge/pom.xml
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.opennms</groupId>
<artifactId>container</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>

<groupId>org.opennms.container</groupId>
Expand Down
Expand Up @@ -95,7 +95,7 @@ public void include(ServletRequest req, ServletResponse res)
}
}

private final class RequestWrapper
private final static class RequestWrapper
extends HttpServletRequestWrapper
{
private final String requestUri;
Expand Down
2 changes: 1 addition & 1 deletion container/features/pom.xml
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.opennms</groupId>
<artifactId>container</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.opennms.karaf</groupId>
Expand Down
2 changes: 1 addition & 1 deletion container/karaf/pom.xml
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.opennms</groupId>
<artifactId>container</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>

<groupId>org.opennms.container</groupId>
Expand Down
2 changes: 1 addition & 1 deletion container/pom.xml
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.opennms</groupId>
<artifactId>opennms</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>container</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion container/servlet/pom.xml
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.opennms</groupId>
<artifactId>container</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>

<groupId>org.opennms.container</groupId>
Expand Down
2 changes: 1 addition & 1 deletion container/standalone/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.opennms</groupId>
<artifactId>container</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>
<groupId>org.opennms.container</groupId>
<artifactId>standalone</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion container/web/pom.xml
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.opennms</groupId>
<artifactId>container</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>

<groupId>org.opennms.container</groupId>
Expand Down
4 changes: 2 additions & 2 deletions core/api/pom.xml
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.opennms</groupId>
<artifactId>org.opennms.core</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.opennms.core</groupId>
Expand All @@ -18,7 +18,7 @@
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<Export-Package>org.opennms.core.config.api.*;version="${project.version}",org.opennms.core.network;version="${project.version}"</Export-Package>
Expand Down
Expand Up @@ -44,19 +44,19 @@
* Convenience class for generating a list of IP addresses from a file URL.
*/
public class IpListFromUrl {
private final static Logger LOG = LoggerFactory.getLogger(IpListFromUrl.class);
private static final Logger LOG = LoggerFactory.getLogger(IpListFromUrl.class);

/**
* The string indicating the start of the comments in a line containing the
* IP address in a file URL
*/
private final static String COMMENT_STR = " #";
private static final String COMMENT_STR = " #";

/**
* This character at the start of a line indicates a comment line in a URL
* file
*/
private final static char COMMENT_CHAR = '#';
private static final char COMMENT_CHAR = '#';

/**
* This method is used to read all interfaces from an URL file.
Expand Down
2 changes: 1 addition & 1 deletion core/build/keystore/pom.xml
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.opennms.core</groupId>
<artifactId>org.opennms.core.build</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.opennms.core.build</groupId>
Expand Down
2 changes: 1 addition & 1 deletion core/build/pom.xml
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.opennms</groupId>
<artifactId>org.opennms.core</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.opennms.core</groupId>
Expand Down
4 changes: 2 additions & 2 deletions core/camel/pom.xml
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.opennms</groupId>
<artifactId>org.opennms.core</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.opennms.core</groupId>
Expand All @@ -18,7 +18,7 @@
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<Export-Package>org.opennms.core.camel.*;version="${project.version}"</Export-Package>
Expand Down
4 changes: 2 additions & 2 deletions core/castor-properties/pom.xml
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.opennms</groupId>
<artifactId>org.opennms.core</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.opennms.core</groupId>
Expand All @@ -18,7 +18,7 @@
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<!-- Attach to the Castor bundle (name specified in features.xml) -->
Expand Down
4 changes: 2 additions & 2 deletions core/config/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.opennms</groupId>
<artifactId>org.opennms.core</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.opennms.core</groupId>
Expand All @@ -19,7 +19,7 @@
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<Export-Package>org.opennms.core.config.impl.*;version="${project.version}"</Export-Package>
Expand Down
4 changes: 2 additions & 2 deletions core/criteria/pom.xml
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.opennms</groupId>
<artifactId>org.opennms.core</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.opennms.core</groupId>
Expand Down Expand Up @@ -33,7 +33,7 @@
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<Export-Package>org.opennms.core.criteria,org.opennms.core.criteria.restrictions;version="${project.version}"</Export-Package>
Expand Down
4 changes: 2 additions & 2 deletions core/daemon/pom.xml
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.opennms</groupId>
<artifactId>org.opennms.core</artifactId>
<version>1.13.3-SNAPSHOT</version>
<version>1.13.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.opennms.core</groupId>
Expand All @@ -21,7 +21,7 @@
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<Export-Package>org.opennms.netmgt.daemon.*;org.opennms.netmgt.vmmgr.*;version="${project.version}"</Export-Package>
Expand Down

0 comments on commit becc5b7

Please sign in to comment.