I clone the code from https://github.com/square/okhttp
And I want to read the source code of 3.10.0 version.
But it could not compile successfully.
gongzelong:okhttp gongzelong$ git branch
master
* parent-3.10.0
gongzelong:okhttp gongzelong$ mvn clean verify
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'build.plugins.plugin[org.apache.maven.plugins:maven-surefire-plugin].dependencies.dependency.version' for org.mortbay.jetty.alpn:alpn-boot:jar must be a valid version but is '${alpn.jdk8.version}'. @ com.squareup.okhttp3:parent:3.10.0, /Users/gongzelong/Android/okhttp/pom.xml, line 320, column 28
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.squareup.okhttp3:okhttp:3.10.0 (/Users/gongzelong/Android/okhttp/okhttp/pom.xml) has 1 error
[ERROR] 'build.plugins.plugin[org.apache.maven.plugins:maven-surefire-plugin].dependencies.dependency.version' for org.mortbay.jetty.alpn:alpn-boot:jar must be a valid version but is '${alpn.jdk8.version}'. @ com.squareup.okhttp3:parent:3.10.0, /Users/gongzelong/Android/okhttp/pom.xml, line 320, column 28
[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
After adding the code which is in my answer, it could run 'mvn clean verify'
But IDEA shows error like this: