vendredi 6 mars 2015

Gradle, War, tomcat and manifest

I'm trying to run a war file how it's provided in documentation. I do:



$ ./gradlew -Pprod war
$ java -jar ./build/libs/jhipster-0.1-SNAPSHOT.war --spring.profiles.active=prod
no main manifest attribute, in ./build/libs/jhipster-0.1-SNAPSHOT.war


When I add Main-Class atribute to the war block:



war {
baseName = 'jhipster'
version = '0.1-SNAPSHOT'
manifest {
attributes 'Main-Class': 'com.jhipster.web.Application'
}
}


I get "Error: Could not find or load main class com.jhipster.web.Application"


It is said in spring-boot gradle plugin documentation http://ift.tt/1wXV4dg that it should find the Application class with main() method but somehow MANIFEST.MF contains only one line:



Manifest-Version: 1.0


What I do wrong?


Aucun commentaire:

Enregistrer un commentaire