Commit Graph

108 Commits

Author SHA1 Message Date
Giedrius Zavadskis 79420067b2 Adds support for glob 'cleanup_pattern' to facilitate removal of obsolete resources
(cherry picked from commit 515ed2e049dbc4e76d4e35d89ec2c674e87d3e6d)
2021-03-29 10:53:16 +03:00
Michael Bayne bb995508d9 Added support for adding arbitrary classpath entries. 2020-01-06 14:14:52 -08:00
Michael Bayne 5c38682f30 Upgrade Mockito to work with Java >8. 2020-01-06 13:38:22 -08:00
e507802 024d84ac2a replace "MISSING:" with "MISSING-" to avoid MalformedUrlException when digesting/diffing app with undefined variables (during build time) in appbase/latest. 2019-07-02 14:00:00 +02:00
Michael Bayne e7818030a7 Behave more gracefully when patch files do not exist.
It is possible to use versioned mode without patch files, though there's no way
to specifically tell Getdown whether or not you are using patch files, so it
always tries to download them. If they don't exist, it should now log one
reasonable warning and then proceed to update based on resource hashes.
2019-06-05 16:09:51 -07:00
Michael Bayne e376dff945 Reinstate env var substitution in appbase.
Also added tests for base init of Application & versioned appbase creation.
2019-06-05 12:24:50 -07:00
Michael Bayne 5cb2613e3b [maven-release-plugin] prepare for next development iteration 2019-06-04 15:25:43 -07:00
Michael Bayne 6283b60776 [maven-release-plugin] prepare release getdown-1.8.6 2019-06-04 15:25:33 -07:00
Sergey V 03997b20b9 revert processArg for appbase
that change broke versioned app update entirely. pls publish new getdown asap
2019-06-05 00:37:59 +03:00
Michael Bayne b5377ca66b Use a debug system property to control debugging.
When set, it disables stdout/stderr redirection and uses java.exe on Windows so
that a console window is shown with output from the launched app.

This removes the use of a debug.txt file.
2019-05-29 14:09:17 -07:00
Michael Bayne a0bdfb1ca9 [maven-release-plugin] prepare for next development iteration 2019-05-29 12:12:06 -07:00
Michael Bayne 45350e1842 [maven-release-plugin] prepare release getdown-1.8.5 2019-05-29 12:11:57 -07:00
Michael Bayne b8aa1dea7c Nix vestigial javadoc param. 2019-05-29 11:50:14 -07:00
Michael Bayne 9d6088ab80 Added revalidate_policy config.
This allows resources to be validated prior to every app launch instead of just
after update.

Also fixed some erroneous logging.
2019-05-29 11:40:36 -07:00
e507802 bf0f0deecb fix regression from PR #221
when bootstrapping into an empty directory with -Dappbase parameter, the version must be read first from the configuration in order to create a valid appbase after re-reading the just downloaded getdown.txt (in verisoned mode)
2019-05-29 15:49:37 +02:00
Michael Bayne 0a4bfe65c4 Proxy handling now detects need for updated credentials.
This revamps the way proxy handling is done to allow us to just proceed as
normal, and then if we get HTTP errors that indicate that we need a proxy or
need proxy credentials, we ask for them and then retry everything.

We still try to auto-detect the need for a proxy on our very first invocation
because on the first invocation, a failure to fetch a URL may well indicate
that a proxy is needed, but that same assumption does not hold on subsequent
invocations. In those later cases, it's probably just a transient network
failure and it would be weird and annoying to pop up the "please provide proxy
config" dialog in those cases.

Thanks pb00068 for getting this ball rolling, even though once again I have
nearly entirely rewritten the PR. I need to kick that habit. :)
2019-05-28 23:27:44 -07:00
Michael Bayne f087863098 Merge branch 'master' into feature/code-cleanup 2019-05-28 16:16:21 -07:00
Michael Bayne 6af6081648 Support PAC proxies.
What a horrible wart lingering from the early days of the Internet. Note to
future designers: please do not express configuration using a Turing complete
language.

Thanks jenriq for getting the ball rolling on this.

