- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
描述了piccolo2d-swt
的依赖项here作为
Group: ${swt.groupId}
Artifact: ${swt.artifactId}
Version: [3.3.0-v3346,)
如何解决?它在哪里获取变量的值?
如果我使用此依赖项运行空项目,它会显示一些错误消息,其中提到 org.eclipse.swt.win32
。
它从哪里获取这个值?
如果我打印出这些变量的值,我什么也得不到。
POM 在这里
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Test_DisplayMavenVariables</groupId>
<artifactId>Test_DisplayMavenVariables</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<testproperty>This is a test property</testproperty>
</properties>
<!--
<dependencies>
<dependency>
<groupId>org.piccolo2d</groupId>
<artifactId>piccolo2d-swt</artifactId>
<version>1.3.1</version>
</dependency>
</dependencies>
-->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo>Displaying value of some properties</echo>
<echo>[testproperty] ${testproperty}</echo>
<echo>[swt.artifactId] ${swt.artifactId}</echo>
<echo>[swt.groupId] ${swt.groupId}</echo>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<versionRange>[1.1,)</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
最佳答案
swt.groupId
和 swt.artifactId
变量是通过 piccolo2d-swt pom file 中的 maven 配置文件定义的,例如:
<profile>
<id>windows_x86</id>
<activation>
<os>
<family>windows</family>
<arch>x86</arch>
</os>
</activation>
<properties>
<swt.groupId>org.eclipse.swt.win32.win32</swt.groupId>
<swt.artifactId>x86</swt.artifactId>
</properties>
</profile>
正在为每个平台定义配置文件,并根据运行 maven 时检测到的 os.family
和 os.arch
激活配置文件。
关于java - POM 依赖项中的变量。 maven 如何知道 SWT 的 Artifact ID?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22592050/
我实际上是在尝试在 Java SWT 中重现类似的东西,但到目前为止还没有成功: 我看到的问题是,据我所知,SWT.TITLE 需要显示 SWT.CLOSE、SWT.MAX 和 SWT.MIN 谁能告
以下是我的代码: Group leftGroup = new Group(parent, SWT.NONE); leftListWidget = new org.eclipse.swt.widgets
我正在尝试运行一个 hello world SWT 应用程序: public static void main(String args[]) throws IOException{ Displ
我有一个 SWT 窗口,其中有组小部件,我在其中放置了几个其他小部件,我设置了组的标题及其工作正常。组标题颜色始终为蓝色(在我的情况下我不确定)并且不会与组内的其他 child 同步。所以我想知道是否
我正在使用 SWT CTabFolder 在我的应用程序中构建选项卡。我有点不喜欢标签的视觉外观,它太像 Eclipse。有没有办法改变标签的方面?我想更改关闭按钮,例如标签的位置,它们的外观可能..
对于我在使用大型 SWT 表的 RCP 应用程序中追逐了一段时间的问题,这更多是我想分享的答案。 问题是 SWT Table.remove(int start, int end) 方法的性能。它提供了
如何在不使用鼠标监听器的情况下编辑 SWT 表值? 最佳答案 做 TableEditor以下链接中的片段有帮助吗? SWT Snippets TableEditor中的第一个例子部分使用 Select
我想要一个带有两行工具提示的控件。例如 Label: Label label = new Label( parent, SWT.NONE ); label.setText( "label text"
A 想在我的 View 上加载下拉菜单时添加默认文本。我怎样才能在 SWT 和 JFace 中做到这一点? 最佳答案 我猜您想要做的是在将某些内容添加到 View 时在组合中显示某些内容(默认情况下它
在我的登录对话框中,有一个按钮: Text pwdT = new Text(container, SWT.BORDER|SWT.PASSWORD); Button plainBtn = new Bu
如何以编程方式垂直滚动 SWT 表? 在表上实现搜索功能。当找到一个项目时,它将滚动到找到的项目。 最佳答案 您可能想尝试几种方法: Table.showItem(TableItem) Table.s
我有一个 Composite我希望能够以编程方式启用/禁用。 Control.setEnabled(boolean enabled)方法工作正常,但它没有提供任何小部件被禁用的视觉信息。 我想做的是让
有几个“高级”表格/电子表格 SWT 小部件(Nattable、Nebula Grid),但它们都不支持真正的大数据集。 Nattable 是最接近的一种,但它在使用的数据类型方面仍然存在限制,导致表
以下问题让我感到困惑:我有一个 SWT Java 应用程序,并且在以下情况下从 SWT 3 切换到 SWT 4 会导致 KeyDown 事件出现奇怪的行为: 我有一个包含浏览器小部件的外壳。我正在通过
我在 eclipse SWT 应用程序中有许多表。它们是 Table/TableViewer 表格,由一个标题、左下方一行文本和一系列图形组成。除文本列外还有 32 列,编号从 0 到 31。在经典模
原目标: 我有一个 TreeMenu 用于显示我的菜单。 在这棵树中,用户可以选择不同的项目。 我想禁用树,以便用户在选择第一个项目后无法选择新项目。 问题是,我们不能使用 setEnabled,因为
是否已经有人在 IDEA 中编写了类似于“导航栏”的 SWT 控件?对于那些不知道我的意思的人:它看起来像 path1 > path2 > path3 > 其中每个“路径”都是模拟一个按钮的完整路径的
我需要使用 SWT/JFace 实现多选组合框,最好的方法是什么?我应该更改源代码还是应该尝试扩展组合? 最佳答案 不可能扩展 Combo 可以通过重写 checkSubclass() 来扩展 Com
我想用大量行(最多 3 mio)填充 SWT 虚拟表。当我使用懒惰的内容提供者时,我不能使用过滤器,而当我使用普通的内容提供者时,更改过滤器的性能会变得非常糟糕。有没有办法在 SWT 或 JFace
除了外观之外,组控制和复合之间有什么区别?我可以将容器放入组内吗?如果是,我必须使用什么布局?我尝试将容器放置在组内,但容器内的控件未显示。 Group grp= new Group(containe
我是一名优秀的程序员,十分优秀!