Forums

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

Getting maven build errors when trying to run atlassian plugin

Deleted user April 5, 2018

Hi,

I'm new to Atlassian plugins so I thought I would start by compiling and running the hello world plugin that atlassian provides as a tutorial: https://developer.atlassian.com/server/framework/atlassian-sdk/create-a-helloworld-plugin-project/

 

I have JDK 9 and MVN 3.3 running. I've followed all the instructions on that tutorial, however, I am presented with the following errors and am unable to understand what is going wrong:

[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING] The POM for com.atlassian.maven.plugins:maven-confluence-plugin:jar:6.3.15 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-confluence-plugin:6.3.15 or one of its dependencies could not be resolved: Failure to find com.atlassian.maven.plugins:maven-confluence-plugin:jar:6.3.15 in https:/
/repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @
[ERROR] Unknown packaging: atlassian-plugin @ line 19, column 16

 Below is my POM file: 

 <?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.atlassian.test</groupId>
<artifactId>myPlugin</artifactId>
<version>1.0.0-SNAPSHOT</version>

<organization>
<name>Example Company</name>
<url>http://www.example.com/</url>
</organization>

<name>myPlugin</name>
<description>This is the com.atlassian.test:myPlugin plugin for Atlassian Confluence.</description>
<packaging>atlassian-plugin</packaging>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.atlassian.confluence</groupId>
<artifactId>confluence</artifactId>
<version>${confluence.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-annotation</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-runtime</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>runtime</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>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2-atlassian-1</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-confluence-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${confluence.version}</productVersion>
<productDataVersion>${confluence.data.version}</productDataVersion>
<enableQuickReload>true</enableQuickReload>
<enableFastdev>false</enableFastdev>

<!-- See here for an explanation of default instructions: -->
<!-- https://developer.atlassian.com/docs/advanced-topics/configuration-of-instructions-in-atlassian-plugins -->
<instructions>
<Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>

<!-- Add package to export here -->
<Export-Package>
com.atlassian.test.api,
</Export-Package>

<!-- Add package import here -->
<Import-Package>
org.springframework.osgi.*;resolution:="optional",
org.eclipse.gemini.blueprint.*;resolution:="optional",
*
</Import-Package>

<!-- Ensure plugin is spring powered -->
<Spring-Context>*</Spring-Context>
</instructions>
</configuration>
</plugin>

<plugin>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<executions>
<execution>
<goals>
<goal>atlassian-spring-scanner</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
<configuration>
<scannedDependencies>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-external-jar</artifactId>
</dependency>
</scannedDependencies>
<verbose>false</verbose>
</configuration>
</plugin>
</plugins>
</build>

<properties>
<confluence.version>6.7.1</confluence.version>
<confluence.data.version>6.7.1</confluence.data.version>
<amps.version>6.3.15</amps.version>
<plugin.testrunner.version>1.2.3</plugin.testrunner.version>
<atlassian.spring.scanner.version>1.2.13</atlassian.spring.scanner.version>
<!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

</project>

 Any help would be appreciated, thanks!

1 answer

0 votes
Minh Tran
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 6, 2018

@[deleted] Can you tell me the output of this command atlas-version?

Deleted user April 9, 2018
ATLAS Version:    6.3.10
ATLAS Home:       C:\Applications\Atlassian\atlassian-plugin-sdk-6.3.10
ATLAS Scripts:    C:\Applications\Atlassian\atlassian-plugin-sdk-6.3.10\bin
ATLAS Maven Home: C:\Applications\Atlassian\atlassian-plugin-sdk-6.3.10\apache-maven-3.2.1
AMPS Version:     6.3.15
--------
Executing: "C:\Applications\Atlassian\atlassian-plugin-sdk-6.3.10\apache-maven-3.2.1\bin\mvn.bat" --version -gs C:\Applications\Atlassian\atlassian-plugin-sdk-
6.3.10\apache-maven-3.2.1/conf/settings.xml
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T11:37:52-06:00)
Maven home: C:\Applications\Atlassian\atlassian-plugin-sdk-6.3.10\apache-maven-3.2.1
Java version: 1.8.0_161, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_161\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"

 I was able to get past these errors by switching to jdk 1.8 and adding in the maven respository as a plugin repo in the pom file of my project.

Minh Tran
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 9, 2018

Right, the platform now is supported to JDK8. Using JDK9 may cause some weird things

Manish Sinha
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 14, 2018

Hello,

I build the project using: atlas-create-confluence-plugin

as well as importing the project into Eclipse from this link(

Adding a custom action to Confluence) 

https://bitbucket.org/atlassian_tutorial/confluence-custom-action-tutorial/get/master.zip?_ga=2.111115909.1233932827.1534180808-30292495.1533050977

 

I am getting the same error:

org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin com.atlassian.maven.plugins:maven-confluence-plugin:6.3.15 or one of its dependencies could not be resolved: Failure to find com.atlassian.maven.plugins:maven-confluence-plugin:jar:6.3.15 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @
[ERROR] Unknown packaging: atlassian-plugin @ line 19, column 16

I am using Java 8.

atlas_version_screen_shot.png

Please guide me how to resolve it.

Thanks,

Manish

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events