Package org.guvnor.common.services.project.service

Examples of org.guvnor.common.services.project.service.ProjectService


    @Test
    public void testResolveProjectWithResourcesFile() throws Exception {

        final Bean projectServiceBean = (Bean) beanManager.getBeans( ProjectService.class ).iterator().next();
        final CreationalContext cc = beanManager.createCreationalContext( projectServiceBean );
        final ProjectService projectService = (ProjectService) beanManager.getReference( projectServiceBean,
                                                                                         ProjectService.class,
                                                                                         cc );

        final URL rootUrl = this.getClass().getResource("/ProjectBackendTestProjectStructureInvalidNoPOM");
        final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath( rootUrl.toURI() );
        final Path rootPath = paths.convert( nioRootPath );

        final URL testUrl = this.getClass().getResource("/ProjectBackendTestProjectStructureInvalidNoPOM/src/main/resources/rule1.drl");
        final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath( testUrl.toURI() );
        final Path testPath = paths.convert( nioTestPath );

        //Test a non-Project Path resolves to null
        final Project result = projectService.resolveProject( testPath );
        assertNull( result );
    }
View Full Code Here


    }

    @Test
    public void testBuilderSimpleKProject() throws Exception {
        IOService ioService = getReference( IOService.class );
        ProjectService projectService = getReference( ProjectService.class );

        URL url = this.getClass().getResource( "/GuvnorM2RepoDependencyExample1" );
        SimpleFileSystemProvider p = new SimpleFileSystemProvider();
        org.uberfire.java.nio.file.Path path = p.getPath( url.toURI() );
View Full Code Here

    }

    @Test
    public void testBuilderKProjectHasDependency() throws Exception {
        IOService ioService = getReference( IOService.class );
        ProjectService projectService = getReference( ProjectService.class );

        URL url = this.getClass().getResource( "/GuvnorM2RepoDependencyExample2" );
        SimpleFileSystemProvider p = new SimpleFileSystemProvider();
        org.uberfire.java.nio.file.Path path = p.getPath( url.toURI() );
View Full Code Here

    }

    @Test
    public void testBuilderKProjectHasSnapshotDependency() throws Exception {
        IOService ioService = getReference( IOService.class );
        ProjectService projectService = getReference( ProjectService.class );

        URL url = this.getClass().getResource( "/GuvnorM2RepoDependencyExample2Snapshot" );
        SimpleFileSystemProvider p = new SimpleFileSystemProvider();
        org.uberfire.java.nio.file.Path path = p.getPath( url.toURI() );
View Full Code Here

    }

    @Test
    public void testBuilderKProjectHasDependencyMetaData() throws Exception {
        IOService ioService = getReference( IOService.class );
        ProjectService projectService = getReference( ProjectService.class );

        URL url = this.getClass().getResource( "/GuvnorM2RepoDependencyExample2" );
        SimpleFileSystemProvider p = new SimpleFileSystemProvider();
        org.uberfire.java.nio.file.Path path = p.getPath( url.toURI() );
View Full Code Here

    }

    @Test
    public void testKProjectContainsXLS() throws Exception {
        IOService ioService = getReference( IOService.class );
        ProjectService projectService = getReference( ProjectService.class );

        URL url = this.getClass().getResource( "/ExampleWithExcel" );
        SimpleFileSystemProvider p = new SimpleFileSystemProvider();
        org.uberfire.java.nio.file.Path path = p.getPath( url.toURI() );
View Full Code Here

    logger.debug("IoService " + ioService);
    if (ioService != null) {
      Path projectPath  = ioService.get(URI.create(projectUri));
      logger.debug("Project path is " + projectPath);
     
      ProjectService projectService = CDIUtils.createBean(ProjectService.class, beanManager);
      Project project = projectService.resolveProject(Paths.convert(projectPath));

            BuildResults results = builder.buildAndDeploy(project);

            // dump to debug if enabled
            if (logger.isDebugEnabled()) {
View Full Code Here

     
      if (projectPath == null) {
        throw new IllegalArgumentException("Unable to find project location " + projectUri);
      }
     
      ProjectService projectService = CDIUtils.createBean(ProjectService.class, beanManager);
      Project project = projectService.resolveProject(Paths.convert(projectPath));
     
      if (project == null) {
        throw new IllegalArgumentException("Unable to find project " + projectUri);
      }
     
View Full Code Here

    IOService ioService = CDIUtils.createBean(IOService.class, beanManager, new NamedLiteral("ioStrategy"));
    logger.debug("IoService " + ioService);
    if (ioService != null) {

     
      ProjectService projectService = CDIUtils.createBean(ProjectService.class, beanManager);
 
      RepositoryService repositoryService = CDIUtils.createBean(RepositoryService.class, beanManager);
      logger.debug("RepositoryService " + repositoryService);
     
      if (repositoryService != null) {
View Full Code Here

    logger.debug("IoService " + ioService);
    if (ioService != null) {
      Path projectPath  = ioService.get(URI.create(projectUri));
      logger.debug("Project path is " + projectPath);
     
      ProjectService projectService = CDIUtils.createBean(ProjectService.class, beanManager);
      Project project = projectService.resolveProject(Paths.convert(projectPath));
      if (project == null) {
        throw new IllegalArgumentException("Unable to find project " + projectUri);
      }
      BuildResults results = buildService.build(project);     
      // dump to debug if enabled
View Full Code Here

TOP

Related Classes of org.guvnor.common.services.project.service.ProjectService

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.