You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/site/markdown/SystemProperties.md
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,14 +38,33 @@ eclipse.p2.maxDownloadAttempts | _any positive integer_ | 3 | Describes how ofte
38
38
39
39
### Tycho P2 Transport
40
40
41
-
These properties control how Tycho downloads artifacts from P2 servers
41
+
These properties control how Tycho downloads artifacts from P2 servers.
42
+
43
+
#### Cache Behavior and the `-U` Option
44
+
45
+
Tycho's P2 transport uses a cache to improve build performance by avoiding repeated downloads of unchanged remote resources. The cache stores HTTP responses, including successful downloads and error responses (like 404 Not Found).
46
+
47
+
**Important:** The Maven `-U` (or `--update-snapshots`) command-line option forces Tycho to bypass the cache and re-check all remote P2 repositories. This is useful when:
48
+
49
+
- A P2 repository was recently published or updated and the cache contains stale data
50
+
- A previous build failed because a repository was temporarily unavailable (the 404 response may be cached)
51
+
- You need to ensure you have the latest versions of all artifacts
52
+
53
+
Example usage:
54
+
```bash
55
+
mvn clean verify -U
56
+
```
57
+
58
+
The `-U` option takes precedence over the `tycho.p2.transport.min-cache-minutes` setting - when `-U` is specified, the cache is always bypassed regardless of the configured cache duration.
59
+
60
+
#### Transport Properties
42
61
43
62
Name | Value | Default | Documentation
44
63
--- | --- | --- | ---
45
64
tycho.p2.transport.cache | file path | local maven repository | Specify the location where Tycho stores certain cache files to speed up successive builds
46
65
tycho.p2.transport.debug | true/false | false | enable debugging of the Tycho Transport
47
66
tycho.p2.transport.max-download-threads | number | 4 | maximum number of threads that should be used to download artifacts in parallel
48
-
tycho.p2.transport.min-cache-minutes | number | 60 | Number of minutes that a cache entry is assumed to be fresh and is not fetched again from the server
67
+
tycho.p2.transport.min-cache-minutes | number | 60 | Number of minutes that a cache entry is assumed to be fresh and is not fetched again from the server. Use `-U` on the command line to force an immediate refresh regardless of this setting.
49
68
tycho.p2.transport.bundlepools.priority | number | 100 | priority used for bundle pools
50
69
tycho.p2.transport.bundlepools.shared | true/false | true | query shared bundle pools for artifacts before downloading them from remote servers
51
70
tycho.p2.transport.bundlepools.workspace | true/false | true | query Workspace bundle pools for artifacts before downloading them from remote servers
Copy file name to clipboardExpand all lines: src/site/markdown/Troubleshooting.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,31 @@ Tycho complains about missing or invalid p2 metadata.
42
42
2.**Update site refresh**: If using local repositories, ensure they are properly generated
43
43
3.**Clear local cache**: Remove `~/.m2/repository/p2` to force re-download of metadata
44
44
45
+
## Cached Repository Errors
46
+
47
+
### Problem
48
+
A build fails with "No repository found" or similar errors even though the repository is now available. This often happens when:
49
+
- A p2 repository was temporarily unavailable during a previous build
50
+
- A repository was recently published or updated
51
+
- Your build previously ran when network connectivity was intermittent
52
+
53
+
Tycho caches HTTP responses (including error responses like 404 Not Found) to improve build performance. If a repository lookup failed during a previous build, that failure may be cached.
54
+
55
+
### Solution
56
+
Use the Maven `-U` (or `--update-snapshots`) flag to force Tycho to bypass the cache and re-check all remote repositories:
57
+
58
+
```bash
59
+
mvn clean verify -U
60
+
```
61
+
62
+
This is the recommended approach when you suspect cached data is stale.
63
+
64
+
Alternatively, you can:
65
+
1.**Wait for cache expiration**: By default, cache entries are considered fresh for 60 minutes (configurable via `tycho.p2.transport.min-cache-minutes`)
66
+
2.**Clear the transport cache**: Delete the cache directory located at `~/.m2/repository/.cache/tycho` (or the location specified by `tycho.p2.transport.cache`)
67
+
68
+
For more details on cache configuration options, see [System Properties](SystemProperties.html#tycho-p2-transport).
0 commit comments