Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] SWT: Maven on Windows, how to get jUnit tests to work?

After investigation, I found that this issue occurs because in swt features.xml, gtkx86 is being used as environment.

If I remove all environments but win32x64, then maven tests work on windows.

I'm having a hard time figuring out why the wrong environment is being picked.
I reported the problem:
Bug 519583 – [Win32][Maven] Running swt jUnits via maven fails due to wrong environment being picked up in features.xml
https://bugs.eclipse.org/bugs/show_bug.cgi?id=519583

If someone knows their way around maven, any comments/suggestions in bug above would be beneficial.

Thank you.

On Fri, Jul 7, 2017 at 3:22 PM, Leo Ufimtsev <Leonidas@xxxxxxxxxx> wrote:
I also noticed that the first error is "Cannot load 32 bit SWT libraries on 64 bit JVM".
Is there a flag I need to specify for maven to build swt in 64 bit mode?

Inline image 1

On Fri, Jul 7, 2017 at 3:09 PM, Leo Ufimtsev <Leonidas@xxxxxxxxxx> wrote:
Hello folks,

So I got maven to work on Linux/Cocoa(*1) via:
     mvn clean verify -Pbuild-individual-bundles

But on Windows, SWT compiles, but jUnit tests fail with:
- NoClassDefFound
- NullPointer

Does anyone know how to fix?

Inline image 1

Note:
- Win10
- Tests work via GUI -> AllTests.java -> run jUnits
- Windows power shell
- Maven 3.5.0, installed manually. M2_HOME, MAVEN_HOME, JAVA_HOME are set properly.
- JDK 1.8

Thank you

[1] Cocoa works after patch merge:
Bug 519237 – [Cocoa] mvn -Pbuild-individual-bundles fails on OSX due to missing -XstartOnFirstThread vm arg
https://bugs.eclipse.org/bugs/show_bug.cgi?id=519237

--

Leo Ufimtsev

Software Engineer

Red Hat


90 Eglinton Ave E #502,

Toronto, ON M4P 2Y3

Leonidas@xxxxxxxxxx  

CHAT:

  - IRC: http://webchat.freenode.net/?channels=#swt

  - MatterMost: https://mattermost.eclipse.org/eclipse/channels/platform-swt




--

Leo Ufimtsev

Software Engineer

Red Hat


90 Eglinton Ave E #502,

Toronto, ON M4P 2Y3

Leonidas@xxxxxxxxxx  

CHAT:

  - IRC: http://webchat.freenode.net/?channels=#swt

  - MatterMost: https://mattermost.eclipse.org/eclipse/channels/platform-swt




--

Leo Ufimtsev

Software Engineer

Red Hat


90 Eglinton Ave E #502,

Toronto, ON M4P 2Y3

Leonidas@xxxxxxxxxx  

CHAT:

  - IRC: http://webchat.freenode.net/?channels=#swt

  - MatterMost: https://mattermost.eclipse.org/eclipse/channels/platform-swt


Back to the top