Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cbi-dev] Building platform maintenance branches in offline mode

Hi Phil,

I actually ran into exactly this problem before too and was able to perform an offline mode. It turns out for R4_2_mainteannce and R4_3_maintenance you need more than just the maven local repo. You also need the tmpdir data.

What I would do is run a build without offline and pass a parameter:

    -Djava.io.tmpdir=/path/to/some/tmpdir

Then save BOTH your maven local repo and tmpdir and when running an offline mode make sure to pass the path for both of them.

I cannot remember exactly but I believe Tycho requires some metadata that is stored in tmpdir mode in order to resolve dependencies. If you can do it with R4_4_maintenance it is likely fixed in a newer Tycho version but I haven't tried doing offline mode past R4_3_maintenance branch yet.

Hope this helps,


Thanh

On 16/07/14 06:48 AM, Phil Mason wrote:
Hi all,

I'm trying to get various R4_x_maintenance branches to build with mvn --offline. The process I'm using is as follows:

Build with a command line like this (actual command is a little more complicated and given at the end of the email):
mvn  -Dmaven.repo.local=/home/pmason/temp-mvn-repo -Declipse.p2.mirrors=false clean verify

That build succeeds and I then archive the maven repo and attempt to rerun the build with
mvn --offline  -Dmaven.repo.local=/home/pmason/temp-mvn-repo -Declipse.p2.mirrors=false clean verify

which I think should work because everything that is needed for the build to work has already been downloaded and stored in /home/pmason/temp-mvn-repo.

This works as expected with R4_4_maintenance but with R4_3_maintenance it fails with the following message:

Failed to load p2 metadata repository from location http://download.eclipse.org/egit/updates-3.2:
Repository system is offline and no local cache available for
http://download.eclipse.org/egit/updates-3.2 -> [Help 1]
The file that causes this problem is eclipse-sdk-prereqs.target and I've looked in tmp-mvn-repo and it contains the three things listed for that location:  org.eclipse.egit.core, org.eclipse.jgit and javaewah with the correct version of each and a p2artifacts.xml.

I've compared the eclipse-sdk-prereqs.target in R4_4 and R4_3 and the only differences seem to be the version numbers of the units.

Is there a way that I can make the build show where it is actually looking for the repository (I'm already using -X and -e)? The trace suggests it is calling SimpleMetadatRepositoryFactory.getLocalFile so I guess that either it can't find the p2Artifact.xml or it is malformed though it looks the same in R4_4 and R4_3.

Thanks in advance for any suggestions you can offer.

All the best

Phil Mason

The actual build command I have to use is more like this but I don't think the additions should make a difference:

mvn -X -e --offline --toolchains ~/toolchains.xml  -Pbree-libs -Dmaven.repo.local=~/mvn-repo -Declipse.p2.mirrors=false  clean verify  2>&1 | tee build_log.txt

_______________________________________________
cbi-dev mailing list
cbi-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cbi-dev




Back to the top