I am new to p2 repo and Tycho, so maybe I am just missing some simple step.
I want to mirror a knime repository and use it in my build with maven/thyco.
To mirror the repository I used the following commands:
<eclipse-rcp-installation>/eclipse -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source <metadata-repo-url> -destination <dest>
<eclipse-rcp-installation>/eclipse -nosplash -verbose -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source <metadata-repo-url> -destination <dest>
I did it for the https://update.knime.com/analytics-platform/4.7
, https://update.knime.com/community-contributions/trusted/4.7
and https://update.knime.com/partner/4.7
.
I think everything is right, I got the binary
, features
and plugins
folders as well as artifacts.jar
and content.jar
(that contain the xml).
First of all (even if this would be another question), I am a bit confused about the binary
folder. Using other commands, as for example the one described here, the binary
folder is skipped. I also did not found any reference to the binary
folder in the documentation, usually they speak only about features
and plugins
.
Going back to the mirroring, I read that Tycho does not support local repositories, so I run a little http server with the command python3 -m http.server --bind 127.0.0.1 808x
with ports 8080, 8081 and 8082, one for each repo.
Then, I inserted my repo in the pom file
<repositories>
<repository>
<id>knime.base.p2</id>
<layout>p2</layout>
<url>http://localhost:8080</url>
</repository>
<repository>
<id>knime.community.p2</id>
<layout>p2</layout>
<url>http://localhost:8081</url>
</repository>
<repository>
<id>knime.partner.p2</id>
<layout>p2</layout>
<url>http://localhost:8082</url>
</repository>
</repositories>
(of course if I use the real repo instead of localhost, the build works as expected).
I did not find any error in the log file related to the repositories, but then I found a debug line like the following:
[DEBUG] Repositories (dependencies): [knime.base.p2 (http://localhost:8080, p2, disabled), knime.community.p2 (http://localhost:8081, p2, disabled), knime.partner.p2 (http://localhost:8082, p2, disabled), central (https://repo.maven.apache.org/maven2, default, releases)]
I guess, this is the problem. The repositories are disabled. Anyway, I see some requests in my python server, so somehow Tycho is getting some info from the server.
How can I fix this problem? Am I missing some step?