Skip to main content

A simple tool to deploy the jre binary releases mirror.

Project description

PyPI version License

About

A distribution tool of a selection of temurin17-binaries, as the GWF behavior is weird while downloading jre etc., with Python scripts.

How To

    JRE-Mirror requires Python 3.9 and above.

The sub-folders in temurin17-binaries can be deployed as a website root path. In the sub-folders, run the Python module, jre-mirror to download the selected binary distributions, with proxy configured in proxy.json.

Download the JRE-Mirror-jdk17.zip from the release section. Configure the list.json, which is the download tasks configuration, where

    mirroring: a list of target binaries to bo downloaded from temurin17
    resources: a list of target binaries completed, and is locally available

Start the jre-mirror Python module to download the mirrors.

    # (Tested on Ubuntu 24.0.4)
    cd JRE-Mirror/temurin17-binaries/jdk-17.0.17+10
    python3 -m venv .env
    source .env/bin/activate # For windows: source .env/Scripts/activate
    pip install jre-mirror
    python3 -m jre_mirror

Now configure the resources a Nginx static site or, If you need more fine control, by starting a feature requirement, use the Html-service as the web service, with which a simple Windows service can be setup as a static web site.

A sample of html-service's configuration, WEB-INF/html-service.json, can be:

    { "type": "io.oz.srv.WebConfig",
      "port": 1984,
      "paths": [
        {"path": "/jre-17/*", "resource": "$HOME/JRE-Mirror/temurin17-binaries/jdk-17.0.17+10"}],
      "welcomepages": [],
      "startHandler": []
    }

Restart the service, if you followed the steps in the README of html-service. E.g.

    sudo systemctl restart html-service.service

Try

    http://127.0.0.1:1984/jre-17/list.json

The binaries and the json file can be available online now.

About Proxy

To configure the proxy, in list.json, specify the configuration file path:

    # list.json
    { ...
      "proxy": "proxy.json"
      ...
    }

And in proxy.json, configure the proxy string following the general proxy format of Python:

   { "type": "io.oz.edge.Proxy",
     "http": "http://user:passwd@127.0.0.1:port",
     "https":"http://user:passwd@127.0.0.1:port"
   }

Note: All the type fields in json files are neccessary.

Credits:

temurin17-binaries

The home for releases and nightlies for all Temurin17 variants and platforms

OpenJDK Mirror Scripts

These scripts are run at https://ci.adoptopenjdk.net/view/git-mirrors/ and are responsible for updating the Eclipse Adoptium clones of the various OpenJDK Skara github repositories that we are interested in building.

jyksnw/install-jdk

Python package that simplifies the process of installing OpenJDK on Windows, macOS, Linux and other supported operating systems, saving time and effort.

So no equivolent?

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jre_mirror-0.0.8.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jre_mirror-0.0.8-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file jre_mirror-0.0.8.tar.gz.

File metadata

  • Download URL: jre_mirror-0.0.8.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.1

File hashes

Hashes for jre_mirror-0.0.8.tar.gz
Algorithm Hash digest
SHA256 e200d1a0880cf1c460b3ffa13beab0b498ce990add9c6bb1213b3bd2eaa31e4e
MD5 abd546be1d837cbce9bd1d2b08d59f62
BLAKE2b-256 f1d8c2de6a356e243aea9d6d2f0dfd2581404da0933ffa544f7c636167e29a02

See more details on using hashes here.

File details

Details for the file jre_mirror-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: jre_mirror-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.1

File hashes

Hashes for jre_mirror-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 4f8dfdd05d4699c667c16e4be9cb12fd3a20e4c9f961b3566c1bd9e173143943
MD5 042196f9319f70930ee0910840bd8456
BLAKE2b-256 78ab2f13d4f1448b04f50f97ba51032733b3aefa9f1cfe87481e9d46062d4524

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page