<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
<mainClass>com.likekey.telegram.TelegramBotApplication</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
mvn dependency:copy-dependencies
java -cp TelegramBotSend-1.0-SNAPSHOT.jar:dependency TelegramBotApplication
Error: Could not find or load main class TelegramBotApplication
Caused by: java.lang.ClassNotFoundException: TelegramBotApplication
public class MessageHandler implements Runnable {
private static volatile UserService userService = new UserServiceImpl();
private MessageFromJson message;
public MessageHandler(MessageFromJson message) {
this.message = message;
}
private static void parseMessage(MessageFromJson message) throws Exception {
int vkId = message.getFromId();
String[] args = message.getText().split(" ");
String command = args[0].toLowerCase();
userService.checkUserInDB(vkId);
User user = userService.getUser(vkId, false);
String place = user.getPlace();
switch (command) {
case "начать":
new StartCommand(vkId).run();
break;
case "профиль":
// Входит в switch, command по идее должен быть равен "профиль", но что-то идет не так
new ProfileCommand(vkId).run();
break;
case "баланс":
new BalanceCommand(vkId).run();
break;
...
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java (default-cli) on project NewVkBot: An exception occured while executing the Java class. Application.class -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java (default-cli) on project NewVkBot: An exception occured while executing the Java class. Application.class -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException