java - Gretty: Duplicate fragment name: org_apache_jasper -


i use gretty run dev server , webapp-runner deployment heroku.

the following gradle.build:

buildscript {     repositories {         jcenter()     }      dependencies {         classpath 'org.akhikhl.gretty:gretty:+'     } }  apply plugin: 'java' apply plugin: 'war' apply plugin: 'eclipse-wtp' apply plugin: 'idea' apply plugin: 'org.akhikhl.gretty'  repositories {     mavenlocal()     mavencentral() }  dependencies {     compile 'org.springframework:spring-webmvc:4.3.10.release'     compile 'org.springframework:spring-orm:4.3.10.release'     compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.0'     compile group: 'org.hibernate', name: 'hibernate-core', version: '5.2.10.final'     compile group: 'org.apache.commons', name: 'commons-dbcp2', version: '2.1.1'     compile group: 'mysql', name: 'mysql-connector-java', version: '6.0.6'     compile group: 'org.hibernate.validator', name: 'hibernate-validator', version: '6.0.1.final'     compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.0'     compile group: 'org.postgresql', name: 'postgresql', version: '42.1.4'      compile 'com.github.jsimone:webapp-runner:8.5.11.3'  }  gretty {     httpport = 8080     servletcontainer = 'jetty9'     contextpath = '/' }  eclipse {     wtp {         component {             contextpath = '/'         }     } }  ///////// tasks deployment heroku  task stage() {     dependson clean, war } war.mustrunafter clean  task copytolib(type: copy) {     dependson war     "$builddir/server"     from(configurations.compile) {         include "webapp-runner*"     } }  stage.dependson(copytolib) 

if remove webapp-runner runs fine, following error when trying start gretty:

java.lang.illegalstateexception: duplicate fragment name: org_apache_jasper jar

not expert figure fact both gretty , webapp-runner download similar files , that's causing clash?

would appreciate info on this. how past this? there better way have dev server + able deploy heroku? (maybe use webapp-runner both?)

i recommend running locally same way heroku runs app, these commands:

$ ./gradlew stage $ heroku local web 

if want use gretty development, you'll need exclude webapp-runner dev build (maybe stagedev task), , exclude gretty stage build.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -