Menu

#1571 Dependency collisions

Latest SVN
closed
None
1
2014-10-01
2014-01-28
No

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.

1 Attachments

Related

Bugs: #1571

Discussion

  • Andrew Pennebaker

    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?

     
  • Ahmed Ashour

    Ahmed Ashour - 2014-01-28

    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.

     
    • Andrew Pennebaker

      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:

      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.

      Status: pending

      Created: Tue Jan 28, 2014 06:03 PM UTC by Andrew Pennebaker
      Last Updated: Tue Jan 28, 2014 06:05 PM UTC
      Owner: nobody

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


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/htmlunit/bugs/1571/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      Cheers,

      Andrew Pennebaker
      apennebaker@42six.com

       

      Related

      Bugs: #1571

  • Ahmed Ashour

    Ahmed Ashour - 2014-01-28
    • status: open --> pending
     
  • Ahmed Ashour

    Ahmed Ashour - 2014-01-29
    • status: pending --> wont-fix
    • assigned_to: Ahmed Ashour
     
  • Ahmed Ashour

    Ahmed Ashour - 2014-01-29

    HttpClient 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.

     
    • Andrew Pennebaker

      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:

      HttpClient 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.


      Status: wont-fix

      Created: Tue Jan 28, 2014 06:03 PM UTC by Andrew Pennebaker
      Last Updated: Tue Jan 28, 2014 08:52 PM UTC
      Owner: Ahmed Ashour

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


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/htmlunit/bugs/1571/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      Cheers,

      Andrew Pennebaker
      apennebaker@42six.com

       

      Related

      Bugs: #1571

  • Ahmed Ashour

    Ahmed Ashour - 2014-01-29

    I believe you have a mis-configured environment/pom.

    Please send your complete project, so we can see your error.

     
    • Andrew Pennebaker

      Error details:

      If I try to use htmlunit's WebClient, mvn compile complains of missing
      SchemeSocket classes.

      Mitigation:

      By manually adding an httpclient dependency, the compile error goes away.

      pom.xml:

      ...
            <dependencies>
              <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>
                  <exclusion>
                    <groupId>org.eclipse.jetty.orbit</groupId>
                    <artifactId>javax.servlet</artifactId>
                  </exclusion>
                </exclusions>
              </dependency>
              <!-- Fix htmlunit dependency error -->
              <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.3.1</version>
              </dependency>
              <dependency>
                <groupId>org.eclipse.jetty.aggregate</groupId>
                <artifactId>jetty-all</artifactId>
                <version>${jetty.version}</version>
                <scope>test</scope>
              </dependency>
              <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.11</version>
                <scope>test</scope>
              </dependency>
            </dependencies>
      ...
      

      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
  • Ahmed Ashour

    Ahmed Ashour - 2014-01-29

    I politely request that httpclient be included in htmlunit's own pom.xml,

    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"

     
    • Andrew Pennebaker

      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:

      I politely request that httpclient be included in htmlunit's own pom.xml,

      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"


      Status: wont-fix

      Created: Tue Jan 28, 2014 06:03 PM UTC by Andrew Pennebaker
      Last Updated: Wed Jan 29, 2014 04:36 PM UTC
      Owner: Ahmed Ashour

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


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/htmlunit/bugs/1571/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      Cheers,

      Andrew Pennebaker
      apennebaker@42six.com

       

      Related

      Bugs: #1571

  • Ahmed Ashour

    Ahmed Ashour - 2014-01-29

    attached is a project, 'mvn clean compile' works.

     
  • Ahmed Ashour

    Ahmed Ashour - 2014-01-29
    • status: wont-fix --> pending
     
  • RBRi

    RBRi - 2014-04-05

    Andrew, any news? Can we close this?

     
  • RBRi

    RBRi - 2014-04-20

    No response, will close this.

     
  • RBRi

    RBRi - 2014-04-20
    • status: pending --> closed
     

Log in to post a comment.