I use htmlunit and jetty, but htmlunit's jetty version conflicts with my own. In my project, I substitute httpclient instead:
<dependency> <groupId>net.sourceforge.htmlunit</groupId> <artifactId>htmlunit</artifactId> <version>2.13</version> <exclusions> <exclusion> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-websocket</artifactId> </exclusion> </exclusions> </dependency> <!-- Fix htmlunit dependency error --> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.3.1</version> </dependency>
In the future, could htmlunit use the httpclient package instead of jetty-websocket? Then htmlunit would integrate more easily with other projects.
Crap, turns out it's not a substitution. Whether or not I exclude jetty-websocket, htmlunit still lacks the needed httpclient package. Could we please fix htmlunit's pom to include this?
I am not sure I understand the issue.
jetty and httpclient are two different packages, and they shouldn't conflict with each other.
What error you get, and what code you use that shows that conflict.
I misspoke. It's not that the two packages collide with one another, it's
that httpclient appears to be a necessary package when using htmlunit's
WebClient. If I remove httpclient as a dependency for my htmlunit user
code, Maven complains of missing network classes.
On Tue, Jan 28, 2014 at 3:52 PM, Ahmed Ashour asashour@users.sf.net wrote:
--
Cheers,
Andrew Pennebaker
apennebaker@42six.com
Related
Bugs:
#1571HttpClient is mandatory for HtmlUnit to work, and it is currently updated to latest 4.3.2 version, and is not meant to be used with with previous 4.2.x
I am not sure why you directly use HttpClient classes, but you need to upgrade your code accordingly.
I don't use HttpClient directly. I use htmlunit's WebClient class, which
needs HttpClient to work. (However, htmlunit's pom fails to include this
dependency.)
On Wed, Jan 29, 2014 at 1:46 AM, Ahmed Ashour asashour@users.sf.net wrote:
--
Cheers,
Andrew Pennebaker
apennebaker@42six.com
Related
Bugs:
#1571I believe you have a mis-configured environment/pom.
Please send your complete project, so we can see your error.
Error details:
If I try to use htmlunit's WebClient,
mvn compile
complains of missingSchemeSocket classes.
Mitigation:
By manually adding an httpclient dependency, the compile error goes away.
pom.xml:
I politely request that httpclient be included in htmlunit's own pom.xml,
to fix the dependency issue.
Last edit: Ahmed Ashour 2014-01-29
HtmlUnit 2.13 pom.xml already includes httpclient 4.3.1, you can check :)
Please provide the jetty version you use, and what is the full class name of "SchemeSocket classes"
No problem!
<jetty.version>7.6.14.v20131031</jetty.version>
org.apache.http.conn.scheme.Scheme
On Wed, Jan 29, 2014 at 1:14 PM, Ahmed Ashour asashour@users.sf.net wrote:
--
Cheers,
Andrew Pennebaker
apennebaker@42six.com
Related
Bugs:
#1571attached is a project, 'mvn clean compile' works.
Andrew, any news? Can we close this?
No response, will close this.