13

I am trying to build a p2 repository using Tycho and the tycho-p2-repository-plugin in an eclipse-repository packaging type. When I run the build, it is giving me the following exception:

Failed to execute goal org.eclipse.tycho:tycho-p2-repository-plugin:0.13.0:assemble-repository (default-assemble-repository) on project com.mycompany: No content specified for p2 repository

Can someone point me to the cause of this problem?

oberlies
  • 11,503
  • 4
  • 63
  • 110
ezcode
  • 271
  • 4
  • 14
  • Note that you don't need to configure the `tycho-p2-reposiory-plugin` explicitly. It is part of the default lifecycle of `eclipse-repository`. – oberlies Sep 19 '12 at 14:54

2 Answers2

19

You need either of the following files in the root of the eclipse-repository project:

  • A category.xml files with at least one feature referenced in it
  • A *.product file

These files define what should be included in the p2 repository, so if there is none of these, the p2 repository would be empty. This is probably not what you wanted, so Tycho fails the build. (Admittedly, the error message could be more helpful...)

oberlies
  • 11,503
  • 4
  • 63
  • 110
  • This was the exact fix that I did, where in after adding a category.xml file, I was able to generate a repo. Thanks! – ezcode Jul 23 '12 at 05:32
  • 6
    And a little note for the starters: by default, for an update site project Eclipse creates the `site.xml` file which is of same structure as `category.xml`. You can just rename it to `category.xml` and proceed with the tycho build. – berezovskyi Jul 17 '14 at 13:08
0

I had this problem too, unfortunately it was one of many problems and I do not remember which thing I did to fix it.

Make sure you are using 0.14.1 of tycho.

My working version is a very empty pom.xml, much like Packaging Types

I have not needed to configure the eclipse-repository via tycho-p2-repository-plugin.

Do you have a valid target definition defined in your reactor build somewhere? Is your *.product file valid? The product file needs to be in the same directory as your eclipse-repository pom, I think it gets found via black magic.

Also make sure your product feature is separate from your eclipse-repository. under PDE builds you could have the *.product file and the with the feature that is the root for your product.

Bae
  • 7,516
  • 5
  • 36
  • 42