Usually maven Jar which is installed will not really contain your test package "src/test/java". So, you can not execute your automation script using Jar built using maven by default.
If you want to include your test classes into your Jar file, you can use below plugin.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
And once Jar is built, you can use with scope as test.
<dependency>
<groupId>groupId</groupId>
<artifactId>artifactId</artifactId>
<type>test-jar</type>
<version>version</version>
<scope>test</scope>
</dependency>
Hope that answered your question.