question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dependency towards Servlet API

See original GitHub issue

We 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 of provided.

Any thoughts?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rzo1commented, Feb 22, 2022

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)

1reaction
jniochecommented, Feb 22, 2022

I’d be in favour of doing (a).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found