You have basically three way to use a Maven project.
1) You can import the Maven project into your IDE.
2) You can download the dependencies and store them where you have the other libraries of your application.
In Maven you can download the jars with the following command:
mvn install dependency:copy-dependencies
The jars are in the
target/dependency directory.
3) You can build a fat-jar, i.e. a single jar containing all the dependencies needed by the application.
To build a fat-jar you must add the following code to the
<plugins>section of
pom.xml :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>assemble-all</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
Then issue the command:
mvn package
The command creates in
target directory a file with name
example-Quickstart-client-java-2.0-jar-with-dependencies.jar.
To run the application, then issue the command:
java -cp example-Quickstart-client-java-2.0-jar-with-dependencies.jar quickstart.Main chat
http://push.lightstreamer.com