Updated dependencies.
This commit is contained in:
parent
2c1602f331
commit
e1685ba706
8 changed files with 151 additions and 140 deletions
|
@ -1,128 +1,129 @@
|
|||
/*
|
||||
* This file is automatically generated by the Semantic Version Annotation Processor.
|
||||
* Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
* This file is automatically generated.
|
||||
* Do not modify! -- ALL CHANGES WILL BE ERASED!
|
||||
*/
|
||||
package net.thauvin.erik.mobibot;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* This class provides semantic version information.
|
||||
* Provides semantic version information.
|
||||
*
|
||||
* @author Semantic Version Annotation Processor
|
||||
* @author <a href="https://github.com/ethauvin/semver">Semantic Version
|
||||
* Annotation Processor</a>
|
||||
*/
|
||||
public final class ReleaseInfo {
|
||||
private final static String buildmeta = "002";
|
||||
private final static Date date = new Date(1453769004642L);
|
||||
private final static String buildmeta = "003";
|
||||
private final static Date date = new Date(1454706693276L);
|
||||
private final static int major = 0;
|
||||
private final static int minor = 6;
|
||||
private final static int patch = 1;
|
||||
private final static String prerelease = "beta";
|
||||
private final static String project = "mobibot";
|
||||
|
||||
/**
|
||||
* Returns the build date.
|
||||
*
|
||||
* @return The build date.
|
||||
*/
|
||||
public static Date getBuildDate() {
|
||||
return date;
|
||||
}
|
||||
/**
|
||||
* Disables the default constructor.
|
||||
*
|
||||
* @throws UnsupportedOperationException If the constructor is called.
|
||||
*/
|
||||
private ReleaseInfo()
|
||||
throws UnsupportedOperationException {
|
||||
throw new UnsupportedOperationException("Illegal constructor call.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the full version string.
|
||||
* <p>
|
||||
* Formatted as:
|
||||
* <blockquote>
|
||||
* <code>MAJOR.MINOR.PATCH[-PRERELEASE][+BUILDMETADATA]</code>
|
||||
* </blockquote>
|
||||
* <p>
|
||||
* For example:
|
||||
* <ul>
|
||||
* <li><code>1.0.0</code></li>
|
||||
* <li><code>1.0.0-beta</code></li>
|
||||
* <li><code>1.0.0+20160124144700</code></li>
|
||||
* <li><code>1.0.0-alpha+001</code></li>
|
||||
* </ul>
|
||||
*
|
||||
* @return The version string.
|
||||
*/
|
||||
public static String getVersion() {
|
||||
return Integer.toString(getMajor()) + '.'
|
||||
+ Integer.toString(getMinor()) + '.'
|
||||
+ Integer.toString(getPatch())
|
||||
+ getPreRelease() + getBuildMetadata();
|
||||
}
|
||||
/**
|
||||
* Returns the build date.
|
||||
*
|
||||
* @return The build date.
|
||||
*/
|
||||
public static Date getBuildDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the major version.
|
||||
*
|
||||
* @return The major version.
|
||||
*/
|
||||
public static int getMajor() {
|
||||
return major;
|
||||
}
|
||||
/**
|
||||
* Returns the project name.
|
||||
*
|
||||
* @return The project name, if any.
|
||||
*/
|
||||
public static String getProject() {
|
||||
return project;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the minor version.
|
||||
*
|
||||
* @return The minor version.
|
||||
*/
|
||||
public static int getMinor() {
|
||||
return minor;
|
||||
}
|
||||
/**
|
||||
* Returns the full version string.
|
||||
* <p>
|
||||
* Formatted as:
|
||||
* <blockquote>
|
||||
* <code>MAJOR.MINOR.PATCH[-PRERELEASE][+BUILDMETADATA]</code>
|
||||
* </blockquote>
|
||||
* <p>
|
||||
* For example:
|
||||
* <ul>
|
||||
* <li><code>1.0.0</code></li>
|
||||
* <li><code>1.0.0-beta</code></li>
|
||||
* <li><code>1.0.0+20160124144700</code></li>
|
||||
* <li><code>1.0.0-alpha+001</code></li>
|
||||
* </ul>
|
||||
*
|
||||
* @return The version string.
|
||||
*/
|
||||
public static String getVersion() {
|
||||
return Integer.toString(getMajor()) + '.'
|
||||
+ Integer.toString(getMinor()) + '.'
|
||||
+ Integer.toString(getPatch())
|
||||
+ getPreRelease() + getBuildMetadata();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the patch version.
|
||||
*
|
||||
* @return The patch version.
|
||||
*/
|
||||
public static int getPatch() {
|
||||
return patch;
|
||||
}
|
||||
/**
|
||||
* Returns the major version.
|
||||
*
|
||||
* @return The major version.
|
||||
*/
|
||||
public static int getMajor() {
|
||||
return major;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the pre-release version.
|
||||
*
|
||||
* @return The pre-release version, if any.
|
||||
*/
|
||||
public static String getPreRelease() {
|
||||
if (prerelease.length() > 0) {
|
||||
return '-' + prerelease;
|
||||
}
|
||||
/**
|
||||
* Returns the minor version.
|
||||
*
|
||||
* @return The minor version.
|
||||
*/
|
||||
public static int getMinor() {
|
||||
return minor;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
/**
|
||||
* Returns the patch version.
|
||||
*
|
||||
* @return The patch version.
|
||||
*/
|
||||
public static int getPatch() {
|
||||
return patch;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the project name.
|
||||
*
|
||||
* @return The project name, if any.
|
||||
*/
|
||||
public static String getProject() {
|
||||
return project;
|
||||
}
|
||||
/**
|
||||
* Returns the pre-release version.
|
||||
*
|
||||
* @return The pre-release version, if any.
|
||||
*/
|
||||
public static String getPreRelease() {
|
||||
if (prerelease.length() > 0) {
|
||||
return '-' + prerelease;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the build metadata.
|
||||
*
|
||||
* @return The build metadata, if any.
|
||||
*/
|
||||
public static String getBuildMetadata() {
|
||||
if (buildmeta.length() > 0) {
|
||||
return '+' + buildmeta;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables the default constructor.
|
||||
*
|
||||
* @throws UnsupportedOperationException if the constructor is called.
|
||||
*/
|
||||
private ReleaseInfo()
|
||||
throws UnsupportedOperationException {
|
||||
throw new UnsupportedOperationException("Illegal constructor call.");
|
||||
}
|
||||
/**
|
||||
* Returns the build metadata.
|
||||
*
|
||||
* @return The build metadata, if any.
|
||||
*/
|
||||
public static String getBuildMetadata() {
|
||||
if (buildmeta.length() > 0) {
|
||||
return '+' + buildmeta;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
|
@ -31,11 +31,11 @@
|
|||
*/
|
||||
package net.thauvin.erik.mobibot;
|
||||
|
||||
import org.jdom.Document;
|
||||
import org.jdom.Element;
|
||||
import org.jdom.JDOMException;
|
||||
import org.jdom.Namespace;
|
||||
import org.jdom.input.SAXBuilder;
|
||||
import org.jdom2.Document;
|
||||
import org.jdom2.Element;
|
||||
import org.jdom2.JDOMException;
|
||||
import org.jdom2.Namespace;
|
||||
import org.jdom2.input.SAXBuilder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
package net.thauvin.erik.mobibot;
|
||||
|
||||
import org.apache.commons.net.WhoisClient;
|
||||
import org.apache.commons.net.whois.WhoisClient;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
|
@ -155,4 +155,4 @@ final class Lookup
|
|||
|
||||
return lines;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -394,13 +394,12 @@ public class Mobibot extends PircBot
|
|||
Commands.DEBUG_ARG,
|
||||
false,
|
||||
"print debug & logging data directly to the console");
|
||||
//noinspection AccessStaticViaInstance
|
||||
options.addOption(OptionBuilder.withArgName("file").hasArg().withDescription("use alternate properties file")
|
||||
.withLongOpt(Commands.PROPS_ARG).create(Commands.PROPS_ARG.substring(0, 1)));
|
||||
options.addOption(Option.builder(Commands.PROPS_ARG.substring(0, 1)).hasArg().argName("file")
|
||||
.desc("use alternate properties file").longOpt(Commands.PROPS_ARG).build());
|
||||
options.addOption(Commands.VERSION_ARG.substring(0, 1), Commands.VERSION_ARG, false, "print version info");
|
||||
|
||||
// Parse the command line
|
||||
final CommandLineParser parser = new PosixParser();
|
||||
final CommandLineParser parser = new DefaultParser();
|
||||
CommandLine line = null;
|
||||
|
||||
try
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue