Package fr.imag.adele.apam.declarations.repository.maven

Examples of fr.imag.adele.apam.declarations.repository.maven.MavenProjectRepository


      /*
       * Loads and parses components from the project and its dependencies
       */
     
      ErrorReport parsingResult = new ErrorReport(getLog());
      MavenProjectRepository projectRepository = new MavenProjectRepository(project, includeMavenDependencies, ApamMavenProperties.mavenVersion, parsingResult);

      getLog().info("ApAM metadata manipulator");
     
      /*
       * The components to verify
       */
     
      List<ComponentDeclaration> components = projectRepository.getBuildRepository().getComponents();
      if (components.isEmpty()) {
        throw new InvalidApamMetadataException("No Apam metadata");
      }

      ErrorReport acrParsingResult = new ErrorReport(getLog());
        ApamComponentRepository acr = null;
            try {
                acr = new ApamComponentRepository(mockManager(getInputRepositoryLocations()),getInputRepositoryLocations(),acrParsingResult);
            } catch (Exception exc) {
                exc.printStackTrace();
                throw new MojoExecutionException("Exception during initialize of OBR/ACR repositories "+exc.getMessage());
            }
           
            /*
             * Validate components, we validate first the most abstract components so that if there are cross-references
             * among components in the same build we detect errors soon and avoid cascaded errors
             */

            ValidationContext context  = new ValidationContext(new RepositoryChain(projectRepository,acr));
        Validator validator      = new Validator(projectRepository.getClasspath(),context);
       
            ErrorReport validatorResult = new ErrorReport(getLog());
           
      for (ComponentDeclaration component : components) {
        if (component instanceof SpecificationDeclaration) {
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.declarations.repository.maven.MavenProjectRepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.