Search code examples
javamavenatlassian-plugin-sdk

Atlassian plugin wont compile, missing packages from install


Creting a bitbucket plugin with both a pre and post hook, however the project fails to compile due to package error.

A simple flow using the following commands will result in errors. atlas-create-bitbucket-plugin & atlas-create-bitbucket-plugin-module & atlas-debug gives following error stack with the operative error being package com.atlassian.bitbucket.repository.hook does not exist

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/xxmjm/dev/testbl12354/src/main/java/dk/eg/ky/hook/ValidatorHook.java:[4,1] package com.atlassian.bitbucket.repository.hook does not exist
[ERROR] /C:/Users/xxmjm/dev/testbl12354/src/main/java/dk/eg/ky/hook/ValidatorHook.java:[9,39] cannot find symbol
  symbol: class PreReceiveRepositoryHook
[ERROR] /C:/Users/xxmjm/dev/testbl12354/src/main/java/dk/eg/ky/hook/ValidatorHook.java:[15,30] cannot find symbol
  symbol:   class RepositoryHookContext
  location: class dk.eg.ky.hook.ValidatorHook
[ERROR] /C:/Users/xxmjm/dev/testbl12354/src/main/java/dk/eg/ky/hook/ValidatorHook.java:[15,95] cannot find symbol
  symbol:   class HookResponse
  location: class dk.eg.ky.hook.ValidatorHook
[ERROR] /C:/Users/xxmjm/dev/testbl12354/src/main/java/dk/eg/ky/hook/ValidatorHook.java:[14,5] method does not override or implement a method from a supertype
[INFO] 5 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.445 s
[INFO] Finished at: 2016-12-28T11:07:48+01:00
[INFO] Final Memory: 56M/327M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile (default-compile) on project testbl12354: Compilation failure: Compilation failure:
[ERROR] /C:/Users/xxmjm/dev/testbl12354/src/main/java/dk/eg/ky/hook/ValidatorHook.java:[4,1] package com.atlassian.bitbucket.repository.hook does not exist
[ERROR] /C:/Users/xxmjm/dev/testbl12354/src/main/java/dk/eg/ky/hook/ValidatorHook.java:[9,39] cannot find symbol
[ERROR] symbol: class PreReceiveRepositoryHook
[ERROR] /C:/Users/xxmjm/dev/testbl12354/src/main/java/dk/eg/ky/hook/ValidatorHook.java:[15,30] cannot find symbol
[ERROR] symbol:   class RepositoryHookContext
[ERROR] location: class dk.eg.ky.hook.ValidatorHook
[ERROR] /C:/Users/xxmjm/dev/testbl12354/src/main/java/dk/eg/ky/hook/ValidatorHook.java:[15,95] cannot find symbol
[ERROR] symbol:   class HookResponse
[ERROR] location: class dk.eg.ky.hook.ValidatorHook
[ERROR] /C:/Users/xxmjm/dev/testbl12354/src/main/java/dk/eg/ky/hook/ValidatorHook.java:[14,5] method does not override or implement a method from a supertype
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

I have tried uninstalling java, maven and atlassian sdk and redoing the project. That hasn't work for me. I have also tried the commands atlas-package and mvn package Not sure how to proceed.

Info about my environment and paths.

ATLAS Version:    6.2.9
ATLAS Home:       C:\Applications\Atlassian\atlassian-plugin-sdk-6.2.9
ATLAS Scripts:    C:\Applications\Atlassian\atlassian-plugin-sdk-6.2.9\bin
ATLAS Maven Home: C:\Applications\Atlassian\atlassian-plugin-sdk-6.2.9\apache-maven-3.2.1
AMPS Version:     6.2.6
--------
Executing: "C:\Applications\Atlassian\atlassian-plugin-sdk-6.2.9\apache-maven-3.2.1\bin\mvn.bat" --version -gs C:\Applications\Atlassian\atlassian-plugin-sdk-6.2.9\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-14T18:37:52+01:00)
Maven home: C:\Applications\Atlassian\atlassian-plugin-sdk-6.2.9\apache-maven-3.2.1\bin\..
Java version: 1.8.0_111, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_111\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"

Solution

  • Apparently the solution was to open an ide (I used IDEA) and update the maven repositories and resolve dependencies.