1

While trying to depend on piccolo2d-swt-examples artifact (in m2e), I am getting the following message

VersionRangeResolutionException: No versions available for org.eclipse.swt.win32.win32:x86_64:jar:[3.3.0-v3346,) within 
 specified range

What is the meaning of this message? Does it mean that there is no library for win32 at all? Or it means that SWT is not under maven control?

UPDATE

My current POM is below.

Currently it has no any explicit dependency on SWT. Being not fluent with Maven, I can't judge if this message means, that Maven feels my SWT version from global settings and reports, that no library written for it, or it just can't find any required SWT libraries in repository.

In first case I can't use SWT version of Piccolo at all (it is not portable, since not written for all platforms) while in second case I can use it, but need to pack SWT for Maven in local repository.

This is the question.

<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>tests</groupId>
    <artifactId>Piccolo2D_3_Tests</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <dependencies>


        <dependency>
            <groupId>org.piccolo2d</groupId>
            <artifactId>piccolo2d-swt-examples</artifactId>
            <version>3.0</version>
        </dependency>


    </dependencies>
</project>
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385
  • Do you want to build a 64 bit application? If not, I'd try to add `org.eclipse.swt.win32.win32:x86:3.3.0-v3346` to the dependencies. – Matthias Braun Mar 23 '14 at 10:20

3 Answers3

1
VersionRangeResolutionException: No versions available for   
org.eclipse.swt.win32.win32:x86_64:jar:[3.3.0-v3346,) within specified range

According to a maven central query there is no x86_64 artifact for that swt jar file but there is an x86 artifact.

You might want to try forcing your piccolo2d dependency to activate its windows_x86 profile explicity using mvn -Pwindows_x86 or (UPDATE 2) try building with a 32-bit Java JDK.

UPDATE 1: Your problems look similar to piccolo Issue 203: Missing maven profile for Windows x86_64.

Drew MacInnis
  • 8,267
  • 1
  • 22
  • 18
1

I downloaded the the missing artifact from here(http://www.java2s.com/Code/Jar/o/Downloadorgeclipseswtwin32win32x866442jar.htm) and installed the jar using
>mvn install:install-file -Dfile=org.eclipse.swt.win32.win32.x86_64-4.2.jar -DgroupId=org.eclipse.swt.win32.win32 -DartifactId=x86_64 -Dversion=4.2 -Dpackaging=jar
And it started working fine :)

PS: This way you don't need to tamper with the profiles at all.

isuru chathuranga
  • 995
  • 15
  • 24
  • I would download the SWT implementation from the official eclipse [archive](https://archive.eclipse.org/eclipse/downloads/) site instead. Download the [swt-3.4.zip](https://archive.eclipse.org/eclipse/downloads/drops/R-3.4-200806172000/download.php?dropFile=swt-3.4-win32-win32-x86_64.zip), unpack it and use the internal swt.jar file. – Adam Taras Aug 24 '20 at 18:32
0

This is from the Piccolo readme:

To include the Piccolo2D core classes in your project, use a
dependency of

<dependency>
  <groupId>org.piccolo2d</groupId>
  <artifactId>piccolo2d-core</artifactId>
  <version>1.3.1</version>
</dependency>

in your pom.xml. To include the Piccolo2D core classes and the
Piccolo2D extras classes in your project, use a dependency of

<dependency>
  <groupId>org.piccolo2d</groupId>
  <artifactId>piccolo2d-extras</artifactId>
  <version>1.3.1</version>
</dependency>

in your pom.xml. To include the Piccolo2D core classes and the
Piccolo2D SWT classes in your project, use a dependency of

<dependency>
  <groupId>org.piccolo2d</groupId>
  <artifactId>piccolo2d-swt</artifactId>
  <version>1.3.1</version>
</dependency>

Does adding these dependencies change anything?

Matthias Braun
  • 32,039
  • 22
  • 142
  • 171
  • No. Last artifact is most probably depends on first two, so they are included automatically by Maven nature. – Suzan Cioc Mar 23 '14 at 10:44
  • 1
    Another piece from the readme: `For some platforms, including Mac OSX with JDK version 1.6 or later on x86_64, the Eclipse Standard Widget Toolkit (SWT) version 3.3.0 or later must also be installed manually. Eclipse Standard Widget Toolkit http://www.eclipse.org/swt/` – Matthias Braun Mar 23 '14 at 10:56
  • It is downloaded and referred by "external jar" means of Eclipse. I can compile and run standalone SWT classes if without Maven. – Suzan Cioc Mar 23 '14 at 11:05