I'm building a java application using Eclipse/Maven but keep getting a "no main manifest attribute, in xxx.jar" error message when I try to run the compiled jar. I've been through (or at least think I have so won't take offence if asked to try something in that thread again) everything in this Can't execute jar- file: "no main manifest attribute" thread. The main thing that matches is that my MANIFEST.MF doesn't contain any class information leading me to think that there's a problem with my pom.xml or some settings in Eclipse (Mars2). My pom.xml is below
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.EmbeddedPi</groupId>
<artifactId>udpServerLED</artifactId>
<version>0.0.1</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<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>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>udpServerLED.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
and the main gist of the main source file is
package udpServerLED;
public class Main {
public Main () {}
}
Full code can be seen at https://github.com/EmbeddedPi/udpServerLED
My gut feeling is that I've committed some newbie syntax faux pas in setting up the project framework but I just can't see it. My amateur attempts at writing software have up until now been aided by posts on here so thought I'd actually register to directly ask this.