792 Commits

Author SHA1 Message Date
Alex Osborne 370f0480e5 [maven-release-plugin] prepare release 3.7.0 2025-02-03 14:11:18 +09:00
Alex Osborne 1041fc67ed Bump freemarker from 2.3.33 to 2.3.34 2025-01-23 14:05:32 +09:00
Alex Osborne f844b968b9 Bump restlet from 2.5.0-rc1 to 2.5.0 2025-01-23 14:05:32 +09:00
Alex Osborne 4e8bda1a07 ExtractorHTML: Add obeyRelNofollow option
When enabled this option causes regular links annotated with rel=nofollow to not be extracted. This is useful for sites that use rel=nofollow to hint crawler traps.
2025-01-13 15:34:38 +09:00
Alex Osborne 4c4510a364 Merge pull request #632 from internetarchive/groovy-config
Add Groovy crawl configs
2024-12-24 12:11:41 +09:00
Alex Osborne d13acddfc4 Remove usages of fastutil
fastutil is our largest dependency, consuming about a third of the
total Heritrix distribution size but we only use a couple of trivial
classes from it.

FPMergeUriUniqFilter (which I'm not sure anyone uses anyway), uses
LongArrayList so this change replaces it with a basic version that does
just enough.

The unsynchronized FastBufferedOutputStream usages are likely
unnecessary these days thanks to the JVM's lock optimisations and for
the one in CrawlerJournal, the GZIPOutputStream is still going to
be synchronizing anyway.
2024-12-20 14:37:20 +09:00
Alex Osborne 19c24b9006 Add Groovy crawl configs
This enables crawl configuration files to use Spring's [Groovy Bean Definition DSL] as an optional alternative to Spring XML. It uses the same bean configuration model but the syntax is more terse and human-readable. No more need for `&` in seed URLs. :-)

```groovy
   checkpointService(CheckpointService) {
        checkpointIntervalMinutes = 15
        checkpointsDir = 'checkpoints'
        forgetAllButLatest = true
   }
```

It also enables some powerful scripting capabilities. For example, defining a custom DecideRule directly in the crawl scope:

```groovy
scope(DecideRuleSequence) {
    rules = [
        new RejectDecideRule(),
        // ACCEPT everything linked from a .pdf file
        new PredicatedDecideRule() {
             boolean evaluate(CrawlURI uri) {
                 return uri.via?.path?.endsWith(".pdf")
             }
        },
        // ...
    ]
}
```

The main downsides are defining nested inner beans can be a bit awkward, some of the errors can be cryptic, and you can't just manipulate the config files with an XML parser.

This commit includes a Groovy version of the default crawl profile for reference, but doesn't expose a way to use it in the UI yet. For now, you need to manually create a `crawler-beans.groovy` file in your job directory.

[Groovy Bean Definition DSL]: https://docs.spring.io/spring-framework/reference/core/beans/basics.html#beans-factory-groovy
2024-12-01 00:14:42 +09:00
Alex Osborne 2b2179d9c7 Update pom.xml for 3.6.1-SNAPSHOT 2024-11-29 21:06:57 +09:00
Alex Osborne be81b3a407 Update maven release plugins for Java compat 2024-11-29 20:57:01 +09:00
Alex Osborne c67ff98b2d [maven-release-plugin] prepare for next development iteration 2024-11-29 20:46:02 +09:00
Alex Osborne 2d903ae772 [maven-release-plugin] prepare release 3.6.0 2024-11-29 20:42:40 +09:00
Alex Osborne 3fbf1bc8c0 Merge pull request #631 from internetarchive/update-deps
Update dependencies for 3.6.0 release
2024-11-29 19:24:28 +09:00
Alex Osborne a4a325436d Merge pull request #629 from internetarchive/restlet-2.5
Bump restlet from 2.4.0 to 2.5.0-rc1 and remove restlet repository
2024-11-29 19:16:41 +09:00
Alex Osborne 0a215f6467 Bump jaxb-runtime from 2.3.1 to 4.0.5 2024-11-29 17:12:43 +09:00
Alex Osborne d11d38a56c Merge pull request #628 from internetarchive/slf4j-2.0.16
Bump slf4j from 1.6.6 to 2.0.16 and include adapter to fix startup warning
2024-11-29 11:24:12 +09:00
Alex Osborne 7c04c0bc08 Remove maven.restlet.talend.com repository 2024-11-29 10:35:05 +09:00
Alex Osborne 405b2efc6d Bump restlet from 2.4.0 to 2.5.0-rc1 2024-11-29 10:34:35 +09:00
Alex Osborne 533d762db5 Include slf4j-jdk14 in heritrix-engine as a compile dependency
This eliminates the slf4j warning message on startup and should fix
logging for dependencies (such as crawlercommons) that use it.
2024-11-28 21:05:12 +09:00
Alex Osborne b736bd6a24 Bump slf4j from 1.6.6 to 2.0.16 2024-11-28 21:05:12 +09:00
Alex Osborne e23254ffe2 Bump freemarker from 2.3.19 to 2.3.33 2024-11-28 20:17:00 +09:00
Alex Osborne 4093871de1 Merge pull request #626 from internetarchive/checkpoint-on-shutdown
Add checkpoint on shutdown and --checkpoint CLI option
2024-11-28 16:43:45 +09:00
Alex Osborne a02a339830 Fix StackOverflowError and map exceptions in Browse Beans 2024-11-24 20:30:16 +09:00
Alex Osborne 585fed8575 Add --checkpoint command-line option
This makes it possible to select a checkpoint from the command-line when using the --run-job option.
2024-11-24 13:40:33 +09:00
Alex Osborne 18c69def9a CheckpointService: Add checkpointOnShutdown option
This enables a checkpoint to be automatically created during a graceful termination. This makes it easier to stop and restart Heritrix without having to manually checkpoint each running job.
2024-11-24 13:08:11 +09:00
Alex Osborne dd210c8e70 Replace Spring's removed @Required annotation with our own
Spring 6 removed @Required and they suggest using constructor injection instead. If we switched our beans to that we'd break existing Heritrix crawl configs. So this change implements our own basic version so we still get errors when a @Required property is null.
2024-11-20 16:30:15 +09:00
Alex Osborne 25c73da7e3 [maven-release-plugin] prepare for next development iteration 2024-10-29 15:18:54 +09:00
Alex Osborne 0aec63b70f [maven-release-plugin] prepare release 3.5.0 2024-10-29 15:01:16 +09:00
Alex Osborne c25e57a4a1 Bump version to 3.4.1-SNAPSHOT 2024-10-18 20:54:12 +09:00
Alex Osborne cbd7f37ed9 Replace littleproxy with jetty-proxy (to remove dependency on log4j)
littleproxy has not been updated since 2017 and has various out of date
dependencies. Since we're using jetty for HTTP server testing anyway, we
 may as well use it as the proxy too.
2024-10-18 17:28:03 +09:00
Alex Osborne 3d1b7e37ca Remove log4j 2024-10-17 19:25:53 +09:00
Alex Osborne 1d37cbc237 StatisticsSelfTest: Update for new jetty version
Jetty error messages are included in the selftest crawl and now have
slightly different lengths.
2024-10-17 11:58:13 +09:00
Alex Osborne 891dbe7615 Re-add restlet repository with new URL
Turns out we do need this. Restlet isn't in central, the CI builds
were caching the artifacts.
2024-10-15 19:19:28 +09:00
Alex Osborne cb1143e438 Remove maven.restlet.com repository
It seems to have moved to maven.restlet.talend.com but the restlet artifacts are in Central anyway so we don't need it.
2024-10-09 12:29:06 +09:00
Alex Osborne 3c80dacabe CrawlJob: Replace joda-time with java.time (JSR-310) 2024-09-13 13:47:00 +09:00
Alex Osborne c7c492b507 [maven-release-plugin] prepare for next development iteration 2024-09-09 15:28:44 +09:00
Alex Osborne 11fcbe71f3 [maven-release-plugin] prepare release 3.4.0-20240909 2024-09-09 15:28:44 +09:00
Alex Osborne 2c9a5c97ab Merge pull request #586 from nla/kryo-5.6.0
Update to kryo 5.6.0
2024-09-06 11:10:17 +09:00
Kristinn Sigurðsson 568db3cabc Added queue assignment variants that limit queue name length 2024-07-09 09:36:39 +00:00
Alex Osborne 74d6b37779 Update to kryo 5.6.0
This eliminates a few more very old dependencies that aren't in Maven Central.

Our direct usage of the unsupported sun.reflect.ReflectionFactory JDK API (which newer compilers complain about) is no longer needed as Kryo now has a SerializingInstantiatorStrategy that does roughly the same thing.
2024-06-18 10:05:56 +09:00
fedor cdfcce8deb In case of a crashed job, the crawlsummaryreport says: "Finished - Abnormal exit from crawl while the ApplicationContext still reports running==true. So the console shows "Job is ACTIVE - Running", while the process crashed This change reports the exit status in this case. 2023-03-06 15:54:27 +01:00
Jonas Linde de5c419d8f Don't log authentication failures when header is missing
The digest authentication method requires an initial request to get a challenge to use for the subsequent authenmtication digest. This initial request is not an authentication attempt and should not be handled as a failed such.
2022-11-16 11:24:21 +01:00
Jonas Linde 4bad4713ba Set correct timestamp for lastFailureTime
The initial sleepMs value will be the negative of the current time minus 6 seconds. Using that value to calculate lastFailureTime will increase that large negative number with 6000 milliseconds for every failure which means that rate limiting won't occur until after millions of failed attempts.
2022-11-16 11:24:21 +01:00
Alex Osborne 3c79a0b2b1 Increase DiskSpaceMonitor default pause threshold to 8 GiB
When there's less than 5 GiB free BDB throws DiskLimitException which
Heritrix will likely be unable to handle gracefully and crawl job will
break in various ways. #499
2022-09-10 23:17:53 +09:00
Andy Jackson e83f4f9e02 Reset to SNAPSHOT 2022-07-28 10:56:59 +01:00
Andy Jackson 292d2998cb [maven-release-plugin] prepare release 3.4.0-20220727 2022-07-27 21:36:19 +01:00
Clemens Klein-Robbenhaar fdde6d87a0 Add support for DNS-over-HTTPS lookups
- instead of "borrowing" the configured proxy from
  the fetchHttp bean, use proxy values defined via
  global options, to avoid interference with other
  jobs running in parallel (or at least make them
  explicit).
  The "fetchHttp" bean also uses these settings,
  if no bean specific settings are used.
- remove the "enableDnsOverHttpResolves", and rely
  on a non-empty "dnsOverHttpServer" value to signal
  that DoH should be used.
2022-04-09 23:04:37 +02:00
Clemens Klein-Robbenhaar 2144abb2cb Add support for DNS-over-HTTPS lookups
- use the "DohResolver" from the dnsjava library
  to make DoH lookups
- to enable and configure it, add two new
  properties
  * "enableDnsOverHttpResolves" (boolean)
  * "dnsOverHttpServer" URL to the DoH Server
- as one use case for DoH is being located
  behind a firewall, also support using a proxy
  to access the DoH server; the proxy from
  the FetchHTTP bean is reused in that case

Fixes #211
2022-04-08 11:48:52 +02:00
Jamie Hoyle dd01689ace FetchHTTP: SOCKS5 proxy support
Closes #454
2022-03-28 10:24:07 +09:00
Alex Osborne 71b40cf882 Use Files.createLink() and Files.createSymbolicLink() instead of JNA
We don't need to support Java < 7 anymore. This simplifies the
code and should improve portability to platforms our old version of
JNA doesn't support like Apple Silicon.

Fixes #467
2022-03-02 21:37:27 +09:00
Alex Osborne 568d5cedfe Merge pull request #461 from kris-sigur/seed-redirect-tld
Add conf to not allow TLDs as seeds found via redirect from other seeds
2022-02-14 07:46:09 +09:00