Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Offlining maven: how to set up the p2 cache?

there was an offline bug [1] but it should be fixed in Tycho 0.25.0-SNAPSHOT.
You need to prime the local maven repo by doing an online build first of course.

Regards,
Jan

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=474885
[2] https://wiki.eclipse.org/Tycho/Release_Notes/0.25




On 29/01/16 01:11, "Jason van Zyl" <jason@xxxxxxxxx> wrote:

>You are attempting to do a Tycho build which to my knowledge will not work in offline mode. You can do as Ron suggests and use a repository manager, or you might want to ask on the Tycho users list for possible work arounds:
>
>https://dev.eclipse.org/mailman/listinfo/tycho-user
>
>> On Jan 28, 2016, at 3:54 PM, Thibault, Daniel <Daniel.Thibault@xxxxxxxxxxxxxxx> wrote:
>> 
>>   I have these two projects that need to be compiled offline.  I thought I would first compile them on-line and then transplant the ~/.m2/repository to the offline system.  However, something isn't quite right.  I'm using Apache Maven 3.3.9 and Java 1.8.0_45.
>> 
>>   The two projects (when run with 'mvn --offline') both give a failure along the lines of:
>> 
>> [INFO] Adding repository http://download.eclipse.org/tools/cdt/releases/8.8
>> [ERROR] Failed to resolve target definition <...>.target: Failed to load p2 metadata repository from location http://download.eclipse.org/tools/cdt/releases/8.8/: Repository system is offline and no local cache available for http://download.eclipse.org/tools/cdt/releases/8.8 -> [Help 1]
>> 
>>   Isn't the p2 cache in ~/.m2/repository/p2 ?
>> 
>>   Strangely, the two projects behave differently.
>> 
>>   For one, building offline fails as described above while building online fetches 15 compositeContent.xml, content.jar, content.xml.xz and p2.index from download.eclipse.org before using the cache and completing normally.
>> 
>>   For the other, the first offline run caused a Java exception (same error as above, somehow not handled).  I then ran it online, successfully (same behaviour as the other project).  But running it offline now succeeds as well!
>> 
>>   What is the established procedure for setting up the m2 and p2 caches in order to ensure maven builds succeed offline?
>> 
>> Daniel U. Thibault, M.Sc.²
>> 
>> Informaticien scientifique, CME-PSC, Centre de recherches de Valcartier
>> Recherche et développement pour la défense Canada / Gouvernement du Canada
>> daniel.thibault@xxxxxxxxxxxxxxx<mailto:daniel.thibault@xxxxxxxxxxxxxxx> / Tél: 418-844-4000x4245 Téléc: 418-844-4538
>> daniel.thibault@xxxxxxxxxxxx<mailto:daniel.thibault@xxxxxxxxxxxx> / Tél: 418-844-4000x4245 Téléc: 418-844-4538
>> 
>> Computer Scientist, MCCS-SPC, Valcartier Research Centre
>> Defence Research and Development Canada / Government of Canada
>> daniel.thibault@xxxxxxxxxxxxxxx<mailto:daniel.thibault@xxxxxxxxxxxxxxx> / Tel: 418-844-4000x4245 Fax: 418-844-4538
>> daniel.thibault@xxxxxxxxxxxx<mailto:daniel.thibault@xxxxxxxxxxxx> / Tel: 418-844-4000x4245 Fax: 418-844-4538
>> 
>> DRDC is an agency of the Department of National Defence / RDDC est une agence du ministère de la Défense nationale
>> 
>
>Thanks,
>
>Jason
>
>----------------------------------------------------------
>Jason van Zyl
>Founder, Takari and Apache Maven
>http://twitter.com/jvanzyl
>http://twitter.com/takari_io
>---------------------------------------------------------
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>

Back to the top