There is a project with the following build options:
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <outputDirectory>${basedir}</outputDirectory> <finalName>supermega</finalName> <appendAssemblyId>false</appendAssemblyId> <archive> <manifest> <mainClass>main.Main</mainClass> </manifest> </archive> </configuration> </plugin> </plugins> </build> When I build a project with IntelliJ Idea , clicking on Plugins->assembly->assembly:single , then everything is ok. But when I go to the project folder, enter the mvn assembly:single command, everything is fine, but when I try to start it, an error occurs:
Error: Could not find or load main class main.Main I can not understand in any way where the Main class disappears when building via the console.