There are some problems when containerizing a Grails project. I have never contacted Grails before. This problem has troubled me for a long time. I hope you can help me solve it
grails-app/conf/BuildConfig.groovy:
grails.servlet.version = "2.5"
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.target.level = 1.7
grails.project.source.level = 1.7
grails.server.port.http = 8080
grails.project.dependency.resolver = "maven"
grails.project.dependency.resolution = {
inherits("global") {}
log "warn"
checksums true
legacyResolve false
repositories {
inherits true
grailsPlugins()
grailsHome()
mavenLocal()
grailsCentral()
mavenRepo "our maven Repo"
mavenCentral()
}
dependencies {
compile group: 'com.ctrip.framework.apollo', name: 'apollo-client', version: '0.11.0-SNAPSHOT'
compile group: 'com.alibaba', name: 'dubbo', version: '2.6.0'
compile('org.apache.zookeeper:zookeeper:3.4.9') {
excludes 'slf4j-log4j12'
}
compile group: 'com.101tec', name: 'zkclient', version: '0.2'
compile group: 'com.google.guava', name: 'guava', version: '18.0'
}
plugins {
build ":tomcat:7.0.55.3"
runtime ":hibernate4:4.3.10"
runtime ":shiro:1.2.1"
}
}
When using the docker image proactivehk/grails:2.5.0 (image link) to package the project, the following error occurred
| Error Resolve error obtaining dependencies: The following artifacts could not be resolved: org.grails.plugins:hibernate4:zip:4.3.10, org.grails.plugins:shiro:zip:1.2.1: Could not transfer artifact org.grails.plugins:hibernate4:zip:4.3.10 from/to grailsCentral (https://repo.grails.org/grails/plugins): Received fatal alert: handshake_failure (Use --stacktrace to see the full trace)
DockerFile:
FROM proactivehk/grails:2.5.0
WORKDIR /app
COPY . .
CMD grails prod war
I also tried using the command grails -Dhttps.protocols=TLSv1.1,TLSv1.2 prod war
I can run or package this project normally in the local IDE (windows / IntelliJ IDEA), but I don't know why it can't work normally in the container.
Well I would say it's because Grails has removed all community plugins for 2.0 AND bintray is now offline as well... but if I say something like that they will delete this comment. ;)