[ 
https://issues.apache.org/jira/browse/NUTCH-3130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18116957#comment-18116957
 ] 

ASF GitHub Bot commented on NUTCH-3130:
---------------------------------------

lewismc commented on PR #967:
URL: https://github.com/apache/nutch/pull/967#issuecomment-5739894518

   Follow-up after first CI runs...
   
   My commons-cli rewrite copied `OptionBuilder` method names onto 
Option.Builder. `hasOptionalArg()` and `hasArgs(2)` do not exist on the builder 
API; NodeDumper and NodeReader now use `optionalArg(true)` and 
`numberOfArgs(2)`.
   
   Ivy was resolving a newer commons-cli than Hadoop 3.5.0 ships (1.9.0), so 
javac warned that `HelpFormatter` and `Option.Builder.build()` were deprecated 
(1.10+ APIs). Switching to those APIs would break on a Hadoop 3.5 classpath. 
Core `ivy/ivy.xml` now pins `commons-cli:commons-cli:1.9.0` with 
`force="true"`. Those warnings are gone.
   
   `FetchItemQueues` uses Guava `expireAfterWrite(Duration)` instead of the 
deprecated (long, TimeUnit) overload.
   
   The deprecation allowlist is now only `Plugin`, `PluginRepository`, `Ftp` 
(finalize(), still deferred) and the two Hadoop `JobContext` test stubs. The 
gate runs on JDK 17 only; JDK 21 javac emits java.net.URL constructor warnings 
that are out of scope here.
   
   I updatred protocol-ftp Client uses Commons Net `FTPCmd` / 
`sendCommand(FTPCmd, String)` instead of deprecated `FTPCommand` ints.  
The`plugin.xml` lists `commons-net-3.9.0.jar` to match that plugin’s Ivy 
revision.




> Address deprecated API usage across Nutch codebase and build
> ------------------------------------------------------------
>
>                 Key: NUTCH-3130
>                 URL: https://issues.apache.org/jira/browse/NUTCH-3130
>             Project: Nutch
>          Issue Type: Improvement
>          Components: build, ci/cd, dependency
>    Affects Versions: 1.21
>            Reporter: Lewis John McGibbney
>            Assignee: Lewis John McGibbney
>            Priority: Major
>             Fix For: 1.24
>
>
> A long time ago I performed a similar task 
> (https://issues.apache.org/jira/browse/NUTCH-1273) to address all deprecation 
> warnings flagged across the Nutch codebase.
> This time around I want to do the same but also plan to include a deprecation 
> check as part of GitHub CI so we keep on top of deprecation issues into the 
> future.
> Patch coming up.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to