You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by karanjeets <gi...@git.apache.org> on 2016/03/27 08:24:10 UTC

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

GitHub user karanjeets opened a pull request:

    https://github.com/apache/nutch/pull/100

    fix for NUTCH-2191 contributed by karanjeets

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/karanjeets/nutch NUTCH-2191

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nutch/pull/100.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #100
    
----
commit fa33472297aca6a6468461bb6945225c93590d6d
Author: Karanjeet Singh <co...@gmail.com>
Date:   2016-03-27T06:21:28Z

    fix for NUTCH-2191 contributed by karanjeets

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57676308
  
    --- Diff: src/plugin/lib-htmlunit/src/java/org/apache/nutch/protocol/htmlunit/HtmlUnitWebWindowListener.java ---
    @@ -0,0 +1,37 @@
    +package org.apache.nutch.protocol.htmlunit;
    --- End diff --
    
    License header required


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by chrismattmann <gi...@git.apache.org>.
Github user chrismattmann commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57533181
  
    --- Diff: src/plugin/lib-htmlunit/ivy.xml ---
    @@ -0,0 +1,52 @@
    +<?xml version="1.0" ?>
    +
    +<!--
    +   Licensed to the Apache Software Foundation (ASF) under one or more
    +   contributor license agreements.  See the NOTICE file distributed with
    +   this work for additional information regarding copyright ownership.
    +   The ASF licenses this file to You under the Apache License, Version 2.0
    +   (the "License"); you may not use this file except in compliance with
    +   the License.  You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +-->
    +
    +<ivy-module version="1.0">
    +  <info organisation="org.apache.nutch" module="${ant.project.name}">
    +    <license name="Apache 2.0"/>
    +    <ivyauthor name="Apache Nutch Team" url="http://nutch.apache.org"/>
    +    <description>
    +        Apache Nutch
    +    </description>
    +  </info>
    +
    +  <configurations>
    +    <include file="../../../ivy/ivy-configurations.xml"/>
    +  </configurations>
    +
    +  <publications>
    +    <!--get the artifact from our module name-->
    +    <artifact conf="master"/>
    +  </publications>
    +
    +  <dependencies>
    +    <!-- begin selenium dependencies -->
    +    <dependency org="org.seleniumhq.selenium" name="selenium-java" rev="2.44.0" />
    --- End diff --
    
    yeah for now I am +1 to move forward with this, but we noticed here in HtmlUnit b/c it needs a specific version of Selenium.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by chrismattmann <gi...@git.apache.org>.
