Не получается запустить jar-файл. “no main manifest attribute” или "Could not find or load main class com.pkg.NewJFrame"

Содержание Manifest.mf:

Manifest-Version: 1.0
Created-By: Apache Maven 3.3.9
Built-By: Peps
Build-Jdk: 14
Main-Class: com.pkg.NewJFrame

Содержание pom:

<?xml version="1.0" encoding="UTF-8"?>

-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">

<modelVersion>4.0.0</modelVersion>

<groupId>com.mycompany</groupId>

<artifactId>mavenproject4</artifactId>

<version>1.0-SNAPSHOT</version>

<packaging>jar</packaging>


-<properties>

   <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

     <maven.compiler.source>14</maven.compiler.source>

       <maven.compiler.target>14</maven.compiler.target>

         <manifest.file> manifest.mf </manifest.file>

</properties>

-

-<plugins>


   -<plugin>

      <!-- Build an executable JAR -->    

        <groupId>org.apache.maven.plugins</groupId>

           <artifactId>maven-jar-plugin</artifactId>

           <version>3.1.0</version>    

          -<configuration>    

            -<archive>    

              -<manifest>

                   <addClasspath>true</addClasspath>

                   <classpathPrefix>lib/</classpathPrefix>

                   <mainClass>com.pkg.NewJFrame</mainClass>

              </manifest>

            </archive>

          </configuration>

       </plugin>

    </plugins>

</build>


Ответы (0 шт):