2

I am using Tycho and Maven to build an eclipse update site containing several plugins. Everything worked happily when I packaged it as an eclipse-update-site, but I'm getting errors now that I've switched to eclipse-repository.

My projects looks like

com.mycompany.plugin/
  src/things.java
  pom.xml

com.mycompany.plugin.feature/
  feature.xml
  pom.xml

com.mycompany.updatesite/
  category.xml (formerly site.xml)
  pom.xml

This page indicates that the maven packaging "eclipse-update-site" is deprecated in favor of "eclipse-repository". Accordingly, I updated my update site's pom.xml to look like (approximately):

<project>
  <tycho.version>0.26.0</tycho.version>
  <groupId>mygroup</groupId>
  <artifactId>artifactId</artifactId>
  <version>1.0.0-SNAPSHOT</version>
    <build>
    <plugins>
      <plugin>
         <groupId>org.eclipse.tycho</groupId>
         <artifactId>tycho-p2-repository-plugin</artifactId>
         <version>${tycho.version}</version>
      </plugin>
    </plugins>
  </build>
  <packaging>eclipse-repository</packaging>
</project>

I also renamed my site.xml file to category.xml as suggested by this post and this post. I did not make any other changes to category.xml (formerly site.xml), so it looks like:

<?xml version="1.0" encoding="UTF-8"?>
<site>
   <feature url="features/com.mycompany.plugin.feature_0.1.0.qualifier.jar" id="com.mycompany.plugin.feature" version="0.1.0.qualifier">
      <category name="com.mycompany"/>
   </feature>
   <category-def name="com.mycompany" label="MyPlugin"/>
</site>

The maven build marches along happily, building all of my plugins and features. When it tries to build the repository, it fails, saying:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-repository-plugin:0.26.0:assemble-repository
(default-assemble-repository) on project com.mycompany.updatesite: Could not assemble p2 repository:
Mirroring failed: No repository found at file:/mypath/com.mycompany.updatesite/target/. -> [Help 1]

Clearly I'm missing something, but I can't figure out what.

Community
  • 1
  • 1
T.D. Smith
  • 984
  • 2
  • 7
  • 22

1 Answers1

0

Which phases of maven are you running?

I encountered the same problem when switching from eclipse-update-site to eclipse-repository and using just the package phase. However, it worked with install.

Or more specifically instead of

mvn clean package

I used

mvn clean install

I hope this helps you too.

Kredon
  • 31
  • 4