Spring Roo 设置 Mac

Spring Roo Setup on Mac

我一直在阅读有关 Spring Roo 的文章,我非常想尝试一下,因为它将减少我的团队的大量手动数据输入类型的工作。但是安装真的很累。

我使用了 STS 并安装了 Roo 作为插件,我能够启动 Roo Shell 但它停止在 :

"请等待 Roo Shell 完全加载。"

而且我也没有看到任何工作区错误日志。

接下来,我尝试在没有 IDE 的情况下在我的终端上启动,但失败并出现以下错误:

svc-notes-MacBook-Pro:roo-test tkhader$ roo

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.felix.framework.util.SecureAction (file:/Users/tkhader/Documents/Junk/RooAutogen/spring-roo-2.0.0.RELEASE/bin/org.apache.felix.framework-5.4.0.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of org.apache.felix.framework.util.SecureAction
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
ERROR: Bundle com.github.antlrjavaparser.antlr-java-parser [1] Error starting file:/Users/tkhader/Documents/Junk/RooAutogen/spring-roo-2.0.0.RELEASE/bundle/antlr-java-parser-1.0.15.jar (org.osgi.framework.BundleException: Unable to resolve com.github.antlrjavaparser.antlr-java-parser [1](R 1.0): missing requirement [com.github.antlrjavaparser.antlr-java-parser [1](R 1.0)] osgi.wiring.package; (osgi.wiring.package=org.antlr.v4.runtime.atn) [caused by: Unable to resolve org.springframework.roo.wrapping.antlr4-runtime [81](R 81.0): missing requirement [org.springframework.roo.wrapping.antlr4-runtime [81](R 81.0)] osgi.wiring.package; (osgi.wiring.package=javax.annotation.processing)] Unresolved requirements: [[com.github.antlrjavaparser.antlr-java-parser [1](R 1.0)] osgi.wiring.package; (osgi.wiring.package=org.antlr.v4.runtime.atn)])
org.osgi.framework.BundleException: Unable to resolve com.github.antlrjavaparser.antlr-java-parser [1](R 1.0): missing requirement [com.github.antlrjavaparser.antlr-java-parser [1](R 1.0)] osgi.wiring.package; (osgi.wiring.package=org.antlr.v4.runtime.atn) [caused by: Unable to resolve org.springframework.roo.wrapping.antlr4-runtime [81](R 81.0): missing requirement [org.springframework.roo.wrapping.antlr4-runtime [81](R 81.0)] osgi.wiring.package; (osgi.wiring.package=javax.annotation.processing)] Unresolved requirements: [[com.github.antlrjavaparser.antlr-java-parser [1](R 1.0)] osgi.wiring.package; (osgi.wiring.package=org.antlr.v4.runtime.atn)]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.base/java.lang.Thread.run(Thread.java:844)

Roo 在 java 9 中不工作,我不得不降级到 java 8,它第一次工作。

svc-notes-MacBook-Pro:java6 tkhader$ jenv versions
  system
  1.6
  1.6.0.65
* 1.8 (set by /usr/local/Caskroom/java6/.java-version)
  1.8.0.162
  9.0
  9.0.4
  oracle64-1.6.0.65
  oracle64-1.8.0.162
  oracle64-9.0.4
svc-notes-MacBook-Pro:java6 tkhader$ jenv exec roo
                _                               
 ___ _ __  _ __(_)_ __   __ _   _ __ ___   ___  
/ __| '_ \| '__| | '_ \ / _` | | '__/ _ \ / _ \ 
\__ \ |_) | |  | | | | | (_| | | | | (_) | (_) |
|___/ .__/|_|  |_|_| |_|\__, | |_|  \___/ \___/ 
    |_|                 |___/      2.0.0.RELEASE

Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
roo> 

对我来说,有效的更改是将 java 版本从 10/9 更改为 8,