Updates-R-Simple

An auto-update system for Java, free of frameworks and signatures

License

License

GroupId

GroupId

de.idos.updates
ArtifactId

ArtifactId

updates-core
Last Version

Last Version

1.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

Updates-R-Simple
An auto-update system for Java, free of frameworks and signatures
Project URL

Project URL

https://github.com/UrsKR/updates-r-simple
Source Code Management

Source Code Management

https://github.com/UrsKR/updates-r-simple

Download updates-core

How to add to project

<!-- https://jarcasting.com/artifacts/de.idos.updates/updates-core/ -->
<dependency>
    <groupId>de.idos.updates</groupId>
    <artifactId>updates-core</artifactId>
    <version>1.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/de.idos.updates/updates-core/
implementation 'de.idos.updates:updates-core:1.2.0'
// https://jarcasting.com/artifacts/de.idos.updates/updates-core/
implementation ("de.idos.updates:updates-core:1.2.0")
'de.idos.updates:updates-core:jar:1.2.0'
<dependency org="de.idos.updates" name="updates-core" rev="1.2.0">
  <artifact name="updates-core" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.idos.updates', module='updates-core', version='1.2.0')
)
libraryDependencies += "de.idos.updates" % "updates-core" % "1.2.0"
[de.idos.updates/updates-core "1.2.0"]

Dependencies

compile (1)

Group / Artifact Type Version
commons-io : commons-io jar 2+

test (8)

Group / Artifact Type Version
org.hamcrest : hamcrest-library jar 1.3.RC2
javax.servlet : javax.servlet-api jar 3+
junit : junit-dep jar 4+
org.mockito : mockito-core jar 1.9.0
org.eclipse.jetty : jetty-server jar 8+
org.hamcrest : hamcrest-core jar 1.3.RC2
info.cukes : cucumber-java jar 1.0.10
info.cukes : cucumber-junit jar 1.0.10

Project Modules

There are no modules declared in this project.

This is an auto-update system for Java that hopes to be simple to integrate and use. The library is designed to be thread-safe and should even handle multiple VMs updating simultaneously. It uses threads internally to provide a more capable API, and you should watch for bad access if you use it in a GUI framework.

It is licensed under the Apache License v2.0.

Work so far was sponsored by IDOS AE GmbH. When setting out, my goal was to create an auto-updater that did not force me to depend on a major framework, or required my dependencies to be signed.

Current Topic of Interest

Testing the new zip support in a real-life application.

Maven Coordinates

The project is in Maven Central at de.idos.updates:updates-core:1.2.0

To Build

  • You need JDK 6
  • Run gradlew build
  • Distribute through gradlew uploadArchives (Sonatype registration required)

To Use

  1. Instantiate a Configurator and use its API to create a configuration file.
  2. Put the resulting file on the classpath or into your working directory.
  3. Pull the latest update and then launch the main method (e.g. Demo.startDemo()):
    String mainClass = "de.idos.updates.Demo";
    String mainMethod = "startDemo";
    UpdateSystem updateSystem = new ConfiguredUpdateSystemFactory().create();
    updateSystem.reportAllProgressTo(new ConsoleReport());
    updateSystem.checkForUpdates().updateToLatestVersion();
    File versionFolder = updateSystem.getFolderForVersionToRun();
    new ApplicationLauncher(versionFolder).launch(mainClass, mainMethod);

For a more complex example that can also cope with IDEs, please refer to the demo module.

Changelog

v1.2.0

  • API-CHANGE: Uses the full base-URL to discover and download updates.
  • No longer expects updates to reside at "./updates".
  • Java 6 required (once again)

v1.1.0

  • Unpacks zipped archives in the update fileset automatically
  • Uses HEAD requests to get the file size, saving bandwidth and server load.

v1.0.1

  • Java 6 required (instead of Java 7)

v1.0.0

  • Initial Release
  • Discovers new versions
  • Downloads and installs updates
  • Dynamic classloading
  • Java 7 required

Versions

Version
1.2.0
1.1.0
1.0.1
1.0.0