3

I tried to build DXA 1.5 distribution these days, but it has errors like below:

[ERROR] Failed to execute goal on project cea-webapp: Could not resolve dependencies for project com.cea.dxa:cea-webapp:war:1.0-SNAPSHOT: Failed to collect dependencies at com.sdl.dxa:dxa-web8-provider:jar:1.5.0 -> com.sdl.web:cil:pom:8.2.0-1011 -> com.sdl.web:xo-client:jar:8.2.0 -> com.sdl.web:content-client-api:jar:8.2.0-1008: Failed to read artifact descriptor for com.sdl.web:content-client-api:jar:8.2.0-1008: Could not transfer artifact com.sdl.web:content-client-api:pom:8.2.0-1008 from/to local-project-repo (file:///${project.basedir}/../../local-project-repo): Repository path /${project.basedir}/../../local-project-repo does not exist, and cannot be created.

my steps to build my solution are:

  1. download dxa-web-application-java-release-1.5 from github

  2. run gradlew.sh

  3. generate my web application cea-webapp by using dxa-webapp-archetype

  4. Add dependencies into pom of cea-webapp, such as dxa common api, dxa existing modules, spring related,

  5. build cea-webapp. when building it, error occurs as above.

Can anybody tell me what's wrong with me?

3

It tries to get a dependency com.sdl.web:content-client-api:jar:8.2.0-1008 which doesn't exist in Maven Central. com.sdl.web:xo-client:jar:8.2.0 is dependent on it. The problem can be workarounded if you specify an explicit dependency in your Webapp's pom.xml.

<dependency>
    <groupId>com.sdl.web</groupId>
    <artifactId>content-client-api</artifactId>
    <version>8.2.0-1009</version>
</dependency>

It that's not enough, also exclude it from CIL.

<dependency>
    <groupId>com.sdl.web</groupId>
    <artifactId>cil</artifactId>
    <type>pom</type>
    <exclusions>
        <exclusion>
            <groupId>com.sdl.web</groupId>
            <artifactId>content-client-api</artifactId>
        </exclusion>
    </exclusions>
</dependency>

UPDATE:

The issue with content-client-api is fixed and 1008 version is now available in Maven Central. http://search.maven.org/#artifactdetails%7Ccom.sdl.web%7Ccontent-client-api%7C8.2.0-1008%7Cjar

If it doesn't resolve, try cleaning your Maven repository, the previous attempt may be cached.

0

I have seen errors like Repository path /${project.basedir}/../../local-project-repo does not exist, and cannot be created. before when building on a Mac. Try to add a local-project-repo repo to your pom and point it to an existing empty directory.

add this to your pom

<repositories>
    <repository>
        <id>local-project-repo</id>
        <url>file:///${project.basedir}/local-project-repo</url>
    </repository>
</repositories>
  • local-project-repo contains artifacts which are intentionally not in Maven Central (for any reason), like e.g. custom DD4T. Since CIL is a public stuff, this has nothing related to local-project-repo – Alexey Jul 8 '16 at 12:49
  • Indeed, the error message is a bit misleading because it blames this last resort (the local repo), but the root cause was a wrong dependency version in Maven Central. – Rick Pannekoek Jul 8 '16 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.