0

I'm working on a project and I need slick-util, which doesn't have really good support or anything atm. The problem is that I am using a maven system and there is no maven repository. I was wondering if I should use something like:

<groupId>slick</groupId>
<artifactId>slick-util</artifactId>
<version>1.0</version>
<systemPath>http://whatever.com/slick/slick-util.jar</systempath>
<scope>system</scope>

I tried doing something like that, but IntelliJ Idea(my ide) says it cannot find the directory. Is there something I am doing wrong, or if this won't work, is there another method of accomplishing what I want?

eltabo
  • 3,749
  • 1
  • 21
  • 33
lolzballs
  • 13
  • 3
  • possible duplicate of [Maven: downloading files from url](http://stackoverflow.com/questions/2741806/maven-downloading-files-from-url) - there are actually a couple different maven plugins for doing this. – Brian Roach Feb 04 '14 at 01:38
  • possible duplicate of [Maven: Including jar not found in public repository](http://stackoverflow.com/questions/1355548/maven-including-jar-not-found-in-public-repository) – oberlies Feb 06 '14 at 15:05

4 Answers4

3

A system dependency will not read from a URL.

Your reasonable choices are:

  1. obtain and install a repo manager, such as Nexus or Artifactory.
  2. mvn install:install-file to put it into your local repo.
bmargulies
  • 97,814
  • 39
  • 186
  • 310
0

You have a few options.

1) Do a plain mvn install so Maven can find slick-util in your local .m2 repository.

2) Publish the jar to a local Nexus or Artifactory repository, and identify the repository url within the repositories section of the pom.

3) Do an mvn installl:install-file so Maven can find the jar in another folder:

mvn install:install-file -Dfile=<path-to-file> 
                         -DgroupId=<myGroup> 
                         -DartifactId=<myArtifactId> 
                         -Dversion=<myVersion> 
                         -Dpackaging=<myPackaging> 
                         -DlocalRepositoryPath=<path-to-repo>

Here is information on the Maven install plugin.

Vidya
  • 29,932
  • 7
  • 42
  • 70
0

1) Download slick-util.jar into your PC

2) Install it to your local repository giving it some group name and version, for example:

mvn install:install-file -Dfile=/path/to/slick-util.jar -DgroupId=slick-util -DartifactId=slick-util -Dversion=1.0 -Dpackaging=jar

3) Add the dependency to your pom

<dependency>
  <groupId>slick-util</groupId>
  <artifactId>slick-util</artifactId>
  <version>1.0</version>
</dependency>
gerrytan
  • 40,313
  • 9
  • 84
  • 99
0

Slick Util is in Maven but in separate repository - Clojars not Central. See here.

enter image description here

What you need is to add this into your pom.xml:

<repositories>
    <repository>
        <id>clojars</id>
        <url>http://clojars.org/repo/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>slick-util</groupId>
        <artifactId>slick-util</artifactId>
        <version>1.0.0</version>
    </dependency>
</dependencies>
Aunmag
  • 852
  • 12
  • 17