This will work on any VM. You can use profiles to have alternate configurations according to the environment.
A profile contains an activation block, which describes when to make the profile active, followed by the usual pom elements, such as dependencies:
<profiles>
<profile>
<activation>
<os>
<arch>x86</arch>
</os>
</activation>
<dependencies>
<dependency>
<!-- your 32-bit dependencies here -->
</dependency>
</dependencies>
</profile>
<profile>
<activation>
<os>
<arch>x64</arch>
</os>
</activation>
<dependencies>
<!-- your 64-bit dependencies here -->
</dependencies>
</profile>
</profiles>
As you mentioned DLLs, I'm assuming this is Windows-only, so you may also want to add <family>Windows</family>
under the <os>
tags.
EDIT: When mixing 32-bit VM on a 64-bit OS, you can see what value the VM is giving to the os.arch
system property by running the maven goal
mvn help:evaluate
And then entering
${os.arch}
Alternatively, the goal help:system
lists all system properties (in no particular order.)