P2 transparent mirroring

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

P2 transparent mirroring

Benson Margulies
Other than nexus pro, is there a way to make a local copy of one of
the main eclipse repos, but leave the POM pointing at the real one,
but redirect tycho to the mirror?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: P2 transparent mirroring

Beat Strasser
> Other than nexus pro, is there a way to make a local copy of one of
> the main eclipse repos, but leave the POM pointing at the real one,
> but redirect tycho to the mirror?

You could install a (transparent) http proxy (e.g. squid).

My second proposal turned out to be non functional: mirror the p2 repo
using the P2 mirror application and setting a mirror in
~/.m2/settings.xml for the repo id configured in the pom.

Tycho doesn't consider <mirror/> elements in the settings:
https://issues.sonatype.org/browse/TYCHO-272

--
Beat Strasser
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: P2 transparent mirroring

drsgoodall
I have this working in my projects;

You can use the p2 mirror application in eclipse to create a local mirror

E.g. on windows I have a batch file containing;

set ECLIPSE_LAUNCHER=C:/eclipse/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
set REMOTE=http://download.eclipse.org/releases/helios
set LOCAL=file://c:/mirrors/helios

java -jar %ECLIPSE_LAUNCHER% -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source %REMOTE% -destination %LOCAL%
java -jar %ECLIPSE_LAUNCHER% -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source %REMOTE% -destination %LOCAL

This will create a p2 mirror in c:\mirror\helios. This also appears to be able to mirror eclipse-updates sites as p2 sites. This script can be re-run periodically to download further updates.


In my project pom I have the following repository;

  <repository>
      <id>helios</id>
      <layout>p2</layout>
      <url>http://download.eclipse.org/releases/helios/</url>
    </repository>


Then in my .m2 settings.xml I have the following to define the mirror;

    <mirror>
      <id>helios-local</id>
      <mirrorOf>helios</mirrorOf>
      <url>file:///c:/mirrors/helios</url>
      <layout>p2</layout>
      <mirrorOfLayouts>p2</mirrorOfLayouts>
    </mirror>


Regards,

Simon


Beat Strasser wrote
> Other than nexus pro, is there a way to make a local copy of one of
> the main eclipse repos, but leave the POM pointing at the real one,
> but redirect tycho to the mirror?

You could install a (transparent) http proxy (e.g. squid).

My second proposal turned out to be non functional: mirror the p2 repo
using the P2 mirror application and setting a mirror in
~/.m2/settings.xml for the repo id configured in the pom.

Tycho doesn't consider <mirror/> elements in the settings:
https://issues.sonatype.org/browse/TYCHO-272

--
Beat Strasser
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: P2 transparent mirroring

Beat Strasser
> I have this working in my projects;

Cool, works for me now. I didn't know of the <mirrorOfLayouts/> tag. So,
I can build offline again with Tycho 0.10. :)

Maybe TYCHO-272 is only about target definition files.

--
Beat Strasser
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: P2 transparent mirroring

Benson Margulies
It doesn't work for me with galileo. It mirrored it, I added p2
metadata to the mirror, and

bundle org.eclipse.emf.common 0.0.0

comes up not found. I guess I could move my plugins to be built
against helios instead.


On Thu, Dec 2, 2010 at 7:18 AM, Beat Strasser
<[hidden email]> wrote:

>> I have this working in my projects;
>
> Cool, works for me now. I didn't know of the <mirrorOfLayouts/> tag. So, I
> can build offline again with Tycho 0.10. :)
>
> Maybe TYCHO-272 is only about target definition files.
>
> --
> Beat Strasser
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: P2 transparent mirroring

Max Rydahl Andersen
In reply to this post by Beat Strasser

On Dec 2, 2010, at 13:18, Beat Strasser wrote:

>> I have this working in my projects;
>
> Cool, works for me now. I didn't know of the <mirrorOfLayouts/> tag. So, I can build offline again with Tycho 0.10. :)
>
> Maybe TYCHO-272 is only about target definition files.

so I just tried the  <mirrorOfLayouts>p2</mirrorOfLayouts> approach and it seems to work for target platform -
when using <mirrofOf>*</mirrorOf> or <mirrorOf>http://<specificurl></mirrorOf>

What part failed for you ?

/max



 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: P2 transparent mirroring

Benson Margulies
I told you. It claims the emf bundle wasn't there.

On Tue, Dec 7, 2010 at 4:45 PM, Max Rydahl Andersen
<[hidden email]> wrote:

>
> On Dec 2, 2010, at 13:18, Beat Strasser wrote:
>
>>> I have this working in my projects;
>>
>> Cool, works for me now. I didn't know of the <mirrorOfLayouts/> tag. So, I can build offline again with Tycho 0.10. :)
>>
>> Maybe TYCHO-272 is only about target definition files.
>
> so I just tried the  <mirrorOfLayouts>p2</mirrorOfLayouts> approach and it seems to work for target platform -
> when using <mirrofOf>*</mirrorOf> or <mirrorOf>http://<specificurl></mirrorOf>
>
> What part failed for you ?
>
> /max
>
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: P2 transparent mirroring

Max Rydahl Andersen
okey - haven't seen such troubles yet.

/max

On Dec 7, 2010, at 23:17, Benson Margulies wrote:

> I told you. It claims the emf bundle wasn't there.
>
> On Tue, Dec 7, 2010 at 4:45 PM, Max Rydahl Andersen
> <[hidden email]> wrote:
>>
>> On Dec 2, 2010, at 13:18, Beat Strasser wrote:
>>
>>>> I have this working in my projects;
>>>
>>> Cool, works for me now. I didn't know of the <mirrorOfLayouts/> tag. So, I can build offline again with Tycho 0.10. :)
>>>
>>> Maybe TYCHO-272 is only about target definition files.
>>
>> so I just tried the  <mirrorOfLayouts>p2</mirrorOfLayouts> approach and it seems to work for target platform -
>> when using <mirrofOf>*</mirrorOf> or <mirrorOf>http://<specificurl></mirrorOf>
>>
>> What part failed for you ?
>>
>> /max
>>
>>
>>
>>

Loading...