1

我正在使用 giter8 为 Scala 服务创建模板。我想在模板中使用的字段是description. 然而,这似乎被保留为 Maven 属性。知道如何解决这个问题吗?

这些是我当前(工作)的属性:

description = Please answer the following questions:\n

id =
package = com.sebi.$id$

运行模板,我得到:

13:55 $ g8 file://blaze-service-template.g8/

Please answer the following questions:


id []: test
package [com.sebi.test]:

Template applied in ./.

这就是我想要实现的目标:

description = Please answer the following questions:\n

id =
package = com.sebi.$id$
description = Please describe $id$

运行模板,我得到:

13:56 $ g8 file://blaze-service-template.g8/

context [anonymous] 1:17 attribute id isn't defined
Please describe


context [anonymous] 1:17 attribute id isn't defined
Please describe

id []: test
package [com.sebi.test]:

Template applied in ./.

不知何故,使用description作为自定义字段会破坏 giter8。

如果我_description用作自定义字段,它可以工作:

14:00 $ g8 file://blaze-service-template.g8/

Please answer the following questions:


id []: test
package [com.sebi.test]:
_description [Please describe test]: A stackoverflow Minimal, Complete, and Verifiable example

Template applied in ./.

如果我使用_description必填字段,我会得到: 14:05 $ g8 file://blaze-service-template.g8/

context [anonymous] 1:17 attribute id isn't defined
Please describe

_description [Please answer the following questions:
]:
4

0 回答 0