Tycho downloads p2.indexes on every build
Asked Answered
S

1

10

I'm building an RCP and several other plug-ins with Maven & Tycho. This works very fine, unless one issue:

On every(!) build, Tycho loads all needed eclipse librarys, even when the where already downloaded 10 seconds ago. Aren't they saved automatically in the local repository, or am I missing some configuration? all p2.indexes. But this is also annoying. Can I turn this off, so that it'll only check once a week?

  <properties>
    <tycho-version>0.15.0</tycho-version>
  </properties>

  <repositories>
   <repository>
      <id>eclipse-indigo</id>
      <layout>p2</layout>
      <url>http://download.eclipse.org/releases/indigo</url>
   </repository>
  </repositories>

  <build>
    <plugins>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-maven-plugin</artifactId>
        <version>${tycho-version}</version>
        <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>
Saccular answered 30/11, 2012 at 14:37 Comment(0)
M
6

p2 artifacts as well as metadata files like content.jar and artifacts.jar are cached. p2 will do a timestamp comparison check only on each build (using HTTP HEAD) to check if the local cache is outdated.

If you want to avoid this, use maven offline mode (CLI option --offline)

Malley answered 3/12, 2012 at 10:0 Comment(4)
Is there any way to make it behave like snapshots? Check 1x per 24 hour periodMangosteen
--offline doesn't appear to prevent tycho from checking with remote repositories. Are you sure this worked?Mangosteen
What you want is the -o option. man mvn -o or --offline. Note the --Overstreet
Offline mode did not work with composite repositories due to Bug 461787, but that has been fixed with Tycho version 0.25.Blain

© 2022 - 2024 — McMap. All rights reserved.