title: How to generate JHipster source files multiple times using a loop?
body: <p>In generator-jhipster repository, specifically files.js in ../generators/server/files.js, it generates java source files and directories based on some conditions. </p>
  
  <p>For example:</p>
  
  <pre><code>  {
              condition: generator =&gt; generator.databaseType === 'cassandra',
              path: SERVER_MAIN_SRC_DIR,
              templates: [
                  {
                      file: 'package/config/cassandra/CassandraConfiguration.java',
                      renameTo: generator =&gt; `${generator.javaDir}config/cassandra/CassandraConfiguration.java`
                  }
              ]
     }
  
  </code></pre>
  
  <p>This will take the template file CassandraConfiguration.java.ejs in the package/config/cassandra directory and generate the java source file CassandraConfiguration.java upon running the jhipster application successfully. </p>
  
  <p>My question: is it possible to generate multiple CassandraConfiguration.java files (suppose with different names, such as: CassandraConfiguration0.java, CassandraConfiguration1.java, etc...) inside this template with a "LOOP"? I know I could run a loop with make directories (mkdirp), but I'm not sure how to apply it on making files, because it wouldn't let me create a loop inside the templates: [].</p>
  
  <p><strong>Is this possible?</strong> (I'm not familiar with the syntax of yeoman):</p>
  
  <pre><code>  {
          for(var i = 0; i &lt; 3; i++) {
              condition: generator =&gt; generator.databaseType === 'cassandra',
              path: SERVER_MAIN_SRC_DIR,
              templates: [
                  {
                      file: 'package/config/cassandra/CassandraConfiguration.java',
                      renameTo: generator =&gt; `${generator.javaDir}config/cassandra/CassandraConfiguration[i].java`
                  }
               ]
           }
     }
  
  </code></pre>
  
  <p>This should generate: CassandraConfiguration0.java, CassandraConfiguration1.java and CassandraConfiguration2.java respectively.</p>