protected Object doExecute()

in jbi/commands/src/main/java/org/apache/servicemix/jbi/commands/JbiLifeCycleCommandSupport.java [42:69]


    protected Object doExecute() throws Exception {
        if (isComponent && isAssembly) {
            throw new IllegalArgumentException("Can not specify options -c and -a at the same time!");
        }
        for (String artifact : artifacts) {
            try {
                if ((!isComponent && !isAssembly) || isComponent) {
                    Component component = getComponent(artifact);
                    if (component != null) {
                        handle(component);
                        continue;
                    }
                }
                if ((!isComponent && !isAssembly) || isAssembly) {
                    ServiceAssembly assembly = getServiceAssembly(artifact);
                    if (assembly != null) {
                        handle(assembly);
                        continue;
                    }
                }
                System.out.println("Artifact " + artifact + " not found");
            }
            catch (Exception e) {
                System.out.println("Error processing " + artifact + ": " + e);
            }
        }
        return null;
    }