Confluence is an enterprise-class Wiki.

Configuring the Development Environment

CentOS7 + VSCode

Its installation

Sudo yum install -y java-1.8.0-openJDK java-1.8.0-openjdk-develConfigure environment variables (vi /etc/profile)
exportJAVA_HOME = / usr/lib/JVM/Java -- 1.8.0 comes with itsexport CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

Copy the code

VSCode requires Java 11

sudo yum install -y java-11-openjdk java-11-openjdk-devel

Copy the code

Configuration (settings.json)

"java.configuration.runtimes": [{"name": "Its - 1.8.0 comes with"."path": "/ usr/lib/JVM/Java -- 1.8.0 comes with its"."default": true}, {"name": "OpenJDK-11"."path": "/usr/lib/jvm/java-11-openjdk",},]Copy the code

The installationatlassian-plugin-sdk

Creating a source file

sudo vi /etc/yum.repos.d/artifactory.repo

Copy the code

Set the source file content

[Artifactory]
name=Artifactory
baseurl=https://packages.atlassian.com/yum/atlassian-sdk-rpm/
enabled=1
gpgcheck=0

Copy the code

Start the installation

sudo yum clean all
sudo yum updateinfo metadata
sudo yum install atlassian-plugin-sdk

Copy the code

Check the installation

atlas-version

# Output contentATLAS Home: /usr/share/ atlassian-plugin-sdK-8.0.7 ATLAS Home: /usr/share/ atlassian-plugin-sdK-8.0.7 ATLAS Scripts: The/usr/share/atlassian - plugin - SDK - 8.0.7 / bin ATLAS Maven Home: /usr/share/atlassian-plugin-sdK-8.0.7 /apache-maven-3.5.4 AMPS Version: 8.0.0 -------- Executing: The/usr/share/atlassian - plugin - SDK - 8.0.7 / apache maven - 3.5.4 / bin/MVN - version - gs /usr/share/ atlassian-plugin-sdK-8.0.7 /apache-maven-3.5.4/conf/settings. XML OpenJDK 64-bit Server VM Warning: ignoring option MaxPermSize=256M; support was removedin8.0 the Apache Maven 3.5.4 (1 edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-18T02:33:14+08:00) Maven HOME: /usr/share/ atlassian-plugin-sdK-8.0.7 /apache-maven-3.5.4 Java version: 1.8.0_272, Vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-1.8.0-openJDK-1.8.0.272.b10-1.el7_9.x86_64 / JRE Default locale: en_US, platform encoding: UTF-8 OS name:"linux", version: "3.10.0-1062.12.1. El7. X86_64", arch: "amd64", family: "unix"

Copy the code

Start the project

Initialize the project

atlas-create-jira-plugin

# Input content
Define value for groupId: : com.atlassian.tutorial
Define value for artifactId: : myPlugin
Define value forVersion: 1.0.0-SNAPSHOT: : 1.0.0-SNAPSHOT Define valuefor package: com.atlassian.tutorial: : com.atlassian.tutorial.myPlugin

# Confirm content
Confirm properties configuration:
groupId: com.atlassian.tutorial
artifactId: myPlugin
version: 1.0.0-SNAPSHOT
package: com.atlassian.tutorial.myPlugin
Y: : Y

Copy the code

The directory structure

. ├ ─ ─ LICENSE ├ ─ ─ the README ├ ─ ─ pom. The XML └ ─ ─ the SRC ├ ─ ─ the main │ ├ ─ ─ Java │ │ └ ─ ─ com │ │ └ ─ ─ atlassian │ │ └ ─ ─ tutorial │ │ └ ─ ─ MyPlugin │ │ ├ ─ ─ API │ │ │ └ ─ ─ MyPluginComponent. Java │ │ └ ─ ─ impl │ │ └ ─ ─ MyPluginComponentImpl. Java │ └ ─ ─ resources │ ├ ─ ─ meta-inf │ │ └ ─ ─ spring │ │ └ ─ ─ the plugin - context. XML │ ├ ─ ─ atlassian - plugin. XML │ ├ ─ ─ CSS │ │ └ ─ ─ myPlugin. CSS │ ├ ─ ─ │ │ ├─ ├─ ├─ ├─ ├─ ├─ │ ├─ ├─ │ ├─ ├─ Java │ ├ ─ ─ it │ │ └ ─ ─ com │ │ └ ─ ─ atlassian │ │ └ ─ ─ tutorial │ │ └ ─ ─ myPlugin │ │ └ ─ ─ MyComponentWiredTest. Java │ └ ─ ─ ut │ ├ ─ unteached, unteached, unteached, unteached, unteached, unteached, unteached, unteached, unteached atlassian-plugin.xmlCopy the code

run

atlas-run

Copy the code

Original link: k8scat.com/posts/confl…