The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

sdk9.1.1 create rest not use for api

lei_zou
April 27, 2025

jiraSDK 9.11 create jira plugin, change jira.version 10.3.5 but not use

 

<properties>
<jira.version>10.3.5</jira.version>
<amps.version>9.1.1</amps.version>
<plugin.testrunner.version>2.0.9</plugin.testrunner.version>
<atlassian.spring.scanner.version>2.2.4</atlassian.spring.scanner.version>
<!-- This property ensures consistency between the key in atlassian-plugin.xml and the OSGi bundle's key. -->
<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
<!-- TestKit version 6.x for JIRA 6.x -->
<testkit.version>6.3.11</testkit.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- other -->
<lombok.version>1.18.20</lombok.version>
</properties>

 

and xml

<rest name="My Rest Resource" i18n-name-key="my-rest-resource.name" key="my-rest-resource" path="/myrestresource" version="2.0">
<description key="my-rest-resource.description">The My Rest Resource Plugin</description>
</rest>

 

and rest class

@Path("test")
@Consumes({MediaType.APPLICATION_JSON})
@Produces({MediaType.APPLICATION_JSON})
public final class TestController {

@GET
@Path("aa")
public Response getConfig(@Context HttpServletRequest req)
{

return Response.ok().build();
}
}

but 

 all api show 404. api does not exist

 dependecies

  <dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<!-- Add dependency on jira-core if you want access to JIRA implementation classes as well as the sanctioned API. -->
<!-- This is not normally recommended, but may be required eg when migrating a plugin originally developed against JIRA 4.x -->
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-annotation</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
<!-- WIRED TEST RUNNER DEPENDENCIES -->
<dependency>
<groupId>com.atlassian.plugins</groupId>
<artifactId>atlassian-plugins-osgi-testrunner</artifactId>
<version>${plugin.testrunner.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
<!-- <groupId>javax.ws.rs</groupId>-->
<!-- <artifactId>javax.ws.rs-api</artifactId>-->
<!-- <version>2.1.1</version>-->
<!-- <scope>provided</scope>-->
<!-- <groupId>jakarta.ws.rs</groupId>-->
<!-- <artifactId>jakarta.ws.rs-api</artifactId>-->
<!-- <version>3.1.0</version>-->
<!-- <scope>provided</scope>-->
</dependency>
<!-- Uncomment to use TestKit in your project. Details at https://bitbucket.org/atlassian/jira-testkit -->
<!-- You can read more about TestKit at https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Smarter+integration+testing+with+TestKit -->
<!--
<dependency>
<groupId>com.atlassian.jira.tests</groupId>
<artifactId>jira-testkit-client</artifactId>
<version>${testkit.version}</version>
<scope>test</scope>
</dependency>
-->
<!-- other-->
<!-- <dependency>-->
<!-- <groupId>com.atlassian.plugins.rest</groupId>-->
<!-- <artifactId>atlassian-rest-common</artifactId>-->
<!-- <version>1.0.2</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->
<!-- &lt;!&ndash; <dependency>&ndash;&gt;-->
<!-- &lt;!&ndash; <groupId>com.atlassian.sal</groupId>&ndash;&gt;-->
<!-- &lt;!&ndash; <artifactId>sal-api</artifactId>&ndash;&gt;-->
<!-- &lt;!&ndash; <version>2.6.0</version>&ndash;&gt;-->
<!-- &lt;!&ndash; <scope>provided</scope>&ndash;&gt;-->
<!-- &lt;!&ndash; </dependency>&ndash;&gt;-->
<!-- &lt;!&ndash; web 检查用户登录&ndash;&gt;-->
<dependency>
<groupId>com.atlassian.sal</groupId>
<artifactId>sal-api</artifactId>
<version>4.7.0</version>
<scope>provided</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>javax.servlet</groupId>-->
<!-- <artifactId>servlet-api</artifactId>-->
<!-- <version>2.4</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<scope>test</scope>
</dependency>
<!-- user-->
<!--Rest-->
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-plugin</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugins.rest</groupId>
<artifactId>atlassian-rest-common</artifactId>
<!-- <version>${atlassian.rest.common.version}</version>-->
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.atlassian.templaterenderer</groupId>
<artifactId>atlassian-template-renderer-api</artifactId>
<version>4.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugins.rest</groupId>
<artifactId>atlassian-rest-common</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.sal</groupId>
<artifactId>sal-api</artifactId>
<version>2.6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.wink</groupId>
<artifactId>wink-client</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>

</dependencies>

Please help me solve it or provide an example

 

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
lei_zou
April 27, 2025

and this plugin installed jira 8.20.17 and api is ok

DEPLOYMENT TYPE
SERVER
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events