I am using maven assembly plug in to package my project with all its dependency so i can run a simple java -jar myproject.jar and be able to run the project. However when I ran the jar it told me
Error: Could not find or load main class com.project.ServerStart
Then I unzipped the .jar file and found that the assembly does not include my project files, which is ridiculous !
When packaging the project I receive this warning
[WARNING] Cannot include project artifact: Amjar:amjar:pom:0.2; it doesn't have an associated file or directory.
This is my plugin config
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<finalName>amjar-${project.version}</finalName>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.project.ServerStart</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>assemble-all</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
What am I doing wrong ?