Package javax.enterprise.deploy.spi

Examples of javax.enterprise.deploy.spi.Target


        Target[] tlist = new Target[targetNames.size()];
        Target[] all = mgr.getTargets();
        Set<String> found = new HashSet<String>();
        for (int i = 0; i < tlist.length; i++) {
            for (int j = 0; j < all.length; j++) {
                Target server = all[j];
                // check for exact target name match
                if (server.getName().equals(targetNames.get(i))
                        // check for "target-nickname" match (they match if
                        // the full target name contains the user-provided
                        // nickname)
                        || server.getName().indexOf(targetNames.get(i).toString()) > -1) {
                    tlist[i] = server;
                    if (found.contains(server.getName())) {
                        throw new DeploymentException("Target list should not contain duplicates or nicknames that match duplicates (" + targetNames.get(i) + ")");
                    }
                    found.add(server.getName());
                    break;
                }
            }
            if (tlist[i] == null) {
                throw new DeploymentException("No target named or matching '" + targetNames.get(i) + "' was found");
View Full Code Here


            }
            consoleReader.printNewline();

            // for each target, print the modules that were deployed to it
            for (int i = 0; (tlist != null) && (i < tlist.length); i++) {
                Target target = tlist[i];
                if (tlist.length > 1) {
                    consoleReader.printNewline();
                    consoleReader.printString(" Target " + target);
                    consoleReader.printNewline();
                }
View Full Code Here

        EasyMock.expect(clownfishFactory.createClownfish(
                command, clownfishHelper, progressListenerFactory,
                maven2WrapperLog))
                .andReturn(clownfish);
       
        Target target = EasyMock.createMock(Target.class);
        TargetModuleID targetModuleId = EasyMock.createMock(
                TargetModuleID.class);
       
        EasyMock.expect(targetModuleId.getTarget()).andReturn(target);
        EasyMock.expect(target.getName()).andReturn("mock target name");
        EasyMock.expect(targetModuleId.getModuleID()).andReturn(
                "mock target module id name");
        EasyMock.expect(targetModuleId.getWebURL())
                .andReturn("mock target module id url");
       
View Full Code Here

         EasyMock.expect(clownfishFactory.createClownfish(
                command, clownfishHelper, progressListenerFactory,
                maven2WrapperLog))
                .andReturn(clownfish);
       
        Target target = EasyMock.createMock(Target.class);
        TargetModuleID targetModuleId = EasyMock.createMock(
                TargetModuleID.class);
       
        EasyMock.expect(targetModuleId.getTarget()).andReturn(target);
        EasyMock.expect(target.getName()).andReturn("mock target name");
        EasyMock.expect(targetModuleId.getModuleID()).andReturn(
                "mock target module id name");
        EasyMock.expect(targetModuleId.getWebURL())
                .andReturn("mock target module id url");
       
View Full Code Here

        Properties properties = new Properties();
        properties.put("clownfish.artifactTypes", artifactTypes);
        EasyMock.expect(commandFactory.getConfigurationProperties(listMojo,
                maven2WrapperLog)).andReturn(properties);
       
        Target target = EasyMock.createMock(Target.class);
        TargetModuleID targetModuleId = EasyMock.createMock(
                TargetModuleID.class);
       
        EasyMock.expect(targetModuleId.getTarget()).andReturn(target);
        EasyMock.expect(target.getName()).andReturn("mock target name");
        EasyMock.expect(targetModuleId.getModuleID()).andReturn(
                "mock target module id name");
        EasyMock.expect(targetModuleId.getWebURL())
                .andReturn("mock target module id url");
       
View Full Code Here

            } else {
                moduleId = module;
                webUrl = null;
            }

            Target target = getTargetFor(moduleId);
            if (target != null) {
                if (moduleId.startsWith(target.getName())) {
                    moduleId = moduleId.substring(target.getName().length());
                }
            } else {
                target = defaultTarget;
            }
View Full Code Here

            EasyMock.expect(clownfishFactory.createClownfish(
                    command, clownfishHelper, progressListenerFactory,
                    maven2WrapperLog))
                    .andReturn(clownfish);
           
            Target target = EasyMock.createMock(Target.class);
            TargetModuleID targetModuleId = EasyMock.createMock(
                    TargetModuleID.class);
           
            EasyMock.expect(targetModuleId.getTarget()).andReturn(target);
            EasyMock.expect(target.getName()).andReturn("mock target name");
            EasyMock.expect(targetModuleId.getModuleID()).andReturn(
                    "mock target module id name");
            EasyMock.expect(targetModuleId.getWebURL())
                    .andReturn("mock target module id url");
           
View Full Code Here

            EasyMock.expect(clownfishFactory.createClownfish(
                    command, clownfishHelper, progressListenerFactory,
                    maven2WrapperLog))
                    .andReturn(clownfish);
           
            Target target = EasyMock.createMock(Target.class);
            TargetModuleID targetModuleId = EasyMock.createMock(
                    TargetModuleID.class);
           
            EasyMock.expect(targetModuleId.getTarget()).andReturn(target);
            EasyMock.expect(target.getName()).andReturn("mock target name");
            EasyMock.expect(targetModuleId.getModuleID()).andReturn(
                    "mock target module id name");
            EasyMock.expect(targetModuleId.getWebURL())
                    .andReturn("mock target module id url");
           
View Full Code Here

            Properties properties = new Properties();
            properties.put("clownfish.artifactTypes", artifactTypes);
            EasyMock.expect(commandFactory.getConfigurationProperties(listMojo,
                    maven2WrapperLog)).andReturn(properties);
           
            Target target = EasyMock.createMock(Target.class);
            TargetModuleID targetModuleId = EasyMock.createMock(
                    TargetModuleID.class);
           
            EasyMock.expect(targetModuleId.getTarget()).andReturn(target);
            EasyMock.expect(target.getName()).andReturn("mock target name");
            EasyMock.expect(targetModuleId.getModuleID()).andReturn(
                    "mock target module id name");
            EasyMock.expect(targetModuleId.getWebURL())
                    .andReturn("mock target module id url");
           
View Full Code Here

   {
      DeploymentManager manager = getDeploymentManager();

      assertNotNull("No deployment manager", manager);

      Target target = manager.getTargets()[0];
      assertEquals(getTargetDescription(), target.getDescription());
   }
View Full Code Here

TOP

Related Classes of javax.enterprise.deploy.spi.Target

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.