Dependency towards Servlet API
See original GitHub issueWe have a provided dependency towards
<!-- Provided dependencies -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api.version}</version>
<scope>provided</scope>
</dependency>
which is only used on the SimpleRobotRulesParserTest
for http status constants:
-
int SC_MOVED_PERMANENTLY = 301;
-
int SC_SERVICE_UNAVAILABLE = 503;
-
int SC_OK = 200;
We have two options:
- (a) Drop the dependency and replace the constants by some custom static constants for t he unit test
- (b) Move it to
test
scope instead ofprovided
.
Any thoughts?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Maven dependency for Servlet 3.0 API? - java
I'd prefer to only add the Servlet API as dependency, but "Brabster" may be right that separate dependencies have been replaced by Java...
Read more >javax.servlet » servlet-api
Java Servlet is the foundation web specification in the Java Enterprise Platform. Developers can build web applications using the Servlet API to interact ......
Read more >javax.servlet-api : 4.0.1 - Maven Central Repository Search
Java Servlet API. ... Introducing the new look of The Central Repository, designed to address ... Source code, https://github.com/javaee/servlet-spec.
Read more >Get HttpServletRequest via Maven repository
Solution. To use HttpServletRequest or HttpServletResponse in a development environment, include servlet-api. jar in your Maven pom.
Read more >Servlet Support - Project Dependencies - Apache Tiles
Dependency File Details ; commons-digester-2.0.jar, 148.8 kB, 119 ; servlet-api-2.5.jar, 105.1 kB, 68 ; junit-4.7.jar, 232.4 kB, 261 ; shale-test- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am also fine using constants from the JDK 😃 - but we don’t need a dependency for just three constants , imho 😬 - so I am also (a)
I’d be in favour of doing (a).