title: How to override the needle API when creating a blueprint?
body: <p>I'm actually working on a .Net Core blueprint for JHipster. The file tree is not the same as for the Java version and the needles don't work anymore. I need to override the needles in order to modify the paths in it.
  How to make the generator using the blueprint's needles and not the original ones ?</p>
  
  <p>I tried to extends the needles and to modify the paths in it but they are not taken into consideration. The JHipster's needles are always used. I also tried to see how the others blueprints as ViewJS and Kotlin manage the problem but no one override the needles. I also tried to find a documentation on the needle API but there is none.</p>
  
  <p>For example, the client's entities are no longer generated at the same path. So I tried to override the needle-client-angular.js.</p>
  
  <pre><code>const chalk = require('chalk');
  const _ = require('lodash');
  const needleClientAngular = require('generator-jhipster/generators/client/needle-api/needle-client-angular');
  const constants = require('generator-jhipster/generators/generator-constants');
  const dotnetConstants = require('../../generator-dotnetcore-constants');
  const jhipsterUtils = require('generator-jhipster/generators/utils');
  const toPascalCase = require('to-pascal-case');
  
  const CLIENT_MAIN_SRC_DIR = `${dotnetConstants.SERVER_SRC_DIR}${toPascalCase(this.baseName)}/ClientApp`;
  
  module.exports = class extends needleClientAngular {
      ...
  
      addEntityToMenu(routerName, enableTranslation, entityTranslationKeyMenu) {
          const errorMessage = `${chalk.yellow('Reference to ') + routerName} ${chalk.yellow('not added to menu.\n')}`;
          const entityMenuPath = `${CLIENT_MAIN_SRC_DIR}app/layouts/navbar/navbar.component.html`;
          const entityEntry =
              // prettier-ignore
              this.generator.stripMargin(`|&lt;li&gt;
                               |                        &lt;a class="dropdown-item" routerLink="${routerName}" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" (click)="collapseNavbar()"&gt;
                               |                            &lt;fa-icon icon="asterisk" fixedWidth="true"&gt;&lt;/fa-icon&gt;
                               |                            &lt;span${enableTranslation ? ` jhiTranslate="global.menu.entities.${entityTranslationKeyMenu}"` : ''}&gt;${_.startCase(routerName)}&lt;/span&gt;
                               |                        &lt;/a&gt;
                               |                    &lt;/li&gt;`);
          const rewriteFileModel = this.generateFileModel(entityMenuPath, 'jhipster-needle-add-entity-to-menu', entityEntry);
  
          this.addBlockContentToFile(rewriteFileModel, errorMessage);
      }
  
      ...
  }
  </code></pre>
  
  <p>Currently, I get this error, proof that the needle override is not used :</p>
  
  <blockquote>
    <p>Unable to find
    src/main/webapp/app/layouts/navbar/navbar.component.html or missing
    required jhipster-needle. Reference to bank-account not added to the
    menu</p>
  </blockquote>