-
Notifications
You must be signed in to change notification settings - Fork 189
Frequently asked questions
Often times eclipse.org redirects P2 repository requests to a another P2 mirror repository. This mirror might be broken, unavailable or mirroring might not be desired.
To disable the usage of P2 mirrors and force all downloads to go directly to the specified server specify the following maven command line parameter.
-Dtycho.disableP2Mirrors=true
It is also possible to set this property in a user/global settings.xml file. Here is settings.xml snippet:
<profiles>
...
<profile>
<id>p2</id>
<properties>
<tycho.disableP2Mirrors>true</tycho.disableP2Mirrors>
</properties>
</profile>
</profiles>
<activeProfiles>
...
<activeProfile>p2</activeProfile>
</activeProfiles>
Whether to use proxy or not is environment-specific configuration and as such does not belong in a pom.xml in the source tree.
The documentation is available at:
https://tycho.eclipseprojects.io/doc/latest/
Tycho always ships with latest Eclipse Compiler release by default. If you want you can always use an older (or never) release of Eclipse Compiler with this configuration:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<dependencies>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
<version><!-- Your version here --></version>
</dependency>
</dependencies>
</plugin>
For example you can find all released versions here: https://mvnrepository.com/artifact/org.eclipse.jdt/ecj
Snapshot releases can be found here: https://repo.eclipse.org/content/repositories/eclipse-snapshots/org/eclipse/jdt/ecj
As an alternative you can use javac
as the compiler backend with Tycho:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<compilerId>javac</compilerId>
</configuration>
</plugin>
An old-style update site (containing a site.xml
file) can be converted into a p2 update site in order to use it in a Tycho build in one of the following ways:
-
Mirror (remote or local) old-style update site as p2 update site:
<build> <plugins> <plugin> <groupId>org.eclipse.tycho.extras</groupId> <artifactId>tycho-p2-extras-plugin</artifactId> <!-- use Tycho 3.0.5, as mirroring of old-style update sites is no longer supported since 4.0.0 --> <version>3.0.5</version> <executions> <execution> <id>mirror-update-sites</id> <phase>process-resources</phase> <goals> <goal>mirror</goal> </goals> <configuration> <!-- sources: what to mirror and convert --> <source> <repository> <url>https://zipeditor.sourceforge.net/update</url> </repository> <!-- more update sites... --> </source> <!-- optional: convert only the following install units --> <ius> <iu> <id>zipeditor.feature.group</id> </iu> <!-- more install units... --> </ius> <!-- optional: only latest version --> <latestVersionOnly>true</latestVersionOnly> <!-- output directory: target/reopsitory/ (${project.build.directory}/repository) or specify the output directory as follows: <destination>${project.basedir}/out</destination> --> </configuration> </execution> </executions> </plugin> </plugins> </build>
-
Convert local old-style update site:
<build> <plugins> <plugin> <groupId>org.eclipse.tycho.extras</groupId> <artifactId>tycho-p2-extras-plugin</artifactId> <version>${tycho-version}</version> <executions> <execution> <id>generate-full-metadata</id> <phase>compile</phase> <goals> <goal>publish-features-and-bundles</goal> </goals> <configuration> <!-- input repository: --> <sourceLocation>${project.basedir}/in</sourceLocation> <!-- output repository: target/repository/ or specify the output directory as follows: --> <metadataRepositoryLocation>${project.basedir}/out</metadataRepositoryLocation> <artifactRepositoryLocation>${project.basedir}/out</artifactRepositoryLocation> </configuration> </execution> </executions> </plugin> </plugins> </build>