@@ -26,6 +26,7 @@ public class Installer {
2626
2727 private static final String userHome = System .getProperty ("user.home" );
2828 private static final String wpilibUrl = "http://first.wpi.edu/FRC/roborio/maven" ;
29+ private static final String githubRepo = "https://github.com/SamCarlberg/opencv-maven/raw/mvn-repo" ;
2930 private static final String mavenLocal = userHome + "/.m2/repository" ;
3031 private static final Path tmpDir ;
3132 private static final Path unzippedDir ;
@@ -209,7 +210,7 @@ private static void install(ArtifactType type) {
209210 File local = resolveLocal (artifactId , v );
210211 File source ;
211212 if (!local .exists ()) {
212- copyToMavenLocal (wpilibUrl , groupId , artifactId , v );
213+ copyToMavenLocal (githubRepo , groupId , artifactId , v );
213214 }
214215 if (local .exists ()) {
215216 System .out .println ("Using local file at " + local .toURI ());
@@ -236,7 +237,7 @@ private static void install(ArtifactType type) {
236237 }
237238
238239 private static URL resolveRemote (String artifactId , String version ) throws MalformedURLException {
239- return new URL (resolveRelative (wpilibUrl , artifactId , version ));
240+ return new URL (resolveRelative (githubRepo , artifactId , version ));
240241 }
241242
242243 private static File resolveLocal (String artifactId , String version ) {
@@ -320,6 +321,9 @@ private static Path copyToMavenLocal(String repo, String groupId, String artifac
320321 String remoteDir = String .format ("%s/%s/%s/%s/" , repo , groupId .replace ('.' , '/' ), artifactId , version );
321322 String name = String .format ("%s-%s" , artifactId , version );
322323 String dstDir = remoteDir .replace (repo , mavenLocal );
324+ if (!Files .exists (Paths .get (dstDir ))) {
325+ Files .createDirectories (Paths .get (dstDir ));
326+ }
323327
324328 String jar = name + ".jar" ;
325329 String jarPath = remoteDir + jar ;
0 commit comments