I found a method to get past the problem. This method does not require putting the SWT jar files into the local repository. There are 2 tricks required to get this to work.
I put these under a lib folder under the top level. There is probably a more elegant place to put them.
pom.xml
.In my case, it looked like this:
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.swt</artifactId>
<version>3.7.2</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/org.eclipse.swt_3.7.2.v3740f.jar</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId>
<version>3.7.2</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/org.eclipse.swt.win32.win32.x86_64_3.7.2.v3740f.jar</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.jface</artifactId>
<version>3.7.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/org.eclipse.jface_3.7.0.v20110928-1505.jar</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.core.commands</artifactId>
<version>3.6.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/org.eclipse.core.commands_3.6.0.I20110111-0800.jar</systemPath>
</dependency>
I do not know if the groupId
and artifactId
values are correct, but it is good enough to get the old code to compile.
Also there will be some Maven warnings as shown below, but in my case I just want it to compile. You can get change to a different warning by hard-coding the full path instead of using the relative variable.
[WARNING] 'dependencies.dependency.systemPath' for org.eclipse.platform:org.eclipse.swt:jar should not point at files within the project directory, ${project.basedir}/lib/org.eclipse.swt_3.7.2.v3740f.jar will be unresolvable by dependent projects