Roo 2.0.0 如何从 jar 添加插件?

Roo 2.0.0 how to add an addon from jar?

我想为 Timestamp 使用 Spring Roo 插件。 https://github.com/rcaloras/spring-roo-addon-timestamp

说明是

osgi start --url file://$PATH_TO_DOWNLOAD/com.rcaloras.roo.addon.timestamp-0.1.3-SNAPSHOT.jar
timestamp setup
timestamp all

但是 roo 回复了

Command not found for osgi. Has this changed for 2.0.0?

我也尝试过插件安装包、插件安装 url,但都无济于事。我已经下载了 jar 文件,但不知道如何让 roo 识别插件。或者,有没有办法在 Eclipse 中通过 spring STS 安装插件?

开发此插件是为了将其安装在 Spring Roo 1.2.5 上。你不能在 2.0 上安装它。 Spring Roo 2.0 有 mayor changes that makes it impossible (included a OSGi upgrade and a new system to handle add-ons).

另外,请记住当前的 Spring Roo 2.0.0 是一个 里程碑 ,而不是最终版本。不推荐用于生产环境。

另一方面,gvNIX jpa add-on can help you. This is developed for Spring Roo 1.3.0, and includes a add-on which includes this functionality (jpa audit setup, jpa audit add and jpa audit all). In addition this add-on can integrate your application with Hibernate Envers 存储您的实体 (jpa audit revisionLog) 上的所有更改。

祝你好运!