1

We are trying to compile the DXA 1.4 java code through maven but facing some issues in compilation.

is it possible to get all the required code in one project?


 D:\SDL-DXA-java\sh_dxa_git_1_4\dxa-web-application-java\dxa-framework>mvn clean package
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Failure to find com.sdl.dxa:dxa-bom:pom:1.5.0-SNAPSHOT in file:///D:\SDL-DXA-java\sh_dxa_git_1_4\dxa-web-application-java\dxa-framework/../../local-project-repo was cached in the local repository, resolution will not be reattempted until the update interval of local-project-repo has elapsed or updates are forced @ line 71, column 25
[ERROR] 'dependencies.dependency.version' for ch.qos.logback:logback-core:jar is missing. @ line 83, column 21[ERROR] 'dependencies.dependency.version' for org.slf4j:slf4j-api:jar is missing. @ line 87, column 21
[ERROR] 'dependencies.dependency.version' for org.slf4j:jcl-over-slf4j:jar is missing. @ line 91, column 21
[ERROR] 'dependencies.dependency.version' for ch.qos.logback:logback-classic:jar is missing. @ line 95, column 21
[ERROR] 'dependencies.dependency.version' for cglib:cglib:jar is missing. @ line 116, column 21
[ERROR] 'dependencies.dependency.version' for junit:junit:jar is missing. @ line 122, column 21
[ERROR] 'dependencies.dependency.version' for org.hamcrest:hamcrest-core:jar is missing. @ line 126, column 21
[ERROR] 'dependencies.dependency.version' for org.hamcrest:hamcrest-library:jar is missing. @ line 130, column 21
[ERROR] 'dependencies.dependency.version' for org.mockito:mockito-all:jar is missing. @ line 134, column 21
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-test:jar is missing. @ line 138, column 21
[ERROR] 'dependencies.dependency.version' for net.sf.ehcache:ehcache:jar is missing. @ line 143, column 21
[ERROR] 'dependencies.dependency.version' for org.ehcache:jcache:jar is missing. @ line 147, column 21
[ERROR] 'dependencies.dependency.version' for javax.cache:cache-api:jar is missing. @ line 151, column 21
[ERROR] 'dependencies.dependency.version' for org.projectlombok:lombok:jar is missing. @ line 156, column 21 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.sdl.dxa:dxa-framework:1.5.0-SNAPSHOT (D:\SDL-DXA-java\sh_dxa_git_1_4\dxa-web-application-java\dxa-framework\pom.xml) has 15 errors
[ERROR]     Non-resolvable import POM: Failure to find com.sdl.dxa:dxa-bom:pom:1.5.0-SNAPSHOT in file:///D:\SDL-DXA-java\sh_dxa_git_1_4\dxa-web-application-java\dxa-framework/../../local-project-repo was cached in the local repository, resolution will not be reattempted until the update interval of local-project-repo has elapsed or updates are forced @ line 71, column 25 -> [Help 2]
[ERROR]     'dependencies.dependency.version' for ch.qos.logback:logback-core:jar is missing. @ line 83, column 21
[ERROR]     'dependencies.dependency.version' for org.slf4j:slf4j-api:jar is missing. @ line 87, column 21
[ERROR]     'dependencies.dependency.version' for org.slf4j:jcl-over-slf4j:jar is missing. @ line 91, column 21
[ERROR]     'dependencies.dependency.version' for ch.qos.logback:logback-classic:jar is missing. @ line 95, column 21
[ERROR]     'dependencies.dependency.version' for cglib:cglib:jar is missing. @ line 116, column 21
[ERROR]     'dependencies.dependency.version' for junit:junit:jar is missing. @ line 122, column 21
[ERROR]     'dependencies.dependency.version' for org.hamcrest:hamcrest-core:jar is missing. @ line 126, column 21
[ERROR]     'dependencies.dependency.version' for org.hamcrest:hamcrest-library:jar is missing. @ line 130, column 21
[ERROR]     'dependencies.dependency.version' for org.mockito:mockito-all:jar is missing. @ line 134, column 21
[ERROR]     'dependencies.dependency.version' for org.springframework:spring-test:jar is missing. @ line 138, column 21
[ERROR]     'dependencies.dependency.version' for net.sf.ehcache:ehcache:jar is missing. @ line 143, column 21
[ERROR]     'dependencies.dependency.version' for org.ehcache:jcache:jar is missing. @ line 147, column 21
[ERROR]     'dependencies.dependency.version' for javax.cache:cache-api:jar is missing. @ line 151, column 21
[ERROR]     'dependencies.dependency.version' for org.projectlombok:lombok:jar is missing. @ line 156, column 21
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

D:\SDL-DXA-java\sh_dxa_git_1_4\dxa-web-application-java\dxa-framework>

2 Answers 2

3

In DXA all the dependency management was moved to dxa-bom and dxa-bom-2013sp1 artifacts, and now versions are managed for the whole framework in one place. That was needed to get rid of multiple versions of same artifacts used by DXA in multiple places.

In your case com.sdl.dxa:dxa-bom:pom:1.5.0-SNAPSHOT cannot be resolved, and thus versions of artifacts are not available. There are two possible solutions:

2

Are you sure you are compiling DXA 1.4 Java source code? The reference to 1.5.0-SNAPSHOT implies it's DXA 1.5 pre-release code.

Note that the master branch on GitHub currently indeed represents DXA 1.5 pre-release (DXA 1.5 Sprint 2). To get DXA 1.4 code, you should use the release/1.4 branch.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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