Contributions

Contributors who would like host their java libraries in opentracing-contrib organization should abide following rules:

Choosing artifactId and groupId

  1. <dependency>
  2. <groupId>io.opentracing.contrib</groupId>
  3. <artifactId>opentracing-XXX</artifactId>
  4. </dependency>
  • XXX - stands for a repository name without java prefix

Release configuration

We encourage you to use the same release process as for opentracing-api artifact. General release process is described in opentracing-java/RELEASE.md. Release is done by travis when pushing an appropriate tag to the upstream repository (release-0.0.1).

Configuration is done in opentracing-java/pom.xml. It depends on on .settings.xml, .travis.yml and travis/publish.sh. Note that scripts are using maven wrapper ./mvnw to pin a consistent version. Wrapper can be generated by mvn -N io.takari:maven:wrapper -Dmaven=3.3.9. This adds a jar file to the repository. Make sure it is not ignored by .gitignore.

pom.xml has to align with Sonatype requirements and use following configuration:

  1. <distributionManagement>
  2. <repository>
  3. <id>bintray</id>
  4. <url>https://api.bintray.com/maven/opentracing/maven/XXX/;publish=1</url> <!-- XXX - maven package name in Bintray -->
  5. </repository>
  6. <snapshotRepository>
  7. <id>jfrog-snapshots</id>
  8. <url>http://oss.jfrog.org/artifactory/oss-snapshot-local</url>
  9. </snapshotRepository>
  10. </distributionManagement>
  11. <build>
  12. <plugins>
  13. <plugin>
  14. <artifactId>maven-release-plugin</artifactId>
  15. <configuration>
  16. <useReleaseProfile>false</useReleaseProfile>
  17. <releaseProfiles>release</releaseProfiles> <!-- attaches javadocs and sources -->
  18. <autoVersionSubmodules>true</autoVersionSubmodules>
  19. <tagNameFormat>@{project.version}</tagNameFormat>
  20. </configuration>
  21. </plugin>
  22. <plugin>
  23. <groupId>io.zipkin.centralsync-maven-plugin</groupId>
  24. <artifactId>centralsync-maven-plugin</artifactId>
  25. <configuration>
  26. <subject>opentracing</subject>
  27. <repo>maven</repo>
  28. <packageName>XXX</packageName> <!-- XXX - maven package name in Bintray -->
  29. </configuration>
  30. </plugin>
  31. </plugins>
  32. </build>
  33. <profiles>
  34. <profile>
  35. <id>release</id>
  36. <build>
  37. <plugins>
  38. <!-- Creates source jar -->
  39. <plugin>
  40. <artifactId>maven-source-plugin</artifactId>
  41. <executions>
  42. <execution>
  43. <id>attach-sources</id>
  44. <goals>
  45. <goal>jar</goal>
  46. </goals>
  47. </execution>
  48. </executions>
  49. </plugin>
  50. <!-- Creates javadoc jar -->
  51. <plugin>
  52. <artifactId>maven-javadoc-plugin</artifactId>
  53. <configuration>
  54. <failOnError>false</failOnError>
  55. </configuration>
  56. <executions>
  57. <execution>
  58. <id>attach-javadocs</id>
  59. <goals>
  60. <goal>jar</goal>
  61. </goals>
  62. <phase>package</phase>
  63. </execution>
  64. </executions>
  65. </plugin>
  66. </plugins>
  67. </build>
  68. </profile>
  69. </profiles>
  • XXX - stands for maven package name in Bintray. It can be equal to the repository name or artifactId. We encourage you to create it in Bintray UI before the first release.

Please submit this configuration in an individual pull request, to see that everything is properly configured.

Release rights

For a successful release several access rights are needed:

  1. Bintray - register and request access directly in the organization; ping @bhs on our gitter channel to speed up the process
  2. Sonatype - request access directly in the issue

These need to be re-encrypted and added to .travis.yml.

Sync to JCenter (maven central)

By default package is not published to maven central. To be synced it needs to be included in JCenter repository. This has to be done manually in Bintray UI after the first release. On following releases this is done automatically by the centralsync-maven-plugin.