Remove dependency on httpcomponents.core5
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 15/100
- Tipo de issue
- Refactorización
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- java
- Área
- backend, build-system, documentation
Línea de trabajo
Start with the affected imports listed in the issue, especially BasicURLNormalizer, then inspect core/pom.xml, the root pom.xml, the archetype shade configuration, and the “Migrating to 4.0.0” docs. The issue specifies the constants and query-string behavior to preserve; review the listed main and test files across core, tika, and warc. Done means removing the dependency and exclusion, preserving query output, and documenting the migration; linked pull request #2270 is already open.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
See discussion on https://github.com/apache/stormcrawler/pull/2236/#issuecomment-6250049212
Context
After #2211, core depends only on org.apache.httpcomponents.core5:httpcore5. It uses it for HTTP header and status constants and for query-string parsing in BasicURLNormalizer. A whole library for that is not worth the dependency, and HttpComponents types in our code mean we can't change these classes in a 4.x minor release without breaking user code. 4.0.0 is the time to remove it.
What's affected
1. HttpHeaders constants
- Main code:
FeedParserBolt,JSoupParserBolt,SimpleFetcherBolt,SiteMapParserBolt,FetchOutcomes,AdaptiveScheduler,HttpRobotRulesParser,FileResponse, okhttpHttpProtocol,CharsetIdentification, plusParserBolt(tika) andWARCRecordFormat(warc). - Tests:
FeedParserBoltTest,JSoupParserBoltTest,SiteMapParserBoltTest,AdaptiveSchedulerTest,CharsetIdentificationTest, plus the tika and warc tests. - Constants used:
ACCEPT,ACCEPT_LANGUAGE,AUTHORIZATION,CONTENT_LENGTH,CONTENT_TYPE,ETAG,IF_MODIFIED_SINCE,IF_NONE_MATCH,LAST_MODIFIED,LOCATION,PROXY_AUTHORIZATION,USER_AGENT.
2. HttpStatus constants
- Used in
FileResponse. - Constants used:
SC_OK,SC_MULTIPLE_CHOICES,SC_BAD_REQUEST,SC_UNAUTHORIZED,SC_FORBIDDEN,SC_NOT_FOUND,SC_METHOD_FAILURE,SC_INTERNAL_SERVER_ERROR.
3. NameValuePair and URLEncodedUtils in BasicURLNormalizer
- These sort the query parameters and remove the filtered ones.
- The code calls
URLEncodedUtils.parse(query, UTF_8, '&', ';')andURLEncodedUtils.format(pairs, UTF_8). That class is deprecated in httpcore5.
Actions
- Add StormCrawler-owned
HttpHeadersandHttpStatusclasses in core, for example underorg.apache.stormcrawler.protocol. Each holds the constants listed above as plainpublic static finalfields, with the same names and values as HttpCore 5. Switching to them is then an import change only. - Update all the imports above in core, tika and warc, main and test code.
- Replace
URLEncodedUtilsandNameValuePairinBasicURLNormalizerwith a small in-house parser and formatter. The output must stay exactly the same. - Remove
httpcore5fromcore/pom.xml, and thehttpcore5.versionproperty from the rootpom.xmlif nothing else uses it. - Remove the leftover
<exclude>org/apache/http/**</exclude>from the archetype's shade configuration. - Update the "Migrating to 4.0.0" docs. Core no longer brings in any HttpComponents classes, so users who relied on them transitively must declare the dependency themselves.
- Lenguaje dominante
- Java
- Estrellas
- 1k
- Forks
- 295
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 71
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/stormcrawler
-
URLNormalizer The query is split on `;` as well as `&`, which rewrites URLsPosiblemente ocupada @jnioche la tomó hace 27 días. Abiertobug
apache/stormcrawler#2199 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 70/100
apache/stormcrawler#2131 ·
Los mantenedores suelen responder en 1 día
-
[Improvement] Work towards Maven 4 CompatibilityPosiblemente ocupada @mvolikas la tomó hace 352 días. Abiertogood first issue help wanted
apache/stormcrawler#1662 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Delete redirected pagesQuizá libre de nuevo @tomatotomata la tomó hace 85 días y no hay ningún pull request abierto. Abiertocore good first issue
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
apache/stormcrawler#994 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Adaptative URL filter to normalize URLs based on canonical tagPosiblemente ocupada @akash-manna-sky la tomó hace 71 días. Abiertogood first issue
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
apache/stormcrawler#315 · 6 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/stormcrawler
Issues similares
-
Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
protobuf
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
FasterXML/jackson-dataformats-binary#874 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
HexaHexes/infinite-dungeon-spawn-safety#17 ·
Los mantenedores suelen responder en 1 día