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>
oberlies
  • 11,503
  • 4
  • 63
  • 110
Mirco
  • 2,940
  • 5
  • 34
  • 57

1 Answers1

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)

jsievers
  • 1,853
  • 10
  • 13
  • 1
    Is there any way to make it behave like snapshots? Check 1x per 24 hour period – Peter Kahn Apr 24 '13 at 19:56
  • 2
    --offline doesn't appear to prevent tycho from checking with remote repositories. Are you sure this worked? – Peter Kahn Apr 24 '13 at 20:35
  • 1
    What you want is the -o option. man mvn -o or --offline. Note the -- – Ajax Jul 02 '13 at 10:03
  • Offline mode did not work with **composite repositories** due to [Bug 461787](https://bugs.eclipse.org/bugs/show_bug.cgi?id=461787), but that has been **fixed** with Tycho **version 0.25**. – Andreas Sewe Aug 11 '16 at 16:16