1

I am using giter8 to create a template for Scala services. Among the fields that I want to use in the template is description. However this seems to be reserved as a Maven property. Any idea how I can work around this?

These are my current (working) properties:

description = Please answer the following questions:\n

id =
package = com.sebi.$id$

Running the template, i get:

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

Please answer the following questions:


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

Template applied in ./.

This is what i want to achieve:

description = Please answer the following questions:\n

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

Running the template, i get:

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 ./.

Somehow, using description as a custom field breaks giter8.

If i use _description as a custom field, it works:

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 ./.

If i use _description for the required field, i get: 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:
]:
sebi
  • 1,791
  • 3
  • 25
  • 43
  • 1
    What do you mean by "reserved"? The linked example shows usage of `maven(...)`, it's not about `description` field. Please, explain better what you're trying to do and what doesn't work as expected. – laughedelic Dec 09 '16 at 14:15
  • @laughedelic `description` on the first line seems to be a requirement. If i replace it with `desc`, for example, my template breaks: `des [Please answer the following questions: [there_is_actually_a_new_line_here] ]:`. – sebi Dec 13 '16 at 11:28
  • 1
    `description` on the first line _is not_ a requirement for a giter8 template. I don't understand the code that you post. Why are there two `description`s? Please, prepare a minimal template for your problem. See http://stackoverflow.com/help/mcve – laughedelic Dec 13 '16 at 11:31
  • @laughedelic thanks for your patience, made some changes to the question. It's not really minimal, but i hope its complete and verifiable – sebi Dec 13 '16 at 12:12
  • 1
    Now the problem is clear! I think this is a bug in giter8 and it has been [reported](https://github.com/foundweekends/giter8/issues/99). – laughedelic Dec 13 '16 at 12:34

0 Answers0