Alexandre Archambault
869d7c628e
Retry downloads if an SSLException is caught
2017-04-21 15:32:45 +02:00
Alexandre Archambault
68b9eeeda8
Don't use missing directory listing fallback if it can be avoided
...
If the POM is in cache, but not the directory listing (nor a .error file for it), the LocalUpdate and LocalUpdateChanging policies make MavenRepository do as if the directory listing is missing - it is not even checked with the subsequent cache policies if any (because the POM was found with LocalUpdate / LocalUpdateChanging in the first place).
This PR fixes that - getting the POM will fail if the directory listing or an error file for it is missing from cache. That way, subsequent cache policies can fetch the directory listing.
As this only happens depending on what's in cache, it's a bit cumbersome to test as is. Relying fully on NIO2 in subsequent coursier versions should make it easier to add test cases for that (by using a virtual fs like jimfs to test what happens depending on what's in cache).
The test should basically do:
$ coursier fetch org.apache.maven:apache-maven:3.3.9 # fill cache
$ rm -f $CACHE_PATH/https/repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/.directory
$ rm -f $CACHE_PATH/https/repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/..directory.checked
$ coursier fetch org.apache.maven:apache-maven:3.3.9
The second fetch should work fine, fetching the directory listing, seeing that it lists no JAR, and then not attempting to download one. Before this commit, the second attempt would assume that the directory listing is not available, do without it, so assume that a JAR exists, and fail to download it.
2017-04-18 18:31:37 +02:00
Alexandre Archambault
f9de965638
Minor tweaking
2017-04-18 18:31:29 +02:00
Alexandre Archambault
b54438c1ba
Add fallback if directory listings are not available
2017-04-04 14:45:06 +02:00
Alexandre Archambault
79e60f17ca
Fix one-arg deprecated annotation warnings
2017-03-27 16:16:17 +02:00
Jentsch
363a841f5a
Replaced linesIterator by not deprecated lines method
2017-03-23 21:07:50 +01:00
Jentsch
7caee99846
Prevent compiler from inferring existential
2017-03-23 21:07:50 +01:00
Alexandre Archambault
a84057f792
Ensure no progress stuff if printed...
...
after progress report is stopped
just in case
2017-02-27 15:54:56 +01:00
Alexandre Archambault
21ba9888a5
Flush output after progress bars
...
Should fix some progress info not being cleared
2017-02-21 15:57:39 +01:00
Alexandre Archambault
9ece419bc8
Take into account COURSIER_PROGRESS the right way
...
COURSIER_PROGRESS=true was disabling progress bars before that
2017-02-21 15:57:38 +01:00
Alexandre Archambault
643c6d2201
Don't keep directory listing downloads in sight
2017-02-13 19:19:39 +01:00
Alexandre Archambault
035391f647
Add missing language.implicitConversions imports
2017-02-04 16:36:52 +01:00
Alexandre Archambault
d277153777
Annotate all case classes with final
2017-02-04 16:36:52 +01:00
Alexandre Archambault
fe529fb9f4
Switch to Java 6
2016-11-27 17:37:39 +01:00
Alexandre Archambault
73243f54e3
Fix minor TermDisplay glitch
...
Display cleaning possibly made too early
2016-11-07 12:27:58 +01:00
Alexandre Archambault
f1e1b6aac9
Limit messages more in SBT plugin
...
Only print "Updating ...", "Fetching artifacts of ..." messages if something is actually downloaded
2016-11-07 12:27:56 +01:00
Alexandre Archambault
1ea2b4d224
Use a ThreadScheduledExecutor for progress bars
...
Rather than manually making a thread sleep...
2016-11-01 13:19:41 +01:00
Alexandre Archambault
9a43212040
You never know
2016-11-01 13:19:37 +01:00
Alexandre Archambault
a50cb1bd85
WIP - Generate spark assemblies on the fly
2016-09-21 11:03:26 +02:00
Alexandre Archambault
10b13f73c7
Fix plugin handling
...
Mainly fixes things from SBT
2016-08-24 01:43:43 +02:00
Alexandre Archambault
c17cf67734
More reliable fallback dependencies
...
Should fix the jrudolph/sbt-dependency-graph case of
https://gist.github.com/paulp/62eaca1850904137959ad9121cce6b15
2016-08-22 00:19:49 +02:00
Alexandre Archambault
9917c0eb54
Explicitly close HTTP connections
2016-08-22 00:18:37 +02:00
Alexandre Archambault
6f93f85c5d
Switch to scalaz 7.2
2016-08-17 23:09:30 +02:00
Alexandre Archambault
6aebdac008
Ignore UTF-8 BOM in metadata files
...
Fixes https://github.com/alexarchambault/coursier/issues/316
2016-08-11 16:23:49 -04:00
Alexandre Archambault
f46581288f
Enable TTL for changing artifacts by default
2016-07-25 00:19:03 +02:00
Alexandre Archambault
c41dabdef9
Fix default cache TTL
2016-07-25 00:19:01 +02:00
Rodrigo Fernandes
88cd8909a3
Catch exception when reading file
2016-07-24 13:56:45 +01:00
Alexandre Archambault
1c34362b6f
Better handling of Ivy patterns
2016-07-23 13:56:28 +02:00
Alexandre Archambault
387d88d717
Accept non-finite durations as TTL
2016-05-31 15:18:33 +02:00
Alexandre Archambault
b76fbf363a
Add support for TTL
2016-05-31 15:18:29 +02:00
Alexandre Archambault
6aad1c6310
Add scaladoc
2016-05-31 13:41:56 +02:00
Alexandre Archambault
1553d0b9d9
Add support for Ivy version ranges
2016-05-30 00:40:41 +02:00
Alexandre Archambault
527b1eca96
Disable progress bar by default if CI or Emacs detected
2016-05-22 21:59:05 +02:00
Alexandre Archambault
0f914cf781
Small fix in error messages
2016-05-09 19:25:21 +02:00
Alexandre Archambault
f68ed5d42b
Add support for HTTP authentication
2016-05-09 19:25:15 +02:00
Alexandre Archambault
00484df435
Exception.getMessage can be null
2016-05-06 13:53:53 +02:00
Alexandre Archambault
00aaf8e1ac
Factor default Ivy pattern
2016-04-17 22:24:26 +02:00
Alexandre Archambault
96275df945
Small refactoring
2016-04-05 17:03:11 +02:00
Alexandre Archambault
f73dac68fd
Try not flooding the terminal with ignored errors...
...
...in updateClassifiers.
Also fail if an artifact cannot be fetched in update. A bit risky - might unveil locked errors, that ought to be circumvented.
2016-04-05 17:03:03 +02:00
Alexandre Archambault
4e74fe360f
Add missing \n
2016-04-05 16:24:38 +02:00
Alexandre Archambault
62720f94e0
Add update-local and update-local-changing modes
2016-04-05 16:24:37 +02:00
Alexandre Archambault
05d8224c49
Add -P option to force display of progress bars...
...
...else also look at the COURSIER_PROGRESS env var to force enabling or disabling them.
This deprecates the COURSIER_NO_TERM env var.
2016-04-05 16:24:37 +02:00
Alexandre Archambault
f19f9c9a69
Really suppress "/dev/tty not configured" message
2016-03-16 00:00:33 +01:00
Alexandre Archambault
83a08d172c
Add per-cache file structure lock
...
To be acquired when creating directories or locks in particular, so that these don't hinder each other.
2016-03-14 16:20:22 +01:00
Alexandre Archambault
dfc11151b1
Move FileError to a separate file
2016-03-14 16:20:22 +01:00
Alexandre Archambault
074e806c3b
Keep moving things around in TermDisplay
2016-03-14 16:20:21 +01:00
Alexandre Archambault
3ff533a02b
Move things around in TermDisplay
2016-03-14 16:20:21 +01:00
Alexandre Archambault
80f94a360b
Disable progress bars by default in non-interactive mode
2016-03-14 16:20:21 +01:00
Alexandre Archambault
5bd4184ac9
Replace Either[Unit, Unit] by a more explicit custom ADT
2016-03-14 16:20:21 +01:00
Alexandre Archambault
32a4ccc072
Cleaning
2016-03-14 13:36:51 +01:00