Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
commons:codec dependency not found
I've just recently been getting an error in Liferay IDE (Eclipse) when trying to create portlets from the plugins SDK in 6.2. I've done some research and most have solved this and similar issues by starting with a clean workspace. This really is unacceptable, this issue needs to be remedied if it's in fact a liferay bug. Please advise with an actual fix. Looks like the link is broken
http://cdn.repository.liferay.com/nexus/content/groups/public/commons-codec/commons-codec/1.9/commons-codec-1.9.pom
HMAP-042-MAC005:themes kneibarger$ ./create.sh compass-theme "Compass Theme"
Parallel execution with configuration on demand is an incubating feature.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'liferay-plugins-sdk-6.2-SANDBOX'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve commons-codec:commons-codec:1.9.
Required by:
:liferay-plugins-sdk-6.2-SANDBOX:unspecified
> Could not resolve commons-codec:commons-codec:1.9.
> Could not get resource 'http://cdn.repository.liferay.com/nexus/content/groups/public/commons-codec/commons-codec/1.9/commons-codec-1.9.pom'.
> Could not HEAD 'http://cdn.repository.liferay.com/nexus/content/groups/public/commons-codec/commons-codec/1.9/commons-codec-1.9.pom'.
> org.apache.http.client.ClientProtocolException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 5.085 secs
http://cdn.repository.liferay.com/nexus/content/groups/public/commons-codec/commons-codec/1.9/commons-codec-1.9.pom
HMAP-042-MAC005:themes kneibarger$ ./create.sh compass-theme "Compass Theme"
Parallel execution with configuration on demand is an incubating feature.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'liferay-plugins-sdk-6.2-SANDBOX'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve commons-codec:commons-codec:1.9.
Required by:
:liferay-plugins-sdk-6.2-SANDBOX:unspecified
> Could not resolve commons-codec:commons-codec:1.9.
> Could not get resource 'http://cdn.repository.liferay.com/nexus/content/groups/public/commons-codec/commons-codec/1.9/commons-codec-1.9.pom'.
> Could not HEAD 'http://cdn.repository.liferay.com/nexus/content/groups/public/commons-codec/commons-codec/1.9/commons-codec-1.9.pom'.
> org.apache.http.client.ClientProtocolException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 5.085 secs
I figured out a work-a-round that actually fixes the issue. The issue is that the liferay CDN link is not working.
http://cdn.repository.liferay.com/
This always results in a "Page Not Working" error.. Go to you PLUGINS_HOME directory and edit the file sdk.gradle. The following buildscript section should look like the below. The liferay repository link should be fixed, and if it isn't some documentation on where it is.
buildscript { dependencies { classpath group: "commons-codec", name: "commons-codec", version: "1.9" }
repositories { mavenCentral() //maven { //url "http://cdn.repository.liferay.com/nexus/content/groups/public //} }}
http://cdn.repository.liferay.com/
This always results in a "Page Not Working" error.. Go to you PLUGINS_HOME directory and edit the file sdk.gradle. The following buildscript section should look like the below. The liferay repository link should be fixed, and if it isn't some documentation on where it is.
buildscript { dependencies { classpath group: "commons-codec", name: "commons-codec", version: "1.9" }
repositories { mavenCentral() //maven { //url "http://cdn.repository.liferay.com/nexus/content/groups/public //} }}
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™