maven - Use filter from test scope in web.xml -
i have project used base of operations number of different webapps. i'm trying run in "test" mode using jetty-maven plugin.
the project multi-module project. filter located in module, dependency of module i'm trying run, specified so:
class="lang-xml prettyprint-override"><dependency> <groupid>my.example.test</groupid> <artifactid>test</artifactid> <version>x.x.x</version> <scope>test</scope> </dependency>
the filter class dependency added filter in web.xml:
class="lang-xml prettyprint-override"><filter> <filter-name>test</filter-name> <filter-class>my.example.test.test.testfilter</filter-class> </filter> <filter-mapping> <filter-name>test</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
finally, project started via phone call jetty-maven plugin (mvn jetty:run-forked
) set this:
<plugin> <groupid>org.eclipse.jetty</groupid> <artifactid>jetty-maven-plugin</artifactid> <version>9.2.2.v20140723</version> <configuration> <webapp> <contextpath>/test</contextpath> <descriptor>src/test/webapp/web-inf/web.xml</descriptor> </webapp> <usetestscope>true</usetestscope> <jvmargs>some arguments</jvmargs> <jettyxml>jetty.xml,jetty-ssl.xml,jetty-https.xml</jettyxml> <stopkey>stopjetty</stopkey> <stopport>12345</stopport> </configuration> </plugin>
the project runs , displays index.html file, filter never applied request. possible run test-scope app way have set up? else missing?
if server started, without error, filter there.
perhaps add together logging filter init()
or dofilter()
verify got run.
also, if using javax.websocket
, http/1.1 websocket upgrade requests not filterable.
maven jetty maven-jetty-plugin
No comments:
Post a Comment