Adding Maven Dependency with Command Line

I just installed Maven 3 - I am new to Java and I want to learn how Maven works. At the moment, I know that I can add a dependency by editing the POM file in a maven project, but I'm wondering if there is a "clean" way to do this with the command line. Running Windows 8.1, Java 8, Maven 3.

+3


source to share


1 answer


Using the POM directly is probably the best way ... but yes, you can:

mvn install: install-file -Dfile = -DgroupId = "group-id" \ -DartifactId = "artifact-id" -Dversion = "version" -Dpackaging = "packaging"



https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

+2


source







All Articles