-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Folder Template does not work properly on Windows #598
Comments
The template is indeed working as expected, since you are placing in the if just the
otherwise just the single path token will be elided (i.e. The only "side effect" in this solution is that in the Does it answer to your question @sebastianh001? |
@TonioGela: Tryed the proposed Solution using Sbt 1.5.5 but get the following error using the windows environment. The Soulution which i described worked well on unix but not on windows
|
Consider that you're literally trying to create a folder named "{package}" with curly braces and all. |
no the folder name is defined by the giter8 template variable package. it should generate a folder structure like this: |
steps
I setup my template as follows to support both java and scala templates. This can be decided by using the scala respectively java parameter (true/false)
src/main/$if(java.truthy)$java$endif$/$package$/Class.scala
src/main/$if(scala.truthy)$scala$endif$/$package$/Class.java
problem
If i run this template on Windows using sbt new file://{templatepath} (SBT 1.5.5)
if java = true and scala = false it will produce the following dirs:
src/main/java/{package}/Class.java
src/main/{package}/Class.scala
and if scala = true and java = false to:
src/main/scala/{package}/Class.scala
src/main/{package}/Class.java
Which is not as expected
expectation
this should be evaluated if java = true and scala = false to:
src/main/java/{package}/Class.java
and if scala = true and java = false to:
src/main/scala/{package}/Class.scala
This works properly on an Unix System (SBT 1.5.5) but does not work correctly on an Windows machine (SBT 1.5.5) (using the same template)
notes
The text was updated successfully, but these errors were encountered: