You are my last hope. I wrote little bot for telegram. And it's works perfect but i cant build it as an executable jar file. Each time i try to execute jar file at my server i get error:
Error: Could not find or load main class com.praetorian19.MainIni
I understood that i mentioned class path in wrong way. I try mention it in different ways but it's doesn't matter. Error is the same. Please look my MVN project xml and several screenshots from Idea project structure. I think i have an error in pom or in structure.
I try to wrote classpath in many ways. But result the same I try to build jar at both platforms - Win/Lin, the same
Pom:
<modelVersion>4.0.0</modelVersion>
<groupId>praetorian19</groupId>
<artifactId>praetorian19</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.telegram/telegrambots -->
<dependency>
<groupId>org.telegram</groupId>
<artifactId>telegrambots</artifactId>
<version>4.4.0.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.12.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.12.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-jcl -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jcl</artifactId>
<version>2.12.1</version>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<archive>
<manifest>
<mainClass>
com.praetorian19.MainInit
</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Error: Could not find or load main class com.praetorian19.MainInit while i try to execute jar at server
Also i try
praetorian19.MainInit
But result the same