Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow loading external jars #1803

Merged
merged 3 commits into from
Jan 15, 2024
Merged

Allow loading external jars #1803

merged 3 commits into from
Jan 15, 2024

Conversation

dadoonet
Copy link
Owner

This will help to add easily missing jars (because of license issues) but also custom jars and may be in the future some plugins.

The new layout is now:

    .
    ├── NOTICE
    ├── LICENSE
    ├── README.md
    ├── bin
    │   ├── fscrawler
    │   └── fscrawler.bat
    ├── config
    │   ├── log4j2.xml
    │   └── log4j2-file.xml
    ├── external
    ├── lib
    └── logs
        ├── documents.log
        └── fscrawler.log

The external directory contains the external libraries you could add to FSCrawler. For example, if you want to add the jai-imageio-jpeg2000 library to add support for JPEG2000 images, you can download it from Maven Central and put the jai-imageio-jpeg2000-1.4.0.jar file in the external directory.

This should also work in the Docker context by mounting the external dir:

docker run -it --rm \
   -v ~/.fscrawler:/root/.fscrawler \
   -v ~/tmp:/tmp/es:ro \
   -v "$PWD/external:/usr/share/fscrawler/external" \
   dadoonet/fscrawler fscrawler job_name

Hopefully this could close the following issues:

This will help to add easily missing jars (because of license issues) but also custom jars and may be in the future some plugins.

The new layout is now:

```txt
    .
    ├── NOTICE
    ├── LICENSE
    ├── README.md
    ├── bin
    │   ├── fscrawler
    │   └── fscrawler.bat
    ├── config
    │   ├── log4j2.xml
    │   └── log4j2-file.xml
    ├── external
    ├── lib
    └── logs
        ├── documents.log
        └── fscrawler.log
```

The `external` directory contains the external libraries you could add to FSCrawler. For example, if you want to
add the `jai-imageio-jpeg2000` library to add support for JPEG2000 images, you can download it from [Maven Central](https://central.sonatype.com/search?q=g:com.github.jai-imageio) and put the
`jai-imageio-jpeg2000-1.4.0.jar` file in the `external` directory.

This should also work in the Docker context by mounting the `external` dir:

```sh
docker run -it --rm \
   -v ~/.fscrawler:/root/.fscrawler \
   -v ~/tmp:/tmp/es:ro \
   -v "$PWD/external:/usr/share/fscrawler/external" \
   dadoonet/fscrawler fscrawler job_name
```

Hopefully this could close the following issues:

* #1769
* #1459
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@dadoonet dadoonet merged commit fd2a436 into master Jan 15, 2024
13 checks passed
@dadoonet dadoonet deleted the 1769-external-jars branch January 15, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new For new features or options
Projects
None yet
1 participant