Move tools folder into test folder

- Classes still won't be present in JAR but classes will be automatically compiled by Maven inside of the test scope, facilitating the execution of tool tasks
This commit is contained in:
ljacqu 2016-05-03 20:24:34 +02:00
parent 23317caa46
commit 3645806edc
46 changed files with 69 additions and 64 deletions

View File

@ -0,0 +1,6 @@
# About the _tools_ Folder
This _tools_ folder provides helpers and extended tests useful during the development of AuthMe.
This folder is not included during the build of AuthMe and does not contain unit tests.
Run the `ToolsRunner` class to perform a task.

View File

@ -1,5 +1,7 @@
import utils.ToolTask;
import utils.ToolsConstants;
package tools;
import tools.utils.ToolTask;
import tools.utils.ToolsConstants;
import java.io.File;
import java.lang.reflect.Constructor;
@ -108,7 +110,7 @@ public final class ToolsRunner {
}
String filePath = file.getPath();
String className = filePath
String className = "tools." + filePath
.substring(ToolsConstants.TOOLS_SOURCE_ROOT.length(), filePath.length() - 5)
.replace(File.separator, ".");
try {

View File

@ -1,15 +1,15 @@
package commands;
package tools.commands;
import fr.xephi.authme.command.CommandArgumentDescription;
import fr.xephi.authme.command.CommandDescription;
import fr.xephi.authme.command.CommandPermissions;
import fr.xephi.authme.command.CommandUtils;
import fr.xephi.authme.permission.PermissionNode;
import utils.FileUtils;
import utils.TagValue.NestedTagValue;
import utils.TagValueHolder;
import utils.ToolTask;
import utils.ToolsConstants;
import tools.utils.FileUtils;
import tools.utils.TagValue.NestedTagValue;
import tools.utils.TagValueHolder;
import tools.utils.ToolTask;
import tools.utils.ToolsConstants;
import java.util.Collection;
import java.util.HashSet;

View File

@ -1,10 +1,10 @@
package docs;
package tools.docs;
import com.google.common.collect.ImmutableSet;
import commands.CommandPageCreater;
import hashmethods.HashAlgorithmsDescriptionTask;
import permissions.PermissionsListWriter;
import utils.ToolTask;
import tools.commands.CommandPageCreater;
import tools.hashmethods.HashAlgorithmsDescriptionTask;
import tools.permissions.PermissionsListWriter;
import tools.utils.ToolTask;
import java.util.Scanner;
import java.util.Set;

View File

@ -1,4 +1,4 @@
package hashmethods;
package tools.hashmethods;
import fr.xephi.authme.security.HashAlgorithm;
import fr.xephi.authme.security.crypts.EncryptionMethod;

View File

@ -1,11 +1,11 @@
package hashmethods;
package tools.hashmethods;
import fr.xephi.authme.security.HashAlgorithm;
import utils.FileUtils;
import utils.TagValue.NestedTagValue;
import utils.TagValueHolder;
import utils.ToolTask;
import utils.ToolsConstants;
import tools.utils.FileUtils;
import tools.utils.TagValue.NestedTagValue;
import tools.utils.TagValueHolder;
import tools.utils.ToolTask;
import tools.utils.ToolsConstants;
import java.util.Map;
import java.util.Scanner;

View File

@ -1,4 +1,4 @@
package hashmethods;
package tools.hashmethods;
import fr.xephi.authme.security.crypts.EncryptionMethod;
import fr.xephi.authme.security.crypts.description.SaltType;

View File

@ -1,4 +1,4 @@
package messages;
package tools.messages;
import com.google.common.base.Predicate;
import com.google.common.collect.HashMultimap;
@ -8,7 +8,7 @@ import fr.xephi.authme.output.MessageKey;
import fr.xephi.authme.util.StringUtils;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import utils.FileUtils;
import tools.utils.FileUtils;
import java.io.File;
import java.util.ArrayList;

View File

@ -1,11 +1,11 @@
package messages;
package tools.messages;
import com.google.common.collect.Multimap;
import fr.xephi.authme.util.StringUtils;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import utils.ToolTask;
import utils.ToolsConstants;
import tools.utils.ToolTask;
import tools.utils.ToolsConstants;
import java.io.File;
import java.util.ArrayList;

View File

@ -1,4 +1,4 @@
package messages.translation;
package tools.messages.translation;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;

View File

@ -1,4 +1,4 @@
package messages.translation;
package tools.messages.translation;
import com.google.common.io.CharStreams;
import com.google.gson.Gson;
@ -6,8 +6,8 @@ import fr.xephi.authme.output.MessageKey;
import fr.xephi.authme.util.StringUtils;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import utils.ToolTask;
import utils.ToolsConstants;
import tools.utils.ToolTask;
import tools.utils.ToolsConstants;
import java.io.File;
import java.io.IOException;

View File

@ -1,15 +1,15 @@
package messages.translation;
package tools.messages.translation;
import com.google.common.io.Resources;
import com.google.gson.Gson;
import fr.xephi.authme.output.MessageKey;
import messages.MessageFileVerifier;
import messages.VerifyMessagesTask;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import utils.FileUtils;
import utils.ToolTask;
import utils.ToolsConstants;
import tools.messages.MessageFileVerifier;
import tools.messages.VerifyMessagesTask;
import tools.utils.FileUtils;
import tools.utils.ToolTask;
import tools.utils.ToolsConstants;
import java.io.File;
import java.io.IOException;

View File

@ -1,4 +1,4 @@
package messages.translation;
package tools.messages.translation;
import java.util.Collections;
import java.util.List;

View File

@ -1,4 +1,4 @@
package messages.translation;
package tools.messages.translation;
import fr.xephi.authme.util.StringUtils;

View File

@ -1,9 +1,9 @@
package messages.translation;
package tools.messages.translation;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import utils.FileUtils;
import utils.ToolsConstants;
import tools.utils.FileUtils;
import tools.utils.ToolsConstants;
import java.io.File;
import java.util.Scanner;

View File

@ -1,11 +1,11 @@
package permissions;
package tools.permissions;
import fr.xephi.authme.permission.AdminPermission;
import fr.xephi.authme.permission.PermissionNode;
import fr.xephi.authme.permission.PlayerPermission;
import fr.xephi.authme.permission.PlayerStatePermission;
import utils.FileUtils;
import utils.ToolsConstants;
import tools.utils.FileUtils;
import tools.utils.ToolsConstants;
import java.util.EnumSet;
import java.util.HashMap;

View File

@ -1,10 +1,10 @@
package permissions;
package tools.permissions;
import utils.FileUtils;
import utils.TagValue.NestedTagValue;
import utils.TagValueHolder;
import utils.ToolTask;
import utils.ToolsConstants;
import tools.utils.FileUtils;
import tools.utils.TagValue.NestedTagValue;
import tools.utils.TagValueHolder;
import tools.utils.ToolTask;
import tools.utils.ToolsConstants;
import java.util.Map;
import java.util.Scanner;

View File

@ -1,4 +1,4 @@
package utils;
package tools.utils;
import java.io.IOException;
import java.nio.charset.Charset;

View File

@ -1,7 +1,7 @@
package utils;
package tools.utils;
import utils.TagValue.NestedTagValue;
import utils.TagValue.TextTagValue;
import tools.utils.TagValue.NestedTagValue;
import tools.utils.TagValue.TextTagValue;
import java.util.Date;
import java.util.Map;

View File

@ -1,4 +1,4 @@
package utils;
package tools.utils;
import java.util.ArrayList;
import java.util.List;

View File

@ -1,6 +1,6 @@
package utils;
package tools.utils;
import utils.TagValue.TextTagValue;
import tools.utils.TagValue.TextTagValue;
import java.util.HashMap;
import java.util.Map;

View File

@ -1,4 +1,4 @@
package utils;
package tools.utils;
import java.util.Scanner;

View File

@ -1,4 +1,4 @@
package utils;
package tools.utils;
/**
* Constants for the src/tools folder.
@ -12,7 +12,7 @@ public final class ToolsConstants {
public static final String MAIN_RESOURCES_ROOT = "src/main/resources/";
public static final String TOOLS_SOURCE_ROOT = "src/tools/";
public static final String TOOLS_SOURCE_ROOT = "src/test/java/tools/";
public static final String DOCS_FOLDER = "docs/";

View File

@ -1,3 +0,0 @@
# About src/tools
This _tools_ folder provides helpers and extended tests useful during the development of AuthMe.
This folder is not included during the build of AuthMe.