KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I created scala application and now I want to build jar. I run mvn package than I try to run jar by command java -jar target/burner-1.0-SNAPSHOT.jar and I see error: Failed to load Main-Class manifest attribute from How can I define Main-Class property? Do I need to create Manifest.mf? where? Or I need to have mainclass property somewhere in pom.xml? Update: I have created src/main/resources/MANIFEST.MF file with contents Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: itsabear Main-Class: ru.dmteam.App Build-Jdk: 1.6.0_20 I did not forget line ending at the end of file. after mvn package I see new jar. I checked manifest.mf in this jar - it contains right main-class but when I type java -jar target/burner-1.0-SNAPSHOT.jar I still see an error Failed to load Main-Class manifest attribute from My pom.xml http://pastie.org/1070483 UPDATE 2 I discovered that now there are two manifest.mf files in the jar. MANIFEST.MF and META-INF/MANIFEST.MF I moved my custom MANIFEST.MF to just created META-INF folder(in src/main/resources) but now mvn package overrides it while creating jar...
Tags (comma-separated)
Save Edits
Cancel