public void generateRestServicesMap(){
  try {
    File metaInfFile=getMetaInfFile();
    File serviceMapFile=new File(metaInfFile,"crux-rest");
    if (serviceMapFile.exists() && !isOverride()) {
      logger.info("REST Service map already exists. Skipping generation...");
      return;
    }
    initializeScannerURLs();
    Set<String> restServices=ClassScanner.searchClassesByAnnotation(RestService.class);
    Properties cruxRest=new Properties();
    if (restServices != null) {
      for (      String service : restServices) {
        try {
          Class<?> serviceClass=Class.forName(service);
          RestService annot=serviceClass.getAnnotation(RestService.class);
          if (cruxRest.containsKey(annot.value())) {
            throw new ServiceMapperException("Duplicated rest service [{" + annot.value() + "}]. Overiding previous registration...");
          }
          cruxRest.put(annot.value(),service);
        }
 catch (        ClassNotFoundException e) {
          throw new ServiceMapperException("Error initializing rest service class.",e);
        }
      }
    }
    cruxRest.store(new FileOutputStream(serviceMapFile),"Crux RestServices implementations");
  }
 catch (  IOException e) {
    throw new ServiceMapperException("Error creating rest service map",e);
  }
}

public void generateRestServicesMap ( ) { try { File metaInfFile = getMetaInfFile ( ) ; File serviceMapFile = new File ( metaInfFile , "crux-rest" ) ; if ( serviceMapFile . exists ( ) && ! isOverride ( ) ) { logger . info ( "REST Service map already exists. Skipping generation..." ) ; return ; } initializeScannerURLs ( ) ; Set < String > restServices = ClassScanner . searchClassesByAnnotation ( RestService . class ) ; Properties cruxRest = new Properties ( ) ; if ( restServices != null ) { for ( String service : restServices ) { try { Class < ? > serviceClass = Class . forName ( service ) ; RestService annot = serviceClass . getAnnotation ( RestService . class ) ; if ( cruxRest . containsKey ( annot . value ( ) ) ) { throw new ServiceMapperException ( "Duplicated rest service [{" + annot . value ( ) + "}]. Overiding previous registration..." ) ; } cruxRest . put ( annot . value ( ) , service ) ; } catch ( ClassNotFoundException e ) { throw new ServiceMapperException ( "Error initializing rest service class." , e ) ; } } } cruxRest . store ( new FileOutputStream ( serviceMapFile ) , "Crux RestServices implementations" ) ; } catch ( IOException e ) { throw new ServiceMapperException ( "Error creating rest service map" , e ) ; } }
generates remote service map
