Update reference repository to 2021-03 M2 release.

- Use 4.19 milestones repository in target platform

Change-Id: Ia61520d526e93967ee5ab912ef8d015ef18f9846
Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
1 file changed
tree: 73367c216634730e5cfc5c685e0725e12308d208
  1. antlr/
  2. apache/
  3. args4j/
  4. asm/
  5. assertj/
  6. bouncycastle/
  7. bytebuddy/
  8. commonmark/
  9. cup/
  10. drmaa/
  11. freemarker/
  12. github/
  13. glassfish/
  14. glazedlists/
  15. google/
  16. graphql/
  17. hamcrest/
  18. hsqldb/
  19. icu4j/
  20. immutables/
  21. jackson/
  22. jacoco/
  23. javax/
  24. jaxb/
  25. jcraft/
  26. jini/
  27. jna/
  28. junit/
  29. knowm/
  30. logging/
  31. mockito/
  32. netty/
  33. objenesis/
  34. reactivestreams/
  35. releng/
  36. snakeyaml/
  37. sourceforge/
  38. tukaani/
  39. uom/
  40. xml/
  41. .gitattributes
  42. .gitignore
  43. .project
  44. CONTRIBUTING.md
  45. pom.xml
  46. README.md
README.md

Eclipse Orbit Recipes

This repositories hosts recipes for building OSGi bundles as part of the Eclipse Orbit project. This repository is based on functionality provided by the Eclipse EBR project.

The Very Short Version

See Adding Bundles To Orbit in 5 Minutes as a quick explanation of the contribution process.

Prerequisites

This project uses Maven for assembling of OSGi bundles based on artifacts in Maven Central or any other accessible Maven repository.

  1. Install Java (JDK 8 preferred) and Maven.
  2. Clone this repository and go into the repository root folder. Please ensure you cloned using the Gerrit URL.

How to build all bundles yourself

  1. Clone this repository and go into the repository root folder.
  2. Run the following command to build the OSGi bundle: mvn clean install

This will publish all OSGi bundles produced by the recipes into your local Maven repository. You can consume the bundles directly from Maven in any Tycho build.

Generate p2 repository

  1. Go into the repository root folder.
  2. mvn clean install -f releng/aggregationfeature/pom.xml
  3. mvn clean package -f releng/repository/pom.xml

The repository will be made available as archive in releng/repository/target.

Note, you must build the recipes first and install the result into your local Maven repository. Otherwise the p2 build won't find any bundles.

How to build just a single recipe?

This is not difficult at all. Just change into the directory of the recipe to build and execute Maven from there.

  1. cd recipes/\<path/to/recipe\>
  2. mvn clean package

(To preview local changes, add -DdirtyWorkingTree=warning to ignore uncommitted Git changes - see “How to add recipes” for more details)

The resulting bundle will be available in the recipes target folder.

How to add recipes

Adding recipes to this repository is part of the general process for adding bundles to Orbit. Please read the following additional information first before you proceed.

It‘s important to ensure that the bundle you’re adding has been approved for use in at least one other Eclipse project on IPZilla or ClearlyDefined. In the latter case, please ensure the license is compatible and that the license score is at least 75. See IP Prereq Diligence for further details.

1. Pick a Category

Recipes are organized in folders by category. There is no strict rule on categories, i.e. categories do not map to vendor names by definition. However, it seems logical to select a category name based on some common critaria shared by recipies. Most of the time, “origin” of the 3rd party libraries seems like a good fit. But occasionally, functionality (eg, ‘logging’) is also helpful in order to avoid too fine grained grouping (eg., categories with only two recipies).

In case of doubts/questions, please reach out to the Orbit Committers List. Also, don‘t be afraid of mistakes. It’s all in a single Git repository so re-organization is possible at any time later on.

Note, when creating a new category please create the category pom.xml first before any recipes. Use another category pom.xml as template to inherit the proper Orbit recipe parent pom. This ensure that proper Orbit defaults are used when creating recipes (for example, the bundle vendor is automatically set to “Eclipse Orbit”).

2. Create the recipe

The preferred method for creating recipes is by consuming a Maven artifact. The EBR Maven plug-in can be used to create a recipe including required Eclipse IP information based on data available in Maven artifact poms.

# create the recipe for a specific Maven artifact
# the recipe will be created in a folder named "<symbolicname-of-the-orbit-bundle>_<version>"
mvn ebr:create-recipe -DgroupId=<maven-source-groupId> -DartifactId=<maven-source-artifactId> -Dversion=<maven-source-version> -DbundleSymbolicName=<symbolicname-of-the-orbit-bundle>

# modify recipe pom and osgi.bnd to suit the needs of the bundle
cd <new-recipe-folder>
$EDITOR pom.xml
$EDITOR osgi.bnd

# do a test build (this will create a default ip_log.xml)
# (note the -DirtyWorkingTree=ignore to ignore uncommitted Git changes for now)
mvn -U clean package -DdirtyWorkingTree=warning

# hidden gem: automatically create a CQ for an Eclipse project
# (use carefully, creates the CQ if none is referenced in the ip_log.xml file)
# mvn -V clean package -DsubmitCqsToProject=<Eclipse.project.id> -DcqCryptography=<Yes|No|Unknown|Explanation> -DdirtyWorkingTree=warning
# (once the CQ is created, source to upload can be found in 'target/sources-for-eclipse-ipzilla')
# (after uploading the source, wait for approval)

# enter any non-PB CQ number into the IP log and add any missing information (your name, e-mail etc.)
# You may also specify a ClearlyDefined URL (if present) by replacing the <ipzilla bug_id=""/> with <clearlydefined url="https://clearlydefined.io/definitions/maven/mavencentral/com.example.group/artifact/x.y.z" (of course replacing the URL with the appropriate one for the bundle you're adding)

$EDITOR src/eclipse/ip_log.xml

# review the generated about files
ls -la src/main/resources/about_files
cat src/main/resources/about.html

# add new recipe to category pom
$EDITOR ../pom.xml

# update the build feature with your bundle
$EDITOR ../../releng/aggregationfeature/feature.xml

# add, commit the recipe to Git and push to Gerrit for review
git add .; git commit -m "Added org.example.foo 1.2.3"
# NOTE: Please ensure you push using the following command so that you don't bypass the code review:
git push origin HEAD:refs/for/master

3. Troubleshooting

If you are having trouble with the build after submitting your change, this is typically because there is a missing dependency. It is ideal to have all transitive dependencies of the library you‘re adding available as OSGi bundles in Orbit, though there may be exceptions to this. The dependency metadata can all be customized using the osgi.bnd file. You can discover the dependencies using mvn dependency:tree under the project folder of the library you’re adding.