Github user chrismattmann commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57533406
  
    --- Diff: src/plugin/lib-htmlunit/ivy.xml ---
    @@ -0,0 +1,52 @@
    +<?xml version="1.0" ?>
    +
    +<!--
    +   Licensed to the Apache Software Foundation (ASF) under one or more
    +   contributor license agreements.  See the NOTICE file distributed with
    +   this work for additional information regarding copyright ownership.
    +   The ASF licenses this file to You under the Apache License, Version 2.0
    +   (the "License"); you may not use this file except in compliance with
    +   the License.  You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +-->
    +
    +<ivy-module version="1.0">
    +  <info organisation="org.apache.nutch" module="${ant.project.name}">
    +    <license name="Apache 2.0"/>
    +    <ivyauthor name="Apache Nutch Team" url="http://nutch.apache.org"/>
    +    <description>
    +        Apache Nutch
    +    </description>
    +  </info>
    +
    +  <configurations>
    +    <include file="../../../ivy/ivy-configurations.xml"/>
    +  </configurations>
    +
    +  <publications>
    +    <!--get the artifact from our module name-->
    +    <artifact conf="master"/>
    +  </publications>
    +
    +  <dependencies>
    +    <!-- begin selenium dependencies -->
    +    <dependency org="org.seleniumhq.selenium" name="selenium-java" rev="2.44.0" />
    --- End diff --
    
    ACK


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nutch/pull/100


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57676390
  
    --- Diff: src/plugin/protocol-htmlunit/src/java/org/apache/nutch/protocol/htmlunit/HttpResponse.java ---
    @@ -0,0 +1,351 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + * <p/>
    + * http://www.apache.org/licenses/LICENSE-2.0
    + * <p/>
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.nutch.protocol.htmlunit;
    +
    +import java.io.BufferedInputStream;
    +import java.io.ByteArrayOutputStream;
    +import java.io.EOFException;
    +import java.io.IOException;
    +import java.io.OutputStream;
    +import java.io.PushbackInputStream;
    +import java.net.InetSocketAddress;
    +import java.net.Socket;
    +import java.net.URL;
    +
    +import org.apache.hadoop.conf.Configuration;
    +import org.apache.nutch.crawl.CrawlDatum;
    +import org.apache.nutch.metadata.Metadata;
    +import org.apache.nutch.metadata.SpellCheckedMetadata;
    +import org.apache.nutch.net.protocols.HttpDateFormat;
    +import org.apache.nutch.net.protocols.Response;
    +import org.apache.nutch.protocol.ProtocolException;
    +import org.apache.nutch.protocol.http.api.HttpBase;
    +import org.apache.nutch.protocol.http.api.HttpException;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +/**
    + * An HTTP response.
    + *
    + */
    +public class HttpResponse implements Response {
    +
    +  private static final Logger LOG = LoggerFactory.getLogger(HttpResponse.class);
    +
    +  private Http http;
    +  private URL url;
    +  private byte[] content;
    +  private int code;
    +  private Metadata headers = new SpellCheckedMetadata();
    +
    +  /** The nutch configuration */
    +  private Configuration conf = null;
    +
    +  public HttpResponse(Http http, URL url, CrawlDatum datum) throws ProtocolException, IOException {
    +
    +    this.conf = http.getConf();
    +    this.http = http;
    +    this.url = url;
    +
    +    LOG.info("fetching " + url);
    --- End diff --
    
    Please use slf4j convention e.g. {}


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57533415
  
    --- Diff: src/plugin/lib-htmlunit/ivy.xml ---
    @@ -0,0 +1,52 @@
    +<?xml version="1.0" ?>
    +
    +<!--
    +   Licensed to the Apache Software Foundation (ASF) under one or more
    +   contributor license agreements.  See the NOTICE file distributed with
    +   this work for additional information regarding copyright ownership.
    +   The ASF licenses this file to You under the Apache License, Version 2.0
    +   (the "License"); you may not use this file except in compliance with
    +   the License.  You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +-->
    +
    +<ivy-module version="1.0">
    +  <info organisation="org.apache.nutch" module="${ant.project.name}">
    +    <license name="Apache 2.0"/>
    +    <ivyauthor name="Apache Nutch Team" url="http://nutch.apache.org"/>
    +    <description>
    +        Apache Nutch
    +    </description>
    +  </info>
    +
    +  <configurations>
    +    <include file="../../../ivy/ivy-configurations.xml"/>
    +  </configurations>
    +
    +  <publications>
    +    <!--get the artifact from our module name-->
    +    <artifact conf="master"/>
    +  </publications>
    +
    +  <dependencies>
    +    <!-- begin selenium dependencies -->
    +    <dependency org="org.seleniumhq.selenium" name="selenium-java" rev="2.44.0" />
    --- End diff --
    
    Sorted


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57533729
  
    --- Diff: src/plugin/lib-htmlunit/ivy.xml ---
    @@ -0,0 +1,52 @@
    +<?xml version="1.0" ?>
    +
    +<!--
    +   Licensed to the Apache Software Foundation (ASF) under one or more
    +   contributor license agreements.  See the NOTICE file distributed with
    +   this work for additional information regarding copyright ownership.
    +   The ASF licenses this file to You under the Apache License, Version 2.0
    +   (the "License"); you may not use this file except in compliance with
    +   the License.  You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +-->
    +
    +<ivy-module version="1.0">
    +  <info organisation="org.apache.nutch" module="${ant.project.name}">
    +    <license name="Apache 2.0"/>
    +    <ivyauthor name="Apache Nutch Team" url="http://nutch.apache.org"/>
    +    <description>
    +        Apache Nutch
    +    </description>
    +  </info>
    +
    +  <configurations>
    +    <include file="../../../ivy/ivy-configurations.xml"/>
    +  </configurations>
    +
    +  <publications>
    +    <!--get the artifact from our module name-->
    +    <artifact conf="master"/>
    +  </publications>
    +
    +  <dependencies>
    +    <!-- begin selenium dependencies -->
    +    <dependency org="org.seleniumhq.selenium" name="selenium-java" rev="2.44.0" />
    --- End diff --
    
    This sounds good


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by chrismattmann <gi...@git.apache.org>.
Github user chrismattmann commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57533407
  
    --- Diff: src/plugin/lib-htmlunit/ivy.xml ---
    @@ -0,0 +1,52 @@
    +<?xml version="1.0" ?>
    +
    +<!--
    +   Licensed to the Apache Software Foundation (ASF) under one or more
    +   contributor license agreements.  See the NOTICE file distributed with
    +   this work for additional information regarding copyright ownership.
    +   The ASF licenses this file to You under the Apache License, Version 2.0
    +   (the "License"); you may not use this file except in compliance with
    +   the License.  You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +-->
    +
    +<ivy-module version="1.0">
    +  <info organisation="org.apache.nutch" module="${ant.project.name}">
    +    <license name="Apache 2.0"/>
    +    <ivyauthor name="Apache Nutch Team" url="http://nutch.apache.org"/>
    +    <description>
    +        Apache Nutch
    +    </description>
    +  </info>
    +
    +  <configurations>
    +    <include file="../../../ivy/ivy-configurations.xml"/>
    +  </configurations>
    +
    +  <publications>
    +    <!--get the artifact from our module name-->
    +    <artifact conf="master"/>
    +  </publications>
    +
    +  <dependencies>
    +    <!-- begin selenium dependencies -->
    +    <dependency org="org.seleniumhq.selenium" name="selenium-java" rev="2.44.0" />
    --- End diff --
    
    dusted


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57676159
  
    --- Diff: default.properties ---
    @@ -90,6 +90,7 @@ plugins.protocol=\
        org.apache.nutch.protocol.http*:\
        org.apache.nutch.protocol.httpclient*:\
        org.apache.nutch.protocol.selenium*
    --- End diff --
    
    should be
    ```org.apache.nutch.protocol.selenium* ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by karanjeets <gi...@git.apache.org>.
Github user karanjeets commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57533636
  
    --- Diff: src/plugin/lib-htmlunit/ivy.xml ---
    @@ -0,0 +1,52 @@
    +<?xml version="1.0" ?>
    +
    +<!--
    +   Licensed to the Apache Software Foundation (ASF) under one or more
    +   contributor license agreements.  See the NOTICE file distributed with
    +   this work for additional information regarding copyright ownership.
    +   The ASF licenses this file to You under the Apache License, Version 2.0
    +   (the "License"); you may not use this file except in compliance with
    +   the License.  You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +-->
    +
    +<ivy-module version="1.0">
    +  <info organisation="org.apache.nutch" module="${ant.project.name}">
    +    <license name="Apache 2.0"/>
    +    <ivyauthor name="Apache Nutch Team" url="http://nutch.apache.org"/>
    +    <description>
    +        Apache Nutch
    +    </description>
    +  </info>
    +
    +  <configurations>
    +    <include file="../../../ivy/ivy-configurations.xml"/>
    +  </configurations>
    +
    +  <publications>
    +    <!--get the artifact from our module name-->
    +    <artifact conf="master"/>
    +  </publications>
    +
    +  <dependencies>
    +    <!-- begin selenium dependencies -->
    +    <dependency org="org.seleniumhq.selenium" name="selenium-java" rev="2.44.0" />
    --- End diff --
    
    @chrismattmann Thanks.
    
    @lewismc - So, for now, I will keep it the same way as it is and later when we downgrade selenium across the board, we will reference selenium in lib-htmlunit from lib-selenium plugin? Can you please confirm if that's the plan?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57676350
  
    --- Diff: src/plugin/protocol-htmlunit/src/java/org/apache/nutch/protocol/htmlunit/Http.java ---
    @@ -0,0 +1,67 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.nutch.protocol.htmlunit;
    +
    +import java.io.IOException;
    +import java.net.URL;
    +
    +import org.apache.hadoop.conf.Configuration;
    +
    +import org.apache.nutch.crawl.CrawlDatum;
    +import org.apache.nutch.net.protocols.Response;
    +import org.apache.nutch.protocol.ProtocolException;
    +import org.apache.nutch.protocol.http.api.HttpBase;
    +import org.apache.nutch.util.NutchConfiguration;
    +
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +/**
    + *
    --- End diff --
    
    Javadoc absent


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by karanjeets <gi...@git.apache.org>.
Github user karanjeets commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57677200
  
    --- Diff: conf/nutch-default.xml ---
    @@ -1874,6 +1874,72 @@ visit https://wiki.apache.org/nutch/SimilarityScoringFilter-->
       </description>
     </property>
     
    +
    +<!-- lib-htmlunit plugin properties; applies to protocol-htmlunit -->
    +
    +<property>
    +  <name>htmlunit.page.load.delay</name>
    --- End diff --
    
    I can share them but that would mean changing the name of properties defined for selenium which is in short affecting the selenium code as well. Are we okay with that?
    
    Currently, all properties in nutch-default.xml has "selenium" prefix and hence the change is required.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57676441
  
    --- Diff: src/plugin/protocol-htmlunit/src/java/org/apache/nutch/protocol/htmlunit/package.html ---
    @@ -0,0 +1,5 @@
    +<html>
    --- End diff --
    
    License header


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57533329
  
    --- Diff: src/plugin/lib-htmlunit/ivy.xml ---
    @@ -0,0 +1,52 @@
    +<?xml version="1.0" ?>
    +
    +<!--
    +   Licensed to the Apache Software Foundation (ASF) under one or more
    +   contributor license agreements.  See the NOTICE file distributed with
    +   this work for additional information regarding copyright ownership.
    +   The ASF licenses this file to You under the Apache License, Version 2.0
    +   (the "License"); you may not use this file except in compliance with
    +   the License.  You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +-->
    +
    +<ivy-module version="1.0">
    +  <info organisation="org.apache.nutch" module="${ant.project.name}">
    +    <license name="Apache 2.0"/>
    +    <ivyauthor name="Apache Nutch Team" url="http://nutch.apache.org"/>
    +    <description>
    +        Apache Nutch
    +    </description>
    +  </info>
    +
    +  <configurations>
    +    <include file="../../../ivy/ivy-configurations.xml"/>
    +  </configurations>
    +
    +  <publications>
    +    <!--get the artifact from our module name-->
    +    <artifact conf="master"/>
    +  </publications>
    +
    +  <dependencies>
    +    <!-- begin selenium dependencies -->
    +    <dependency org="org.seleniumhq.selenium" name="selenium-java" rev="2.44.0" />
    --- End diff --
    
    Downgrade of Selenium across the board? wdyt? I would be favorable to having consistency... 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57676377
  
    --- Diff: src/plugin/protocol-htmlunit/src/java/org/apache/nutch/protocol/htmlunit/HttpResponse.java ---
    @@ -0,0 +1,351 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + * <p/>
    + * http://www.apache.org/licenses/LICENSE-2.0
    + * <p/>
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.nutch.protocol.htmlunit;
    +
    +import java.io.BufferedInputStream;
    +import java.io.ByteArrayOutputStream;
    +import java.io.EOFException;
    +import java.io.IOException;
    +import java.io.OutputStream;
    +import java.io.PushbackInputStream;
    +import java.net.InetSocketAddress;
    +import java.net.Socket;
    +import java.net.URL;
    +
    +import org.apache.hadoop.conf.Configuration;
    +import org.apache.nutch.crawl.CrawlDatum;
    +import org.apache.nutch.metadata.Metadata;
    +import org.apache.nutch.metadata.SpellCheckedMetadata;
    +import org.apache.nutch.net.protocols.HttpDateFormat;
    +import org.apache.nutch.net.protocols.Response;
    +import org.apache.nutch.protocol.ProtocolException;
    +import org.apache.nutch.protocol.http.api.HttpBase;
    +import org.apache.nutch.protocol.http.api.HttpException;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +/**
    + * An HTTP response.
    --- End diff --
    
    Javadoc needs to be augmented or removed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by karanjeets <gi...@git.apache.org>.
Github user karanjeets commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57677254
  
    --- Diff: default.properties ---
    @@ -90,6 +90,7 @@ plugins.protocol=\
        org.apache.nutch.protocol.http*:\
        org.apache.nutch.protocol.httpclient*:\
        org.apache.nutch.protocol.selenium*
    --- End diff --
    
    Didn't change it. But yes, ACK. I will make the same amendment for htmlunit.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57677326
  
    --- Diff: conf/nutch-default.xml ---
    @@ -1874,6 +1874,72 @@ visit https://wiki.apache.org/nutch/SimilarityScoringFilter-->
       </description>
     </property>
     
    +
    +<!-- lib-htmlunit plugin properties; applies to protocol-htmlunit -->
    +
    +<property>
    +  <name>htmlunit.page.load.delay</name>
    --- End diff --
    
    Agreed, however it is not a huge deal. I suspect that not many people are using the Selenium plugin properties via the Java API artifacts, hence a trivial name change to share the properties would save us some ~100 lines within nutch-default.xml. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57676323
  
    --- Diff: src/plugin/protocol-htmlunit/build.xml ---
    @@ -0,0 +1,53 @@
    +<?xml version="1.0"?>
    +<!--
    + Licensed to the Apache Software Foundation (ASF) under one or more
    + contributor license agreements.  See the NOTICE file distributed with
    + this work for additional information regarding copyright ownership.
    + The ASF licenses this file to You under the Apache License, Version 2.0
    + (the "License"); you may not use this file except in compliance with
    + the License.  You may obtain a copy of the License at
    +
    +     http://www.apache.org/licenses/LICENSE-2.0
    +
    + Unless required by applicable law or agreed to in writing, software
    + distributed under the License is distributed on an "AS IS" BASIS,
    + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + See the License for the specific language governing permissions and
    + limitations under the License.
    +-->
    +<project name="protocol-htmlunit" default="jar-core">
    +
    +  <import file="../build-plugin.xml"/>
    +
    +  <!-- Build compilation dependencies -->
    +  <target name="deps-jar">
    +    <ant target="jar" inheritall="false" dir="../lib-http"/>
    +    <ant target="jar" inheritall="false" dir="../lib-htmlunit"/>
    +  </target>
    +
    +  <!-- Add compilation dependencies to classpath -->
    +  <path id="plugin.deps">
    +    <fileset dir="${nutch.root}/build">
    +      <include name="**/lib-http/*.jar" />
    +      <include name="**/lib-htmlunit/*.jar" />
    +    </fileset>
    +    <pathelement location="${build.dir}/test/conf"/>
    +  </path>
    +
    +  <!-- Deploy Unit test dependencies -->
    +  <target name="deps-test">
    +    <ant target="deploy" inheritall="false" dir="../lib-http"/>
    +    <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>
    +    <copy toDir="${build.test}">
    +      <fileset dir="${src.test}" excludes="**/*.java"/>
    +    </copy>
    +  </target>
    +
    +  <!-- for junit test -->
    --- End diff --
    
    Remove if not used


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57531367
  
    --- Diff: src/plugin/lib-htmlunit/ivy.xml ---
    @@ -0,0 +1,52 @@
    +<?xml version="1.0" ?>
    +
    +<!--
    +   Licensed to the Apache Software Foundation (ASF) under one or more
    +   contributor license agreements.  See the NOTICE file distributed with
    +   this work for additional information regarding copyright ownership.
    +   The ASF licenses this file to You under the Apache License, Version 2.0
    +   (the "License"); you may not use this file except in compliance with
    +   the License.  You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +-->
    +
    +<ivy-module version="1.0">
    +  <info organisation="org.apache.nutch" module="${ant.project.name}">
    +    <license name="Apache 2.0"/>
    +    <ivyauthor name="Apache Nutch Team" url="http://nutch.apache.org"/>
    +    <description>
    +        Apache Nutch
    +    </description>
    +  </info>
    +
    +  <configurations>
    +    <include file="../../../ivy/ivy-configurations.xml"/>
    +  </configurations>
    +
    +  <publications>
    +    <!--get the artifact from our module name-->
    +    <artifact conf="master"/>
    +  </publications>
    +
    +  <dependencies>
    +    <!-- begin selenium dependencies -->
    +    <dependency org="org.seleniumhq.selenium" name="selenium-java" rev="2.44.0" />
    --- End diff --
    
    Are the dependencies here not also included in lib-selenium? IF so, then is it possible for one plugin to rely upon the other?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by karanjeets <gi...@git.apache.org>.
Github user karanjeets commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57690436
  
    --- Diff: conf/nutch-default.xml ---
    @@ -1874,6 +1874,72 @@ visit https://wiki.apache.org/nutch/SimilarityScoringFilter-->
       </description>
     </property>
     
    +
    +<!-- lib-htmlunit plugin properties; applies to protocol-htmlunit -->
    +
    +<property>
    +  <name>htmlunit.page.load.delay</name>
    --- End diff --
    
    Among all, only 3 properties are shared between selenium and htmlunit. They are:
    
    1. page.load.delay
    2. take.screenshot
    3. screenshot.location
    
    Changes are updated in PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57676142
  
    --- Diff: conf/nutch-default.xml ---
    @@ -1874,6 +1874,72 @@ visit https://wiki.apache.org/nutch/SimilarityScoringFilter-->
       </description>
     </property>
     
    +
    +<!-- lib-htmlunit plugin properties; applies to protocol-htmlunit -->
    +
    +<property>
    +  <name>htmlunit.page.load.delay</name>
    --- End diff --
    
    These properties are near duplicate. I would suggest that we consider sharing the properties as duplicating them seems a bit too much.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57533018
  
    --- Diff: src/plugin/lib-htmlunit/ivy.xml ---
    @@ -0,0 +1,52 @@
    +<?xml version="1.0" ?>
    +
    +<!--
    +   Licensed to the Apache Software Foundation (ASF) under one or more
    +   contributor license agreements.  See the NOTICE file distributed with
    +   this work for additional information regarding copyright ownership.
    +   The ASF licenses this file to You under the Apache License, Version 2.0
    +   (the "License"); you may not use this file except in compliance with
    +   the License.  You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +-->
    +
    +<ivy-module version="1.0">
    +  <info organisation="org.apache.nutch" module="${ant.project.name}">
    +    <license name="Apache 2.0"/>
    +    <ivyauthor name="Apache Nutch Team" url="http://nutch.apache.org"/>
    +    <description>
    +        Apache Nutch
    +    </description>
    +  </info>
    +
    +  <configurations>
    +    <include file="../../../ivy/ivy-configurations.xml"/>
    +  </configurations>
    +
    +  <publications>
    +    <!--get the artifact from our module name-->
    +    <artifact conf="master"/>
    +  </publications>
    +
    +  <dependencies>
    +    <!-- begin selenium dependencies -->
    +    <dependency org="org.seleniumhq.selenium" name="selenium-java" rev="2.44.0" />
    --- End diff --
    
    OK so this is... bad. It means that we have a direct, incompatible dependency conflict which needs to be resolved.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request: fix for NUTCH-2191 contributed by karanjeets

Posted by karanjeets <gi...@git.apache.org>.
Github user karanjeets commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/100#discussion_r57532913
  
    --- Diff: src/plugin/lib-htmlunit/ivy.xml ---
    @@ -0,0 +1,52 @@
    +<?xml version="1.0" ?>
    +
    +<!--
    +   Licensed to the Apache Software Foundation (ASF) under one or more
    +   contributor license agreements.  See the NOTICE file distributed with
    +   this work for additional information regarding copyright ownership.
    +   The ASF licenses this file to You under the Apache License, Version 2.0
    +   (the "License"); you may not use this file except in compliance with
    +   the License.  You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +-->
    +
    +<ivy-module version="1.0">
    +  <info organisation="org.apache.nutch" module="${ant.project.name}">
    +    <license name="Apache 2.0"/>
    +    <ivyauthor name="Apache Nutch Team" url="http://nutch.apache.org"/>
    +    <description>
    +        Apache Nutch
    +    </description>
    +  </info>
    +
    +  <configurations>
    +    <include file="../../../ivy/ivy-configurations.xml"/>
    +  </configurations>
    +
    +  <publications>
    +    <!--get the artifact from our module name-->
    +    <artifact conf="master"/>
    +  </publications>
    +
    +  <dependencies>
    +    <!-- begin selenium dependencies -->
    +    <dependency org="org.seleniumhq.selenium" name="selenium-java" rev="2.44.0" />
    --- End diff --
    
    @lewismc - It would have been possible if lib-selenium was on 2.44.0. As per my experiments and research done with HtmlUnit, we run into compatibility issues if we use selenium 2.48.2. Hence, I used this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---