This is just my progress of learning algorithms from Princeton Course by Robert Sedgewik and Kevin Wayne.
To install algs4.jar
for Maven project:
-
Download jar-file
-
Install it in
.m2
(local Maven repository) so you will be able to use it in different projects:mvn install:install-file -Dfile=<path-to-file> -DgroupId=edu.princeton.cs -DartifactId=algs4 -Dversion=1.0 -Dpackaging=jar -DgeneratePom=true
Where: the path to the file to load the group that the file should be registered under the artifact name for the file the version of the file the packaging of the file e.g. jar
-
Add a dependency to the
pom.xml
:<dependency> <groupId>edu.princeton.cs</groupId> <artifactId>algs4</artifactId> <version>1.0</version> </dependency>
-
Or just add it directly to the
pom.xml
:<dependency> <groupId>edu.princeton.cs</groupId> <artifactId>algs4</artifactId> <version>1.0</version> <scope>system</scope> <systemPath>${project.basedir}/path/to/jar/algs4.jar</systemPath> </dependency>