Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#19: remove unneeded dependency on javax.servlet:servlet-api #20

Merged

Conversation

stellingsimon
Copy link
Contributor

Fix for #19

@benfortuna
Copy link
Member

benfortuna commented Jan 18, 2018

I think this dependency is included because the jackrabbit-webdav library requires it (but doesn't specify it as an explicit dependency). So I think it needs to be a compile-time dependency as references to jackrabbit-webdav classes fail (can see this in the build for this PR).

/home/travis/build/ical4j/ical4j-connector/src/main/java/net/fortuna/ical4j/connector/dav/AbstractDavObjectCollection.java:343: error: cannot access HttpServletResponse
        else if (getMethod.getStatusCode() == DavServletResponse.SC_OK) {

@codecov
Copy link

codecov bot commented Jan 18, 2018

Codecov Report

Merging #20 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             develop     #20   +/-   ##
=========================================
  Coverage       1.88%   1.88%           
  Complexity         5       5           
=========================================
  Files             44      44           
  Lines           1861    1861           
  Branches         255     255           
=========================================
  Hits              35      35           
  Misses          1826    1826

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 041df03...5ff54c8. Read the comment docs.

@stellingsimon
Copy link
Contributor Author

You're right. I tested this only in a setting where there was another jar file on the classpath, that's why it worked for me.

I updated the PR to include the correct fix: instead of a compile dependency, which also implicitly includes a runtime dependency, it should be a compileOnly dependency, as explained here:

https://blog.gradle.org/introducing-compile-only-dependencies

This way, the library is compiled fine and users are free to use whatever dependency that satisfies the servlet-api at runtime.

Thanks for your effort!

@benfortuna benfortuna merged commit 4108142 into ical4j:develop Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants