2016-12-28 2 views
1

Crêter un plugin bitbucket avec un pré et un post hook, mais le projet échoue à compiler en raison d'une erreur de paquetage.Le plugin Atlassian ne se compile pas, les paquets manquants sont installés

Un flux simple utilisant les commandes suivantes entraînera des erreurs. atlas-create-bitbucket-plugin & atlas-create-bitbucket-plugin-module & atlas-debug donne suite à la pile d'erreur avec l'erreur opératoire étant 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 

J'ai essayé de désinstaller Java, Maven et Atlassian sdk et refaisant le projet. Cela n'a pas marché pour moi. J'ai également essayé les commandes atlas-package et mvn package Je ne sais pas comment procéder.

Informations sur mon environnement et mes chemins.

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" 

Répondre

0

Apparemment, la solution consistait à ouvrir un ide (j'ai utilisé IDEA) et à mettre à jour les référentiels maven et à résoudre les dépendances.