Commit Graph

127 Commits

Author SHA1 Message Date
Anosh D. Ullenius 508ef73d85 Use factory method for creating FileInputStream 2022-06-17 20:34:58 +02:00
Anosh D. Ullenius 03ed2f52d1 Type inference. Use autoboxing for int 2022-06-17 20:33:00 +02:00
Anosh D. Ullenius 258d85b934 Remove redundant throws clause 2022-06-17 20:29:52 +02:00
Anosh D. Ullenius 245f5386ce Remove protected-modifier in final class 2022-06-17 20:26:22 +02:00
Anosh D. Ullenius 2b30d9dab0 Make fields final. Remove protected-modifier in final class 2022-06-17 20:23:51 +02:00
Anosh D. Ullenius a4e38057ae Make fields final. Remove redundant modifier on final-class 2022-06-17 20:20:05 +02:00
Michael Bayne d41a817b55 [maven-release-plugin] prepare for next development iteration 2022-05-24 10:42:36 -07:00
Michael Bayne 425e0d0c87 [maven-release-plugin] prepare release getdown-1.8.7 2022-05-24 10:42:34 -07:00
Michael Bayne fda9590d21 Fix Javadoc error. 2022-05-24 10:30:43 -07:00
Michael Bayne 717f3bdaed Bump Mockito to 3.12.4 so we can build on Java 17/18. 2022-03-27 09:41:20 -07:00
Benjamin König 9a99f4e27d Use relative paths in classpath to shorten execution line on large apps 2022-02-18 14:28:29 +01:00
Michael Bayne bb4b9e3390 JarDiffPatcher needs to support .old files.
When patching, Getdown will move foo.jar to foo.jar.old and then patch that
file to create a new foo.jar. That results in foo.jar.old being passed into
JarDiffPatcher as the source file, which it then inspects to determine whether
it is a zip file or a jar file based on its file extension. Since that file
extension has already changed to .xxx.old, we need to handle that.

Closes #230.
2022-01-05 07:27:22 -08:00
Andrius Šabanas bfd5571377 Updated existing directories cleanup functionality to remove all their contents when unpacking archives. 2021-10-17 04:35:55 +03:00
Michael Bayne cedf568383 Merge pull request #240 from Cosium/java.net.useSystemProxies
Usage of Proxy.NO_PROXY prevents -Djava.net.useSystemProxies=true from kicking in
2021-04-05 07:29:42 -07:00
Michael Bayne a35c385f9f Update Mockito to a version that works with JDK15. 2021-04-04 12:16:25 -07:00
Michael Bayne fd6a393d69 Removing Pack200 support.
It has been removed from the JDK for some time now. People still relying on it
will have to stick to an older version of Getdown.
2021-04-04 12:15:55 -07:00
Michael Bayne dacd977987 Merge pull request #245 from threerings/dependabot/maven/core/junit-junit-4.13.1
Bump junit from 4.12 to 4.13.1 in /core
2021-04-04 12:09:21 -07:00
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
dependabot[bot] 799a49e4f5 Bump junit from 4.12 to 4.13.1 in /core
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-13 08:01:42 +00:00
Réda Housni Alaoui 736dfffd04 Usage of Proxy.NO_PROXY prevents -Djava.net.useSystemProxies=true from kicking in 2020-06-12 14:27:56 +02: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