Skip to main content
added 11 characters in body
Source Link
Javed Khan
  • 321
  • 1
  • 6

It is because Maven look for dependencies in your local repository first, if not found there then in Maven Central.

All those missing dependencies are neither available in your local repository nor in Maven Central Repository. I came across the same problem and what i did is following:

  1. Copied all the jars from my SDL Web8 setup folder[Most of them are present in "Content Delivery"] some of them were not there i searched them in maven central too, like. http://mvnrepository.com/artifact/com.tridion/cd_modelhttp://mvnrepository.com/artifact/com.tridion/cd_model/8.1.1-1005
  2. Once i got all the jars, i placed them in one folder and renamed them as expected by my pom(like in your case it should look like cd_ambient-8.1.0)
  3. After getting all of them renamed, made a batch file "maven-install.bat" which contained following maven commands[You can run them one by one too.]
    REM see DD4T dependency naming on https://github.com/dd4t/dd4t-2-java/blob/develop/README.md

    @echo off
    rem Install Tridion Content Delivery libraries and necessary third-party libraries in the local Maven repository
    
    echo Installing Tridion Content Delivery libraries into the local Maven repository...
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_ambient         -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_ambient-8.1.0.jar
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_cache           -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_cache-8.1.0.jar
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_core            -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_core-8.1.0.jar
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_model           -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_model-8.1.0.jar
    
    echo Installing third-party libraries into the local Maven repository...
    call mvn install:install-file -DgroupId=com.vs.ezlicrun -DartifactId=easylicense -Dversion=2.5 -Dpackaging=jar -Dfile=easylicense-2.5.jar
    
    echo Finished
    pause

Moved this maven-install.bat file in the same folder where i placed all my jars. And by running this file, all my mentioned jars got installed in my local maven repository.

Build you project and these jars will be referenced and will become part of your project's Maven Dependencies.

It is because Maven look for dependencies in your local repository first, if not found there then in Maven Central.

All those missing dependencies are neither available in your local repository nor in Maven Central Repository. I came across the same problem and what i did is following:

  1. Copied all the jars from my SDL Web8 setup folder[Most of them are present in "Content Delivery"] some of them were not there i searched them in maven central too, like. http://mvnrepository.com/artifact/com.tridion/cd_model
  2. Once i got all the jars, i placed them in one folder and renamed them as expected by my pom(like in your case it should look like cd_ambient-8.1.0)
  3. After getting all of them renamed, made a batch file "maven-install.bat" which contained following maven commands[You can run them one by one too.]
    REM see DD4T dependency naming on https://github.com/dd4t/dd4t-2-java/blob/develop/README.md

    @echo off
    rem Install Tridion Content Delivery libraries and necessary third-party libraries in the local Maven repository
    
    echo Installing Tridion Content Delivery libraries into the local Maven repository...
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_ambient         -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_ambient-8.1.0.jar
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_cache           -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_cache-8.1.0.jar
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_core            -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_core-8.1.0.jar
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_model           -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_model-8.1.0.jar
    
    echo Installing third-party libraries into the local Maven repository...
    call mvn install:install-file -DgroupId=com.vs.ezlicrun -DartifactId=easylicense -Dversion=2.5 -Dpackaging=jar -Dfile=easylicense-2.5.jar
    
    echo Finished
    pause

Moved this maven-install.bat file in the same folder where i placed all my jars. And by running this file, all my mentioned jars got installed in my local maven repository.

Build you project and these jars will be referenced and will become part of your project's Maven Dependencies.

It is because Maven look for dependencies in your local repository first, if not found there then in Maven Central.

All those missing dependencies are neither available in your local repository nor in Maven Central Repository. I came across the same problem and what i did is following:

  1. Copied all the jars from my SDL Web8 setup folder[Most of them are present in "Content Delivery"] some of them were not there i searched them in maven central too, like. http://mvnrepository.com/artifact/com.tridion/cd_model/8.1.1-1005
  2. Once i got all the jars, i placed them in one folder and renamed them as expected by my pom(like in your case it should look like cd_ambient-8.1.0)
  3. After getting all of them renamed, made a batch file "maven-install.bat" which contained following maven commands[You can run them one by one too.]
    REM see DD4T dependency naming on https://github.com/dd4t/dd4t-2-java/blob/develop/README.md

    @echo off
    rem Install Tridion Content Delivery libraries and necessary third-party libraries in the local Maven repository
    
    echo Installing Tridion Content Delivery libraries into the local Maven repository...
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_ambient         -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_ambient-8.1.0.jar
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_cache           -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_cache-8.1.0.jar
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_core            -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_core-8.1.0.jar
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_model           -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_model-8.1.0.jar
    
    echo Installing third-party libraries into the local Maven repository...
    call mvn install:install-file -DgroupId=com.vs.ezlicrun -DartifactId=easylicense -Dversion=2.5 -Dpackaging=jar -Dfile=easylicense-2.5.jar
    
    echo Finished
    pause

Moved this maven-install.bat file in the same folder where i placed all my jars. And by running this file, all my mentioned jars got installed in my local maven repository.

Build you project and these jars will be referenced and will become part of your project's Maven Dependencies.

Source Link
Javed Khan
  • 321
  • 1
  • 6

It is because Maven look for dependencies in your local repository first, if not found there then in Maven Central.

All those missing dependencies are neither available in your local repository nor in Maven Central Repository. I came across the same problem and what i did is following:

  1. Copied all the jars from my SDL Web8 setup folder[Most of them are present in "Content Delivery"] some of them were not there i searched them in maven central too, like. http://mvnrepository.com/artifact/com.tridion/cd_model
  2. Once i got all the jars, i placed them in one folder and renamed them as expected by my pom(like in your case it should look like cd_ambient-8.1.0)
  3. After getting all of them renamed, made a batch file "maven-install.bat" which contained following maven commands[You can run them one by one too.]
    REM see DD4T dependency naming on https://github.com/dd4t/dd4t-2-java/blob/develop/README.md

    @echo off
    rem Install Tridion Content Delivery libraries and necessary third-party libraries in the local Maven repository
    
    echo Installing Tridion Content Delivery libraries into the local Maven repository...
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_ambient         -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_ambient-8.1.0.jar
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_cache           -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_cache-8.1.0.jar
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_core            -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_core-8.1.0.jar
    call mvn install:install-file -DgroupId=com.tridion -DartifactId=cd_model           -Dversion=8.1.0 -Dpackaging=jar -Dfile=cd_model-8.1.0.jar
    
    echo Installing third-party libraries into the local Maven repository...
    call mvn install:install-file -DgroupId=com.vs.ezlicrun -DartifactId=easylicense -Dversion=2.5 -Dpackaging=jar -Dfile=easylicense-2.5.jar
    
    echo Finished
    pause

Moved this maven-install.bat file in the same folder where i placed all my jars. And by running this file, all my mentioned jars got installed in my local maven repository.

Build you project and these jars will be referenced and will become part of your project's Maven Dependencies.