java - Exclude javax.servlet package from com.google.gwt dependency on pom.xml -
i use vaadin 7, , vaadin have default package javax.servlet
, need com.google.gwt
in dependencies contains javax.servlet
. when run application got error :
severe: allocate exception servlet vaadin application servlet java.lang.classcastexception: com.vaadin.server.vaadinservlet cannot cast javax.servlet.servlet
now want exclude javax.servlet dependency, , here tried far :
<dependency> <groupid>com.google.gwt</groupid> <artifactid>gwt-user</artifactid> <version>2.6.1</version> <exclusions> <exclusion> <!-- declare exclusion here --> <groupid>javax.servlet</groupid> <artifactid>servlet-api</artifactid> </exclusion> </exclusions> </dependency>
and :
<build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-shade-plugin</artifactid> <version>2.3</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <filters> <filter> <minimizejar>true</minimizejar> <artifact>com.google.gwt:gwt-user</artifact> <includes> <include>com/google/**</include> </includes> <excludes> <exclude>javax/servlet/**</exclude> <exclude>javax/servlet/http/**</exclude> <exclude>javax/servlet/resources/**</exclude> </excludes> </filter> </filters> </configuration> </execution> </executions> </plugin> <plugin>
but both didn't work !. help!
i think want gwt-servlet
dependency rather gwt-user
.
that said, don't know vaadin; maybe there's com.vaadin
dependency contains gwt classes?
Comments
Post a Comment