maven项目:SWT 3.5依赖:任何官方公共回购?

Ant*_*n K 16 java swt conventions maven

好吧,简而言之,我可能需要获取新的SWT版本而不是我们现在使用的3.3版本.该项目现在只有这种依赖,并建立良好:

<dependency>
  <groupId>org.eclipse.swt.win32.win32</groupId>
  <artifactId>x86</artifactId>
  <version>3.3.0-v3346</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

AFAICGoogle,公共maven回购中没有更新版本:http://repo1.maven.org/maven2/org/eclipse/swt/

所以:

  1. 最新版本是否有一些公共maven回购?
  2. 如果没有,您在哪里获得本地和/或公司Nexus中安装的罐子?
  3. 你知道的任何groupId/artifactId建议/约定?

TIA

PS:我主要是Eclipse产品网站布局的菜鸟,通常会迷失在谷歌搜索结果和/或Eclipse网站本身......所以虽然答案可能对你很明显,但对我来说可能不是这样,甚至回顾.

uri*_*ish 40

我在github上为windows,Linux和osx工件创建了一个maven repo:

https://github.com/maven-eclipse/swt-repo

要使用它,只需将以下内容放在pom.xml中:

<repositories>
    <repository>
        <id>swt-repo</id>
        <url>https://raw.githubusercontent.com/maven-eclipse/swt-repo/master/</url>
    </repository>
</repositories>
Run Code Online (Sandbox Code Playgroud)

然后,您可以引用与您的平台相关的SWT依赖项.例如:

    <dependency>
        <groupId>org.eclipse.swt</groupId>
        <artifactId>org.eclipse.swt.win32.win32.x86</artifactId>
        <version>4.4</version>
    </dependency>
Run Code Online (Sandbox Code Playgroud)

对于其他平台,只需将artifactId替换为适当的值:

  • org.eclipse.swt.win32.win32.x86
  • org.eclipse.swt.win32.win32.x86_64
  • org.eclipse.swt.gtk.linux.x86
  • org.eclipse.swt.gtk.linux.x86_64
  • org.eclipse.swt.cocoa.macosx
  • org.eclipse.swt.cocoa.macosx.x86_64

此外,此存储库中还提供了SWT 4.3.2,4.3.1,4.3.0,4.2.2,4.2.1,3.8,3.7.2和3.5.1的工件.

我们使用基于selenium的方法在新SWT版本发布时自动部署新SWT版本的工件.自动化的源代码是开放的,可在github上获得:

https://github.com/hennr/swt-release-fetcher

快乐的编码!


len*_*ite 15

更新:repo被删除并由repo.eclipse.org取代,后者不包含SWT工件.

您可以使用在eclipse上托管的Nexus存储库(此存储库处于"测试"状态)

http://maven.eclipse.org/nexus/content/repositories/testing/org/eclipse/swt/

有一个错误打开了进一步的信息:https: //bugs.eclipse.org/bugs/show_bug.cgi?id = 199302


Ant*_*n K 10

抓住这里您需要的版本.SWT仍然没有捆绑平台中立,因此您必须注意要使用的平台.我抓住了windows版本,后缀为3.6.1-win32-win32-x86.我已将其用作versionId,使平台脱离组/工件字段.这对于maven gurus来说可能并不完全正确,但对我来说非常合适(至少目前如此).我也在使用jar的调试版,这对于开发是可以的.

所以我们走了.

解压缩存档,然后发布(在存档的根文件夹中):

mvn install:install-file -DgroupId=org.eclipse -DartifactId=swt -Dversion=3.6.1-win32-win32-x86 -Dfile=swt-debug.jar -Dpackaging=jar -DlocalRepositoryPath=../path/to/your/local/project/repo
Run Code Online (Sandbox Code Playgroud)

然后,这也是安装源:

mvn install:install-file -DgroupId=org.eclipse -DartifactId=swt -Dversion=3.6.1-win32-win32-x86 -Dfile=src.zip -Dpackaging=jar -Dclassifier=sources -DlocalRepositoryPath=../path/to/your/local/project/repo
Run Code Online (Sandbox Code Playgroud)

将对本地存储库的引用添加到pom.xml中,

<repositories>
    <repository>
        <id>local</id>
        <name>Project Local Repository</name>
        <layout>default</layout>
        <url>file://${project.baseDir}/path/to/your/local/project/repo/</url>
    </repository>
</repositories>
Run Code Online (Sandbox Code Playgroud)

然后添加一个依赖项本身:

<dependency>
    <groupId>org.eclipse</groupId>
    <artifactId>swt</artifactId>
    <version>3.6.1-win32-win32-x86</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

希望这对某人有所帮助,并且在我的其他更难的问题上得到了一些赏金,以获得赏金......;)