Spring Roo 2.0.0.RC1不知道自己的版本号

时间:2017-04-07 12:21:17

标签: spring spring-roo

当我启动roo.sh时,该命令记录了很多关于库版本和Roo版本的错误:

$ /opt/apps/ggg/spring-roo-2.0.0.RC1/bin/roo.sh
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: com.github.antlrjavaparser.antlr-java-parser:1.0.15
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.commons.codec:1.8.0
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.commons.io:2.4.0
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.commons.lang3:3.1.0
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.fusesource.jansi:1.6.0
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.jsoup:1.9.1
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.aries.subsystem.api:2.0.8
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.aries.subsystem.core:2.0.8
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.aries.util:1.1.1

... 更多“自动部署”警告,最后 ...

            _                               
 ___ _ __  _ __(_)_ __   __ _   _ __ ___   ___  
/ __| '_ \| '__| | '_ \ / _` | | '__/ _ \ / _ \ 
\__ \ |_) | |  | | | | | (_| | | | | (_) | (_) |
|___/ .__/|_|  |_|_| |_|\__, | |_|  \___/ \___/ 
    |_|                 |___/    UNKNOWN VERSION

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

如果我创建一个项目,创建的pom.xml文件中的Spring Roo版本为UNKNOWN VERSION

  <properties>
    <roo.version>UNKNOWN VERSION</roo.version>

然后,如果我修复了设置2.0.0 RC1版本的文件,当我再次启动Roo控制台时,它会显示我:

...
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.springframework.roo.wrapping.snakeyaml:1.15.1
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: slf4j.api:1.7.12
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: slf4j.jdk14:1.7.12
                _                               
 ___ _ __  _ __(_)_ __   __ _   _ __ ___   ___  
/ __| '_ \| '__| | '_ \ / _` | | '__/ _ \ / _ \ 
\__ \ |_) | |  | | | | | (_| | | | | (_) | (_) |
|___/ .__/|_|  |_|_| |_|\__, | |_|  \___/ \___/ 
    |_|                 |___/    UNKNOWN VERSION

Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
WARNING: You are using Spring Roo UNKNOWN VERSION, but project was generated using Spring Roo 2.0.0 RC1.
If you continue with the execution your project might suffer some changes.
Do you want to continue opening Spring Roo Shell?(YES/No)

如何解决版本问题?是否有可以设置版本号的文件?

2 个答案:

答案 0 :(得分:1)

我发现您正在执行以下文件夹中的roo.sh脚本:

/opt/apps/ggg

您是否在该文件夹中拥有管理员权限?您可以尝试在roo.sh文件夹中执行~/apps/ggg脚本吗?

如果有帮助,请告诉我。

此致

答案 1 :(得分:0)

我发现了问题:Spring Roo使用包含的文件夹的名称来知道自己的版本。将文件夹/opt/apps/ggg/roo重命名为/opt/apps/ggg/spring-roo-2.0.0.RC1后,按预期方式工作。

我知道从http://projects.spring.io/spring-roo/下载的分发文件中的原始名称是spring-roo-2.0.0.RC1(当我将zip解压缩到/opt/apps/ggg时我将其重命名),但我从未想过Spring使用过知道版本的文件夹名称,说实话,我从未见过这样的行为,但重命名文件夹名称可以解决问题。

感谢您的帮助。