I am trying to import RinSim 3.2.2 from Maven using IntelliJ IDEA. I'm running Windows 8.1 x64. The following is my POM file:
<?xml version="1.0" encoding="UTF-8"?>
<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>be.kuleuven.cs</groupId>
<artifactId>Multi-Agent_Systems</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.github.rinde</groupId>
<artifactId>rinsim-example</artifactId>
<version>3.2.2</version>
</dependency>
</dependencies>
</project>
The same POM file imports the library correctly in Eclipse, but when calling the Reimport function from within IntelliJ it resolves the dependencies incorrectly. The library depends on the SWT UI library, which is platform dependent. IntelliJ imports the 32-bit version on Windows instead of the 64-bit version. The architecture is selected using profiles in the POM file of RinSim's UI library.
I hacked around this issue by modifying my POM file to hardcode in the 64-bit dependency, but this is not a clean solution.
<?xml version="1.0" encoding="UTF-8"?>
<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>be.kuleuven.cs</groupId>
<artifactId>Multi-Agent_Systems</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>com.github.rinde</groupId>
<artifactId>rinsim-example</artifactId>
<version>3.2.2</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt.win32.win32.x86</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>swt-repo</id>
<name>SWT Repo</name>
<url>https://swt-repo.googlecode.com/svn/repo/</url>
</repository>
</repositories>
</project>
I'm trying to find out what causes the issue, the library's POM file seems to be correct. Perhaps IntelliJ has a bug causing this behavior, but I am unsure if that's the case.
I hope someone can offer me a solution to this problem or help me figure out the cause of the issue.