Each Gurobi installation contains a jar library that can be used to access Gurobi Optimizer from java code. To use this library from a maven project, you need to first install that jar library into your maven repository.
C:\gurobi<version>\win64\lib
)mvn install:install-file -Dfile=<PATH TO GUROBI JAR> -DgroupId=com.gurobi -DartifactId=gurobi -Dversion=1.0 -Dpackaging=jar
Example:
mvn install:install-file -Dfile=/opt/gurobi910/linux64/lib/gurobi.jar -DgroupId=com.gurobi -DartifactId=gurobi -Dversion=1.0 -Dpackaging=jar
The Gurobi should be now accessible from Maven projects. To add it to your project, add the following dependency to your project|s pom file:
<dependency>
<groupId>com.gurobi</groupId>
<artifactId>gurobi</artifactId>
<version>1.0</version>
</dependency>