Gerrit插件安装问题

时间:2015-03-04 19:27:25

标签: maven gerrit

我正在尝试安装Gerrit plugin

这是我的理解和步骤(如果我在某个地方出错,请饶恕我,因为我是新手):

  • 此存储库包含一个Buck文件,这意味着我需要安装'buck'(如指定的here)(完成)

  • 运行buck build <folder>将不起作用,因为我需要在gerrit树中运行它。这是我被卡住的地方。我克隆了gerrit source code并运行buck build gerrit以构建此项目,并按照上述文档中的说明)。但是,我收到以下错误:

    [+] PARSING BUILD FILES...0.2s
    Traceback (most recent call last):
      File "/Users/prashant/Downloads/gerrit-oauth-provider-master/buck/src/com/facebook/buck/parser/buck.py", line 872, in <module>
    main()
      File "/Users/prashant/Downloads/gerrit-oauth-provider-master/buck/src/com/facebook/buck/parser/buck.py", line 867, in main
    buildFileProcessor.process(build_file.rstrip())
      File "/Users/prashant/Downloads/gerrit-oauth-provider-master/buck/src/com/facebook/buck/parser/buck.py", line 800, in process
    build_env['BUILD_FILE_SYMBOL_TABLE'])
      File "/Users/prashant/Documents/workspace/testPlugin/src/cookbook-plugin/lib/./gerrit/BUCK", line 1, in <module>
    include_defs('//bucklets/maven_jar.bucklet')
      File "/Users/prashant/Downloads/gerrit-oauth-provider-master/buck/src/com/facebook/buck/parser/buck.py", line 78, in invoke
    return self.func(*args, **updated_kwargs)
      File "/Users/prashant/Downloads/gerrit-oauth-provider-master/buck/src/com/facebook/buck/parser/buck.py", line 702, in include_defs
    execfile(include_file, build_env['BUILD_FILE_SYMBOL_TABLE'])
    IOError: [Errno 2] No such file or directory: '/Users/prashant/Documents/workspace/testPlugin/src/cookbook-plugin/lib/bucklets/maven_jar.bucklet'
    BUILD FAILED: Parse error for BUCK file ./gerrit/BUCK: End of input at line 1 column 1
    

我不确定如何安装此插件。我甚至尝试将其转换为maven项目,但是,它没有用。有人可以在这里指出问题吗?


编辑:
我已经能够通过导航到新克隆的文件夹(级别向下)成功运行buck build gerrit。还成功运行了buck build api。但是运行buck build plugins/oauth:gerrit-oauth-provider会出现以下错误:

/Users/prashant/Downloads/gerrit-oauth-provider-master/gerrit/plugins/oauth/src/main/java/com/googlesource/gerrit/plugins/oauth/GitHubOAuthService.java:18: error: package com.google.gerrit.extensions.auth.oauth does not exist
import com.google.gerrit.extensions.auth.oauth.OAuthServiceProvider;
                                          ^
/Users/prashant/Downloads/gerrit-oauth-provider-master/gerrit/plugins/oauth/src/main/java/com/googlesource/gerrit/plugins/oauth/GitHubOAuthService.java:19: error: package com.google.gerrit.extensions.auth.oauth does not exist
import com.google.gerrit.extensions.auth.oauth.OAuthToken;
                                          ^
/Users/prashant/Downloads/gerrit-oauth-provider-master/gerrit/plugins/oauth/src/main/java/com/googlesource/gerrit/plugins/oauth/GitHubOAuthService.java:20: error: package com.google.gerrit.extensions.auth.oauth does not exist
import com.google.gerrit.extensions.auth.oauth.OAuthUserInfo;
                                          ^
/Users/prashant/Downloads/gerrit-oauth-provider-master/gerrit/plugins/oauth/src/main/java/com/googlesource/gerrit/plugins/oauth/GitHubOAuthService.java:21: error: package com.google.gerrit.extensions.auth.oauth does not exist
import com.google.gerrit.extensions.auth.oauth.OAuthVerifier;
                                          ^
/Users/prashant/Downloads/gerrit-oauth-provider-master/gerrit/plugins/oauth/src/main/java/com/googlesource/gerrit/plugins/oauth/GitHubOAuthService.java:43: error: cannot find symbol
class GitHubOAuthService implements OAuthServiceProvider {
                                ^
  symbol: class OAuthServiceProvider
/Users/prashant/Downloads/gerrit-oauth-provider-master/gerrit/plugins/oauth/src/main/java/com/googlesource/gerrit/plugins/oauth/GitHubOAuthService.java:66: error: cannot find symbol

由于我已经编译了插件,因此不应该出现此错误。我还将插件作为外部jar(在eclipse中)包含在内,看看这些错误是否消失,但无济于事。有人能让我知道包含上述类的jar文件吗?

0 个答案:

没有答案