Through the following topics, you can learn how to access/use the Application Programmatic Interface (API) of the OSLC Connect for Jira plug-in from other Jira plug-ins.
First of all, you need to make sure that the OSLC Connect for Jira classes are visible to your plug-in. To do so:
pom.xml
file of your plug-in:<repositories> <repository> <id>lyo-releases</id> <url>https://repo.eclipse.org/content/repositories/lyo-releases/</url> </repository> </repositories>
x.y.z
with the right version):
atlas-mvn install:install-file \
-Dfile=<path-to-file> \
-DgroupId=com.sodius.oslc \
-DartifactId=sodius-oslc-jira \
-Dversion=x.y.z
\
-Dpackaging=jar \
-DgeneratePom=true
pom.xml
file of your plug-in (notice the scope of all of them is provided
- don't forget to replace x.y.z
with the right version):<dependency> <groupId>com.sodius.oslc</groupId> <artifactId>sodius-oslc-jira</artifactId> <version>x.y.z</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.eclipse.lyo.oslc4j.core</groupId> <artifactId>oslc4j-core</artifactId> <version>4.1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>net.oauth.core</groupId> <artifactId>oauth-httpclient4</artifactId> <version>20090913</version> <scope>provided</scope> </dependency>
Next, you can import the OSLC Connect for Jira API classes into your plug-in's components to start using them.