Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Building with Tycho offline

Hi Everyone,

I wanted to give an update and in case someone else bumps into this in the future. I finally figured out the issue I was running into here once I spent some more time digging into it :)

It turns out it's due to the JVM tmpdir which defaults to /tmp. On a personal system this is fine but on a shared system you will run into permissions issues after another user runs a build.

Solution is to set

The reason we see the p2 issue is because p2 writes some data into $tmpdir/p2 and when it does not have permissions of course this fails and then we run into this issue we saw when building in offline mode.

Hope this helps,



On 29/07/13 06:09 AM, Oberlies, Tobias wrote:

Normally, p2 cycles through all prefixes when it tries to load a repository. The order in which p2 tries the prefixes may be changed through a p2.index file. When offline, the p2.index is not there, so p2 tries the default order, which is “content” first. I don’t know why it doesn’t try the compositeContent prefix afterwards.


I don’t think that this is generally broken in Tycho, or otherwise no composite repositories were usable in offline mode.


Maybe you can find out more by stepping through the p2 code which handles the ProvisioningException in createCache, and check why it doesn’t try the other extensions.






From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Thanh Ha
Sent: Donnerstag, 25. Juli 2013 21:52
To: tycho-user@xxxxxxxxxxx
Subject: Re: [tycho-user] Building with Tycho offline


I made a small reproducible example project for my own testing and thought I'd share in case it's useful for someone else. Using this bundle I'm able to reproduce the failing issue on using Maven 3.0.5 and JDK 1.7.0_25 in /shared/common. I've also attached my Tycho patch with adds the print statement.

Steps I used to reproduce are:

1. mvn clean verify
2. mvn clean verify -o

As for reproducing a working build I'm not sure but it works on my Laptop which is running Arch Linux with Maven 3.0.5 and JDK 1.7.0_25.


On 25/07/13 03:05 PM, Thanh Ha wrote:

I was curious so I made a custom Tycho to add a print string to print the "prefix" and "repositoryLocation" at the beginning of this function [1]. What I noticed was on the working system the prefix is calculated to be "compositeContent" while on the system that is failing the prefix is calculated to be "content" as shown below.

How does the prefix get calculated? and why would it be calculated differently on different systems?

Working system:

[INFO] Adding repository
+++++++++++++ compositeContent -- --
+++++++++++++ compositeContent -- --
+++++++++++++ content -- --
+++++++++++++ content -- --
+++++++++++++ compositeContent -- --
+++++++++++++ content -- --
+++++++++++++ content -- --
+++++++++++++ content -- --

Failing system:

[INFO] Adding repository
+++++++++++++ content -- --
[ERROR] Internal error: java.lang.RuntimeException: Failed to load p2 repository with ID 'emf' from location Repository system is offline and no local cache available for -> [Help 1]



On 24/07/13 03:17 PM, Thanh Ha wrote:

On 24/07/13 10:57 AM, Jeff MAURY wrote:

Can you try on your failing machine after you deleted the local Maven repo ?


I tried this but it did not help. I even tried zipping up the local repo from the working machine and copying it over but that didn't seem to affect anything either.




On Wed, Jul 24, 2013 at 3:49 PM, Thanh Ha <thanh.ha@xxxxxxxxxxx> wrote:

Hi Everyone,

I ran into an issue trying to do an offline build with Tycho and was wondering if anyone ran into this before. Basically when I build on one system in offline mode I'm returned with "Repository system is offline and no local cache available for ..." (Snippet below) which as far as I can tell is a Tycho message.

I built this cache by first building normally to create the cache and then on my 2nd run I enabled Maven's --offline mode.

What's strange is that when I build on a different system following the same steps doing a normal build first to build the cache and then enabling offline mode, it works as expected. On both systems I'm building the same code and using the same version of JDK and Maven so I'm not sure what could be different between the 2 systems that would cause the error to appear in 1 but not the other.

Maybe there's some environment settings I can look at?



[INFO] o.h.m.e.h.MavenExecutionResultHandler - Build failed with exception(s)
[INFO] o.h.m.e.h.MavenExecutionResultHandler - [1] org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: org.eclipse.equinox.p2.core.ProvisionException: Repository system is offline and no local cache available for
[DEBUG] Closing connection to remote
[ERROR] Internal error: java.lang.RuntimeException: org.eclipse.equinox.p2.core.ProvisionException: Repository system is offline and no local cache available for -> [Help 1]



tycho-user mailing list

Back to the top