Closes #196.
2019-05-28 16:04:42 -07:00
sergiorussia b57524d0d6 fixed exception logging 2019-05-28 23:37:11 +03:00
Michael Bayne 490420852e Bit of cleanup of config parsing. 2019-05-28 11:15:45 -07:00
Michael Bayne ac499c1e3c Merge pull request #220 from sergiorussia/bugfix/digester-with-platform
fixed digesting with platform specifier for java, tracking and args
2019-05-28 10:48:53 -07:00
Michael Bayne c45615f0a0 Add changelog, undo null tolerance.
Null tolerance is a plague. I wish `String` did not admit nulls and we had to
use Optional<String> for potentially null strings, but Java will forever be
cursed with the billion dollar mistake.
2019-05-28 10:30:26 -07:00
e507802 c8901cadf2 allow appbase and latest URL to use ENV variables too 2019-05-28 10:34:14 +02:00
sergiorussia 0d384966a6 dropped obsolete comment 2019-05-27 23:11:28 +03:00
sergiorussia 01825b6f88 fixed digesting with platform specifier for java, tracking and args configs 2019-05-27 23:02:57 +03:00
Michael Bayne daf459e063 Pass proxy info from Proxy object to launched app. 2019-05-20 09:31:06 -07:00
Michael Bayne 330061deab [maven-release-plugin] prepare for next development iteration 2019-05-14 10:31:30 -07:00
Michael Bayne 57c124cc97 [maven-release-plugin] prepare release getdown-1.8.4 2019-05-14 10:31:21 -07:00
Michael Bayne dca5d69f9f Various formatting & style blah blah. 2019-05-09 10:34:35 -07:00
Michael Bayne 4065acd77e If we're creating a .jar file, use a JarOutputStream.
JOS stuffs some secret data into the zip extension slot, so we can't just
create a .jar file with a ZipOutputStream and call it a day.
2019-05-09 10:33:20 -07:00
Michael Bayne 4a1376093e Merge pull request #210 from sergiorussia/feature/zip-files-support
zip files supported as resources
2019-05-09 09:48:10 -07:00
Michael Bayne 339faa8260 Fix incorrect handling of args in format.
This is what I get for replacing the battle tested samskivert code with a quick
rewrite.
2019-05-09 09:33:41 -07:00
sergiorussia 7cf4ce0b2f unit tests 2019-05-05 18:06:52 +03:00
sergiorussia 4973da5e45 revert non-related changes, small fixes 2019-05-05 17:24:38 +03:00
sergiorussia c17882f432 zip files support 2019-05-05 17:09:51 +03:00
Michael Bayne b2263104e6 Small formatting tweaks. 2019-05-03 13:45:44 -07:00
Michael Bayne 18d449166c Merge pull request #206 from sergiorussia/feature/java_local_dir
enable custom java local dir instead of hardcoded "java_vm"
2019-05-03 13:34:32 -07:00
sergiorussia f7a5092116 review fixes 2019-05-01 00:18:47 +03:00
Michael Bayne 901682d5f7 timeout_verify -> verify_timeout. 2019-04-30 10:58:46 -07:00
Michael Bayne eb8a2da9d8 Merge branch 'master' into timeoutVerify 2019-04-30 10:55:10 -07:00
sergiorussia 557e615862 review fixes 2019-04-15 21:10:12 +03:00
sergiorussia e253db10be enable custom java local dir instead of hardcoded "java_vm" 2019-04-14 01:18:13 +03:00
Michael Bayne dcfd113dbf [maven-release-plugin] prepare for next development iteration 2019-04-10 11:45:13 -07:00
Michael Bayne a223f40549 [maven-release-plugin] prepare release getdown-1.8.3 2019-04-10 11:45:04 -07:00
Michael Bayne 8d59367742 Default to current working directory if no appdir is provided. 2019-04-10 11:35:55 -07:00
gropp_volker 8e520e7a25 add config timeout_verify
- remove hardcoded 60 seconds timeout during verify, as with pack200
this may fail on slow systems
- introduce new config "timeout_verify" with 60 seconds default
- handle timeout with aborting the launch
2019-03-13 11:28:14 +01:00
Michael Bayne f7586cf601 More formatting tweaks. 2019-02-25 17:58:48 -08:00
Myron Boyle d24d12a6c4 add -Dsilent=noupdate, to just start the app w/o any updates 2019-02-25 14:33:51 +01:00
Michael Bayne ae129fad6f Added support for proxy auth.
This also makes the use of a Proxy instance explicit in the Getdown code,
rather than trying to thread things through the proxy-related system
properties.

It introduces a ProxyAuth SPI which allows an app installation to save proxy
credentials in whatever way it deems fit. Otherwise the credentials are unsaved
and the user effectively has to enter them every time Getdown attempts to
access the internet.

This is obviously a terrible design, but there's no good (cross-platform) way
to securely store a username and password. So anyone using this feature is
likely going to need to provide an implementation of ProxyAuth that does
whatever auth storage they deem appropriate.

Adapted from PR from @ThomasG-AI, thanks!
2019-01-15 12:27:05 -08:00
Michael Bayne 9402d7c900 Update copyright headers. 2018-12-06 11:55:49 -08:00