I would like to have a property/argument on Maven that will install a different dependency depending on the argument.
That is, when a user specifies -DgpuCuda=True
, the dependency on the pom.xml will change accordingly.
So mvn -gpuCuda=True install
will install DL4J-GPU instead of DL4J-CPU.
If -gpuCuda=True is specified, then this will be installed:
<dependency>
<groupId>org.nd4j</groupId>
<artifactId>nd4j-cuda-10.1</artifactId>
<version>1.0.0-beta4</version>
</dependency>
If -gpuCuda=False, this will be installed:
<dependency>
<groupId>org.nd4j</groupId>
<artifactId>nd4j-native</artifactId>
<version>1.0.0-beta4</version>
</dependency>
Is this possible? What would a workaround be? Thanks!!