0

I can not execute a jar file from terminal due to the 'no main manifest attribute in JAR file' error. I have added a reference to the class with the main method within the 'pom.xml', however it is not detected when I try to execute the file.

This is my POM file:

<build>
<plugins>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
            <archive>
                <manifest>
                        <addClasspath>true</addClasspath>
                        <mainClass>com.countrymapper.CountryMapperApplication</mainClass>
                </manifest>
                </archive>
        </configuration>
    </plugin>
</plugins>
</build>
  • possible duplicate of https://stackoverflow.com/questions/9689793/cant-execute-jar-file-no-main-manifest-attribute – Lokesh Pandey Oct 24 '17 at 06:46
  • Possible duplicate of [Can't execute jar- file: "no main manifest attribute"](https://stackoverflow.com/questions/9689793/cant-execute-jar-file-no-main-manifest-attribute) – Naman Oct 24 '17 at 06:48

0 Answers0