Whenever I run my Grails application,get the following error:
Error |
Resolve error obtaining dependencies: The following artifacts could not be resolved: org.compass-project:compass:jar:2.2.1
Resolve this error:
need add a couple of maven repos in BuildConfig.groovy
mavenRepo "https://repo.grails.org/grails/core"
mavenRepo "https://oss.sonatype.org/content/repositories/releases/"
mavenRepo "http://repo.spring.io/milestone"
And then:
grails compile --non-interactive --refresh-dependencies
Tested pass on grails 2.3.7
My BuildConfig.groovy
grails.servlet.version = "3.0" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.work.dir = "target/work"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
//grails.project.war.file = "target/$appName-$appVersion.war"
grails.project.fork = [
// configure settings for compilation JVM, note that if you alter the Groovy version forked compilation is required
// compile: [maxMemory: 256, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
// configure settings for the test-app JVM, uses the daemon by default
test: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
// configure settings for the run-app JVM
run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
// configure settings for the run-war JVM
war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
// configure settings for the Console UI JVM
console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256]
]
grails.project.dependency.resolver = "maven" // or ivy
grails.project.dependency.resolution =
// inherit Grails' default dependencies
inherits("global")
// specify dependency exclusions here; for example, uncomment this to disable ehcache:
// excludes 'ehcache'
log "error" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
checksums true // Whether to verify checksums on resolve
legacyResolve false // whether to do a secondary resolve on plugin installation, not advised and here for backwards compatibility
repositories
inherits true // Whether to inherit repository definitions from plugins
grailsPlugins()
grailsHome()
mavenLocal()
grailsCentral()
mavenCentral()
mavenRepo "https://repo.grails.org/grails/core"
mavenRepo "https://oss.sonatype.org/content/repositories/releases/"
mavenRepo "http://repo.spring.io/milestone"
// uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
//mavenRepo "http://repository.codehaus.org"
//mavenRepo "http://download.java.net/maven/2/"
//mavenRepo "http://repository.jboss.com/maven2/"
// dependencies
// // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
// // runtime 'mysql:mysql-connector-java:5.1.27'
// // runtime 'org.postgresql:postgresql:9.3-1100-jdbc41'
//
plugins
// plugins for the build system only
// build ":tomcat:7.0.54"
build ":tomcat:7.0.52.1"
// plugins for the compile step
compile ":scaffolding:2.0.3"
compile ':cache:1.1.1'
compile ":burning-image:0.5.1",
":joda-time:1.5",
":taggable:1.1.0"
// plugins needed at runtime but not for compilation
// runtime ":hibernate:3.6.10.9" // or ":hibernate4:4.3.4"
// runtime ":database-migration:1.3.8"
// runtime ":resources:1.2.7"
// runtime ":spring-security-core:2.0-RC4"
runtime ":avatar:0.3",
":rest-client-builder:2.0.3",
":cache:1.1.7",
":cache-headers:1.1.5",
":cached-resources:1.0",
":database-migration:1.4.0",
// ":disqus:0.2",
":feeds:1.5",
":greenmail:1.2.2",
":hibernate:3.6.10.15",
":jquery:1.11.0.2",
":jquery-ui:1.8.24",
":mail:1.0.5",
":pretty-time:0.3",
":quartz:1.0.1",
":resources:1.2.8",
":searchable:0.6.7",
":spring-events:1.2",
":spring-security-core:2.0-RC4",
":zipped-resources:1.0",
excludes 'spring-test', 'cglib'
runtime ":shiro:1.2.1",
exclude 'org.opensymphony.quartz:quartz'
runtime ":oauth:2.1.0"
runtime ":shiro-oauth:0.2",
excludes 'shiro-core'
// Uncomment these (or add new ones) to enable additional resources capabilities
//runtime ":zipped-resources:1.0.1"
//runtime ":cached-resources:1.1"
//runtime ":yui-minify-resources:0.1.5"
// An alternative to the default resources plugin is the asset-pipeline plugin
//compile ":asset-pipeline:1.6.1"
// Uncomment these to enable additional asset-pipeline capabilities
//compile ":sass-asset-pipeline:1.5.5"
//compile ":less-asset-pipeline:1.5.3"
//compile ":coffee-asset-pipeline:1.5.0"
//compile ":handlebars-asset-pipeline:1.3.0.1"
if (Environment.current == Environment.DEVELOPMENT)
compile ":build-test-data:2.1.2",
":fixtures:1.2"
else
test ":build-test-data:2.1.2",
":fixtures:1.2"
compile ":platform-core:1.0.M6"
runtime ":cache-ehcache:1.0.0", exclude "cache"
test ":geb:0.9.3",
excludes 'xml-apis'
exclude "spock-grails-support"
compile ":freemarker:0.1.1"
// compile ":freemarker-tags:0.7.2"
// compile ":twitter-bootstrap:3.2.0.2"
compile ":admin-interface:0.6.5"
// compile ":shiro:1.2.1"
compile ":ckeditor:4.4.1.0"
dependencies
compile "commons-collections:commons-collections:3.2.1"
compile "org.compass-project:compass:2.2.1"
compile('org.apache.lucene:lucene-highlighter:2.4.1',
'org.apache.lucene:lucene-analyzers:2.4.1',
'org.apache.lucene:lucene-queries:2.4.1',
'org.apache.lucene:lucene-snowball:2.4.1',
'org.apache.lucene:lucene-spellchecker:2.4.1')
// build "org.lesscss:lesscss:1.3.0"
//
// compile "org.grails:grails-gdoc-engine:1.0.1"
// compile "org.springframework.social:spring-social-twitter:1.0.5.RELEASE",
// "org.springframework:spring-context-support:3.2.8.RELEASE",
// "org.jadira.usertype:usertype.jodatime:1.9",
// "org.jsoup:jsoup:1.7.3"
//
// compile('org.apache.lucene:lucene-highlighter:2.4.1',
// 'org.apache.lucene:lucene-analyzers:2.4.1',
// 'org.apache.lucene:lucene-queries:2.4.1',
// 'org.apache.lucene:lucene-snowball:2.4.1',
// 'org.apache.lucene:lucene-spellchecker:2.4.1')
//
// compile "org.apache.shiro:shiro-core:1.2.2"
//
// test "org.gebish:geb-core:0.9.2",
// "org.gmock:gmock:0.8.3"
// test "org.codehaus.groovy.modules.http-builder:http-builder:0.7.1",
// excludes "commons-logging", "httpclient", "xml-apis", "groovy", "groovy-all", "xercesImpl", "nekohtml"
//
// test "org.seleniumhq.selenium:selenium-htmlunit-driver:2.41.0",
// excludes "htmlunit", "xml-apis"
//
// test "net.sourceforge.htmlunit:htmlunit:2.13",
// excludes "xml-apis", "commons-logging", "xercesImpl"
//
//
// test 'org.gebish:geb-spock:0.9.3'
//
// if (Environment.current == Environment.DEVELOPMENT)
// runtime "org.grails:grails-test:$grailsVersion"
//
//
// compile "org.springframework.cloud:cloudfoundry-connector:0.9.10.RELEASE"
// compile "org.springframework.cloud:spring-service-connector:0.9.10.RELEASE"
grails.project.fork.war.jvmArgs = [ '-Dinitial.admin.password=changeit', '-Dload.fixtures=1' ]
Grails - Resolve error obtaining dependencies org.compass-project:compass:jar:2.2.1