811 Commits

Author SHA1 Message Date
Alex Osborne dd40970f15 [maven-release-plugin] prepare release 3.9.0 2025-05-13 12:25:16 +09:00
Alex Osborne eb1205f6d5 Upgrade all tests to junit 5 2025-05-09 00:07:18 +09:00
Alex Osborne 4465c1b9f6 Bump restlet from 2.6.0-m2 to 2.6.0-rc1 2025-05-08 17:31:30 +09:00
Alex Osborne db16b60960 Fix 'anypath' URL generation and avoid unnecessary usages of it
Restlet 2.6 refuses paths with double slash in the static path and we
were inadvertently generating them.
2025-04-28 17:09:33 +09:00
Alex Osborne 0f5358ffef Exclude jetty-quiche-native from restlet
It's very large and we don't use Restlet's HTTP/3 support currently.
2025-04-28 16:29:22 +09:00
Alex Osborne bc259728a0 Update to Jetty 12.0.16 and Restlet 2.6.0-M2
The Jetty API has changed, which mostly affects test code.

Jetty now does a strict SNI host check which unfortunately causes it to
return "SNI error" for our existing ad-hoc certificates. For now, I've
disabled it to avoid breaking existing deployments but added a
--sni-host-check command-line option so you can re-enable it if
you've configured your own certificate appropriately.
2025-04-24 17:40:20 +09:00
Adam Miller 02c4c8ee09 feat: add unit test for HighestUriPrecedenceProvider Kryo serialization 2025-04-23 16:25:58 -07:00
Adam Miller fdada4c5ec chore: formatting 2025-04-23 15:20:40 -07:00
Adam Miller cb98bfc522 chore: fix line endings 2025-04-22 17:33:32 -07:00
Adam Miller e7fe566919 fix: autoregister Histotable and HighestUriPrecedenceProvider 2025-04-22 17:29:52 -07:00
Alex Osborne e9b60404a6 [maven-release-plugin] prepare for next development iteration 2025-04-01 17:43:31 +09:00
Alex Osborne 2323e2251e [maven-release-plugin] prepare release 3.8.0 2025-04-01 17:43:25 +09:00
Alex Osborne 575a2653b9 Fix warning: assert statement with side effects 2025-04-01 16:27:13 +09:00
Alex Osborne b8dbe8bb2d Remove unused utility class LogUtils 2025-04-01 16:25:44 +09:00
Alex Osborne ed72112d9c Fix missing try-with-resources warning 2025-04-01 16:19:58 +09:00
Alex Osborne f956b2ec1f Fix broken references in javadoc 2025-04-01 15:59:38 +09:00
Alex Osborne 7ff1078d21 Fix warning about implicit narrowing conversion for contentSinceCheck 2025-03-31 15:31:04 +09:00
Alex Osborne f6b083ecfb Remove usages of deprecated Integer and Long constructors 2025-03-31 15:04:00 +09:00
Alex Osborne d21a053c6d [maven-release-plugin] prepare for next development iteration 2025-02-03 14:11:22 +09:00
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