Hi,
I followed Part 1 and Part 2 to create my custom plugin for scriptrunner scripts and it was working great until migrating to Jira 8.2.3. But after migration, I have updated my AMPS version to 8.0.0.
The maven-jira-plugin has been changed to jira-maven-plugin in AMPS from v8.0.0 and later.
Now when I build my custom Scriptrunner plugin, the parent pom is referring to the earlier artifacts of jira-maven-plugin and so the build is failing with the below error (maven-jira-plugin:8.0.2 or one of its dependencies could not be resolved)
[INFO] Scanning for projects...
[WARNING] The POM for com.atlassian.maven.plugins:maven-jira-plugin:jar:8.0.2
is missing, no dependency information available
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension:
Plugin com.atlassian.maven.plugins:maven-jira-plugin:8.0.2
or one of its dependencies could not be resolved:
Failure to find com.atlassian.maven.plugins:maven-jira-plugin:jar:8.0.2
in https://maven.atlassian.com/repository/public was cached in the
local repository, resolution will not be reattempted until the update
interval of atlassian-public has elapsed or updates are forced @
The parent pom which I am using is
<parent>
<groupId>com.adaptavist.pom</groupId>
<artifactId>scriptrunner-jira-standard</artifactId>
<version>13</version>
<relativePath />
</parent>
The jira-maven-plugin which I am using is
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>jira-maven-plugin</artifactId>
<version>8.0.0</version>
<extensions>true</extensions>
<configuration>
<jvmArgs>-Xms512m -Xmx1g -XX:MaxPermSize=1g -XX:-UseGCOverheadLimit
-server</jvmArgs>
<productVersion>${jira.version}</productVersion>
<productDataVersion>${jira.version}</productDataVersion>
</configuration>
Could you please throw some light on this and suggest a solution? Thanks in advance!
Thanks!
Kumar
Now I am able to build the custom plugin jar with my scriptrunner scripts. But now, the paths of these scripts are not able to detect in Workflow validators/conditions/postfunctions. I get the error "path not found".
Here's my pom
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.scriptrunner</groupId>
<artifactId>example-scriptrunner-plugin</artifactId>
<version>1.2.0-SNAPSHOT</version>
<organization>
<name>Example</name>
<url>http://www.example.com/</url>
</organization>
<!-- <packaging>atlassian-plugin</packaging> -->
<name>example-scriptrunner-plugin</name>
<description>This is the com.example.scriptrunner:example-scriptrunner-plugin plugin for Atlassian JIRA.</description>
<scm>
<developerConnection>scm:git:ssh://git@stash.adaptavist.com:7999/sr/scriptrunner-samples.git</developerConnection>
<tag>HEAD</tag>
</scm>
<dependencies>
<dependency>
<groupId>com.onresolve.jira.groovy</groupId>
<artifactId>groovyrunner</artifactId>
<version>5.5.9.1-jira8</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.onresolve.scriptrunner.platform</groupId>
<artifactId>scriptrunner-test-libraries-jira</artifactId>
</exclusion>
<exclusion>
<groupId>jndi</groupId>
<artifactId>jndi</artifactId>
</exclusion>
<exclusion>
<groupId>jta</groupId>
<artifactId>jta</artifactId>
</exclusion>
<exclusion>
<groupId>is.origo.jira</groupId>
<artifactId>tempo-plugin</artifactId>
</exclusion>
<exclusion>
<groupId>com.tempoplugin</groupId>
<artifactId>tempo-core</artifactId>
</exclusion>
<exclusion>
<groupId>groovyrunner</groupId>
<artifactId>test</artifactId>
</exclusion>
<exclusion>
<groupId>com.atlassian.plugin.automation</groupId>
<artifactId>automation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>5.1.5.RELEASE</version>
<scope>provided</scope>
</dependency>
<!-- Common Atlassian libraries -->
<dependency>
<groupId>com.atlassian.sal</groupId>
<artifactId>sal-api</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>jira-maven-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${jira.version}</productVersion>
<productDataVersion>${jira.version}</productDataVersion>
<jvmArgs>-Xms512M -Xmx1g</jvmArgs>
<enableQuickReload>true</enableQuickReload>
<enableFastdev>false</enableFastdev>
<applications>
<application>
<applicationKey>jira-software</applicationKey>
<version>${jira.version}</version>
</application>
</applications>
<instructions>
<Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
<Import-Package>
org.springframework.osgi.*;resolution:="optional",
org.eclipse.gemini.blueprint.*;resolution:="optional",
*
</Import-Package>
<Spring-Context>*</Spring-Context>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<goals>
<goal>addSources</goal>
</goals>
</execution>
</executions>
<configuration>
<sources>
<source>
<directory>${project.basedir}/src/main/groovy</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</source>
<source>
<directory>${project.basedir}/src/main/resources</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</source>
</sources>
<testSources>
<testSource>
<directory>${project.basedir}/src/test/groovy</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</testSource>
<testSource>
<directory>${project.basedir}/src/test/resources</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</testSource>
</testSources>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.version}
</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<properties>
<jira.version>8.2.4</jira.version>
<amps.version>8.0.2</amps.version>
<quick.reload.version>3.0.0</quick.reload.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.test.skip>true</maven.test.skip>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<atlassian.spring.scanner.version>2.1.10</atlassian.spring.scanner.version>
<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
<java.version>1.8</java.version>
<groovy.version>2.4.15</groovy.version>
</properties>
<repositories>
<!-- This is required to find the parent pom and ScriptRunner dependencies -->
<repository>
<id>adaptavist-external</id>
<url>https://nexus.adaptavist.com/content/repositories/external</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
</releases>
</repository>
</repositories>
</project>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.