在github上安装自定义eclipse插件

时间:2016-12-27 13:37:02

标签: eclipse github eclipse-plugin activiti

我正在尝试从更新站点安装插件到eclipse。但是,某种程度上不起作用(可能是工具已经结束了更新站点的支持)。虽然,我已经从github找到插件的源代码(但它不是编译版本)。我可以将其下载为zip文件。但是,我面临与安装相关的问题。它包含许多不同文件夹中的plugin.xml文件。但是,我不确定,使用哪一个。

这是插件源代码的url

请帮助完成从源代码安装eclipse插件的步骤。

@ChandrayyaGK:我已按照你的答案中提到的步骤进行操作。我正面临以下错误。

[INFO] Fetching org.eclipse.graphiti_0.11.4.v20150701-1432.jar.pack.gz from http://archive.eclipse.org/graphiti/updates/0.11.4/plugins/ (0B of 83.9kB at 0B/s)
[ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:164)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.NullPointerException
        at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.downloadArtifact(SimpleArtifactRepository.java:665)
        at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.downloadArtifact(SimpleArtifactRepository.java:590)
        at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:724)
        at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromOneMirror(RepositoryArtifactProvider.java:209)
        at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromAnyMirror(RepositoryArtifactProvider.java:192)
        at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.access$1(RepositoryArtifactProvider.java:187)
        at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider$1.perform(RepositoryArtifactProvider.java:167)
        at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:708)
        at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifacts(SimpleArtifactRepository.java:779)
        at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromAnyChildRepository(RepositoryArtifactProvider.java:179)
        at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromAnyFormatAvailableInRepository(RepositoryArtifactProvider.java:149)
        at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromAnySource(RepositoryArtifactProvider.java:135)
        at org.eclipse.tycho.repository.p2base.artifact.provider.CompositeArtifactProviderBaseImpl.getArtifact(CompositeArtifactProviderBaseImpl.java:50)
        at org.eclipse.tycho.repository.local.MirroringArtifactProvider.downloadCanonicalArtifact(MirroringArtifactProvider.java:236)
        at org.eclipse.tycho.repository.local.MirroringArtifactProvider.downloadMostSpecificNeededFormatOfArtifact(MirroringArtifactProvider.java:229)
        at org.eclipse.tycho.repository.local.MirroringArtifactProvider.downloadArtifact(MirroringArtifactProvider.java:214)
        at org.eclipse.tycho.repository.local.MirroringArtifactProvider.makeOneFormatLocallyAvailable(MirroringArtifactProvider.java:203)
        at org.eclipse.tycho.repository.local.MirroringArtifactProvider.makeLocallyAvailable(MirroringArtifactProvider.java:174)
        at org.eclipse.tycho.repository.local.MirroringArtifactProvider.getArtifactFile(MirroringArtifactProvider.java:118)
        at org.eclipse.tycho.repository.p2base.artifact.provider.CompositeArtifactProvider.getArtifactFile(CompositeArtifactProvider.java:70)
        at org.eclipse.tycho.p2.target.TargetPlatformBaseImpl.getLocalArtifactFile(TargetPlatformBaseImpl.java:93)
        at org.eclipse.tycho.p2.resolver.P2ResolverImpl.addUnit(P2ResolverImpl.java:251)
        at org.eclipse.tycho.p2.resolver.P2ResolverImpl.toResolutionResult(P2ResolverImpl.java:214)
        at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:206)
        at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:113)
        at org.eclipse.tycho.p2.resolver.P2DependencyResolver.doResolveDependencies(P2DependencyResolver.java:360)
        at org.eclipse.tycho.p2.resolver.P2DependencyResolver.resolveDependencies(P2DependencyResolver.java:333)
        at org.eclipse.tycho.core.resolver.DefaultTychoResolver.resolveProject(DefaultTychoResolver.java:117)
        at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:77)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:271)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
        ... 11 more
[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/InternalErrorException

经过更多调查,我发现原因是由于机器环境属性。

<environment>
                        <os>macosx</os>
                        <ws>cocoa</ws>
                        <arch>x86_64</arch>
                    </environment>

我已将其更改为以下内容,并且有效。

<environment>
                            <os>win32</os>
                            <ws>win32</ws>
                            <arch>x86</arch>
                        </environment>

2 个答案:

答案 0 :(得分:1)

  1. 您必须拥有github帐户才能从github克隆或下载源代码。创建您的github帐户然后转到此项目,然后单击克隆或下载按钮,然后将源代码下载为zip文件。

  2. 你必须构建这些源来获取eclipse插件,所以解压缩内容。

  3. graphiti p2 repo的位置现已更改,因此请打开该文件 的 /Activiti-Designer-master/org.activiti.designer.parent/pom.xml 并从

    更改行

    <graphiti-site>http://download.eclipse.org/graphiti/updates/0.11.4</graphiti-site>

    <graphiti-site> http://archive.eclipse.org/graphiti/updates/0.11.4</graphiti-site>

  4. 在命令提示符下转到Activiti-Designer-master/org.activiti.designer.parent文件夹,然后运行命令mvn clean install(如果未安装,请安装maven)。

  5. 我试过这个并且能够在我的机器上成功构建这个插件。默认情况下,它为 eclipse luna 平台构建插件。所以打开eclipse luna并添加/Activiti-Designer-master/org.activiti.designer.updatesite/target/repository文件夹作为更新站点,然后单击安装。 Refer this用于在luna中安装新软件/插件。

答案 1 :(得分:0)

关于获取graphiti p2 repo。

只有解决方案对我有用,就是从本地文件夹中获取graphiti站点。 就像在这里描述Activiti Designer - build failures

一样
  1. 下载ZIP文件:http://archive.eclipse.org/graphiti/archives/0.11.4/org.eclipse.graphiti.site_0.11.4.201507011432.zip
  2. 解压缩并设置org.activiti.designer.parent / pom.xml&lt; graphiti-site&gt;相应的值指向解压缩文件夹
  3. 在我的情况下它是windows目录,所以例如: &LT; graphiti现场&GT;文件:/// C:/temp/org.eclipse.graphiti.site_0.11.4.201507011432< / graphiti现场&GT;

    之后我才能成功建立设计师。

    PS。对不起,伙计们,我没有足够的声望点将此作为对前一个答案的评论,这似乎是更明显的地方。