Skip to content

Instantly share code, notes, and snippets.

@nickname55
nickname55 / gist-maven-cached-failure.md
Created January 27, 2026 07:54
Maven Cached Resolution Failure - How to Fix

Maven Cached Resolution Failure

Problem

Maven build fails with an error like:

org.jenkins-ci:jenkins:pom:1.39 was not found in https://packages.atlassian.com/maven-public/
during a previous attempt. This failure was cached in the local repository and resolution
is not reattempted until the update interval of maven-atlassian-all-public has elapsed
@nickname55
nickname55 / gist-jenkins-dependency-issue.md
Created January 27, 2026 07:54
Missing Jenkins Repository for Jira 9.12.x Plugin Build

Missing Jenkins Repository for Jira 9.12.x Plugin Build

Problem

When building an Atlassian Jira plugin against Jira 9.12.x, Maven fails with:

Failed to read artifact descriptor for commons-httpclient:commons-httpclient:jar:3.1-jenkins-3
Caused by: The following artifacts could not be resolved: org.jenkins-ci:jenkins:pom:1.39
@nickname55
nickname55 / gist-maven-mirror-issue.md
Created January 27, 2026 07:54
Maven Mirror Configuration Issue with Atlassian Plugin SDK

Maven Mirror Configuration Issue with Atlassian Plugin SDK

Problem

When building an Atlassian Jira plugin, Maven fails with the following error:

Artifact com.atlassian.pom:public-pom:pom:5.0.21 is present in the local repository,
but cached from a remote repository ID that is unavailable in current build context,
verifying that is downloadable from [maven-central (https://repo.maven.apache.org/maven2, default, releases+snapshots)]
@nickname55
nickname55 / Test.java
Created April 14, 2025 20:34
Minimal Java client for Jira plugin upload via UPM + Apache HttpClient)
package pmpshk.atlassian.upm;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.impl.auth.BasicScheme;
import org.apache.http.impl.client.CloseableHttpClient;
@nickname55
nickname55 / git-clear-cache.sh
Created November 13, 2022 12:50 — forked from joemaffia/git-clear-cache.sh
Clear git cache
git rm -r --cached .
git add .
git commit -m 'git cache cleared'
git push

JQL Syntax for the Impatient

There are a few JQL syntax bits to get you started:

  • AND --- allows you to add qualifiers to a list
  • != Thing --- target one thing
  • is in (List, Of, Things) --- target a bunch of things (Done, Closed, Resolved) typically
  • not in (List, of, Things) --- do not include a bunch of things
  • -1w --- relative time. You can also use -1d for day
  • "2015/3/15" --- specific dates
@nickname55
nickname55 / 1.http
Last active October 9, 2022 11:57
flowXo api. get messages
GET https://flowxo.com/api/conversations/615c6b5e14fc0900a6556061%2Fc%2FMwvFx5eJp/messages?skip=0&limit=1000
Accept: application/json
Authorization: Bearer *****
import com.atlassian.jira.bc.issue.search.SearchService
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.jql.builder.JqlQueryBuilder
import com.atlassian.jira.util.thread.JiraThreadLocalUtils
def searchService = ComponentAccessor.getComponent(SearchService)
def customFieldManager = ComponentAccessor.customFieldManager
def storyPointsCf = customFieldManager.getCustomFieldObjectByName('Story Points')
def issue = event.issue
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.ModifiedValue
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder
import com.atlassian.jira.component.ComponentAccessor
def issue = event.issue as Issue
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def tgtField = customFieldManager.getCustomFieldObjects(event.issue).find {it.name == "My CustomField"}
def changeHolder = new DefaultIssueChangeHolder()
tgtField.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(tgtField), "myvalue"),changeHolder)