maven 项目:SWT 3.5 依赖项:有任何官方公共存储库吗?
嗯,简而言之,我可能需要获取新的 SWT 版本,而不是我们现在使用的 3.3。该项目现在只有这个依赖项并且构建良好:
<dependency>
<groupId>org.eclipse.swt.win32.win32</groupId>
<artifactId>x86</artifactId>
<version>3.3.0-v3346</version>
</dependency>
AFAICGoogle,公共 Maven 存储库中没有更新的版本: http://repo1.maven.org/maven2/org/eclipse/swt/
所以:
- 是有一些公共 Maven 仓库 最近的版本?
- 如果没有,你在哪里 获取本地安装的jar 和/或在您的公司 Nexus 中?
- 任意groupId/artifactId 您知道的建议/惯例吗?
TIA
PS:对于 Eclipse 产品站点布局,我基本上是个菜鸟,通常会迷失在 Google 搜索结果和/或 Eclipse 站点本身中......因此,虽然答案对您来说可能是显而易见的,但对我来说可能并非如此,甚至回顾过去。
Well, in short, I may need to grab new SWT version instead of 3.3 we're using for now. The project now has only this dependency and builds fine:
<dependency>
<groupId>org.eclipse.swt.win32.win32</groupId>
<artifactId>x86</artifactId>
<version>3.3.0-v3346</version>
</dependency>
AFAICGoogle, there is no more recent version in the public maven repo:
http://repo1.maven.org/maven2/org/eclipse/swt/
So:
- Is there some public maven repo with
recent builds? - If not, where do you
get the jars you install locally
and/or in your corporate Nexus? - Any groupId/artifactId
suggestions/conventions you know of?
TIA
PS: I am mostly a noob as to Eclipse products site layout and usually get lost in Google search results and/or the Eclipse site itself... so while the answer may be obvious for you it would likely not be so for me, even retrospectively.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我已经为 Windows、Linux 和 Linux 创建了一个 Maven 存储库。 github 上的 osx 工件:
https://github.com/maven-eclipse/swt-repo
要使用它,只需将以下内容放入您的 pom.xml 中:
然后您可以引用与您的平台相关的 SWT 依赖项。例如:
对于其他平台,只需将artifactId替换为适当的值:
此外,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 版本发布时自动部署它们。自动化的源代码是开放的,可在 github 上获取:
https://github.com/hennr/ swt-release-fetcher
编码愉快!
I have created a maven repo for windows, Linux & osx artifacts at github:
https://github.com/maven-eclipse/swt-repo
To use it just put the following in your pom.xml:
Then you can just reference the SWT dependency relevant to your platform. For example:
For other platforms, just replace artifactId with the appropriate value:
In addition, artifacts for SWT 4.3.2, 4.3.1, 4.3.0, 4.2.2, 4.2.1, 3.8, 3.7.2 & 3.5.1 are also available from this repository.
We use a selenium-based approach to automatically deploy the artifacts of new SWT versions as they are released. The source code for the automation is open and available on github:
https://github.com/hennr/swt-release-fetcher
Happy coding!
更新:该存储库已删除并被 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
Update: The repo was taken down and replaced by repo.eclipse.org which does not hold SWT artifacts.
You can use a Nexus repository hosted at eclipse (this repository is in 'testing' status)
http://maven.eclipse.org/nexus/content/repositories/testing/org/eclipse/swt/There is a bug open on this with further info:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=199302
此处获取您需要的版本。 SWT 仍然不是与平台无关的捆绑,因此您必须注意使用的平台。
我获取了 Windows 版本,后缀为 3.6.1-win32-win32-x86。我已将其用作 versionId,将平台排除在组/工件字段之外。对于专家专家来说,这可能并不完全正确,但非常适合我(至少目前如此)。我还使用 jar 的调试版本,这对于开发来说是可以的。
那么我们开始吧。
解压存档,然后发出这个(在存档的根文件夹中):
然后发出这个,也安装源:
将本地存储库的引用添加到 pom.xml,
然后添加依赖项本身:
希望这对某人有帮助,并且我因其他更难的问题的赏金而获得了一些业力......;)
Grab here the version you need. SWT is still not bundled platform-neutrally, so you have to pay attention to the platform to use.
I'd grabbed windows version, with postfix of 3.6.1-win32-win32-x86. I've used that as a versionId, leaving the platform out of group/artifact fields. This might be not totally correct for maven gurus but fits for me quite well (at least for now). Also I am using the debug-version of the jar, which is okay for development.
So here we go.
Unpack the archive and then issue this (in the root folder of your archive):
and then this, to install sources as well:
Add reference to a local repo to your pom.xml,
and then add a dependency itself:
Hope this helps someone, and I get some karma for bounties on other, harder questions of mine... ;)
看一下 maven-eclipse-plugin。假设您在 /opt/eclipse 上安装了本地 eclipse,请执行以下操作:
这将为所有 eclipse 插件生成 poms 并将它们上传到您的本地存储库。还可以使用插件选项“deployTo”将生成的 poms 和 jar 加载到远程存储库。
另请参阅:
maven-eclipse-plugin
之后你可以使用存储库中的工件。
希望这些信息对您有所帮助。
-马丁
have a look at the maven-eclipse-plugin. Assuming you have a local eclipse installation at /opt/eclipse, do the following:
This will generate poms for all eclipse plugins and upload them to your local repo. It's also possible to load the generated poms and jars to a remote repo using the plugin option "deployTo".
See also:
maven-eclipse-plugin
After that you can use the artifacts from the repository.
Hope the information is helpfull.
-Martin
从 Neon.2 (v 4.6.2) 开始,Maven Central 上提供了许多 Eclipse 捆绑包(包括 SWT):
https://repo1.maven.org/maven2/org/eclipse/platform/
请注意,与早期发布的 SWT 工件相比,组 ID 已更改为 org.eclipse .platform。例如,要包含适用于 Windows 的 SWT,请将其添加到您的 pom 中:
从现在开始,所有 Eclipse 平台版本(目前每年 6 月左右发布)都将作为 Maven 工件提供。请参阅此处查找最新版本号: https:/ /search.maven.org/#search%7Cga%7C1%7Corg.eclipse.platform%20swt
请参阅此处以获取包含更多详细信息的公告:https://objectteams.wordpress.com/2017/01/09/eclipse-neon-2-is -on-maven-central/
As of Neon.2 (v 4.6.2) many Eclipse bundles, including SWT, are available on Maven Central:
https://repo1.maven.org/maven2/org/eclipse/platform/
Note that, in contrast to earlier published SWT artifacts, the group id was changed to
org.eclipse.platform
. To include SWT for Windows, for example, add this to your pom:From now on, all Eclipse platform releases (currently published every year around June) will be available as maven artifacts. See here to find the most recent version number: https://search.maven.org/#search%7Cga%7C1%7Corg.eclipse.platform%20swt
See here for an announcement with further details: https://objectteams.wordpress.com/2017/01/09/eclipse-neon-2-is-on-maven-central/