plugins/org.wso2.developerstudio.eclipse.docker.distribution/src/org/wso2/developerstudio/eclipse/docker/distribution/action/DockerRunMavenAction.java
/**
     * Method of running ILauncher with maven dependency.
     */
Method of running ILauncher with maven dependency.
Method of running ILauncher with maven dependency .
public void run(IAction action) {
        Object element = selection.getFirstElement();
        IProject project = ((IResource) element).getProject();
        IFile pomIFile = project.getFile(POM_FILE);
        pomFile = pomIFile.getLocation().toFile();
        List<String> dependencyProjectNames = DockerBuildActionUtil.getCompositeAppDependencyList(pomFile);
        if (dependencyProjectNames.size() == 0) {
            DockerBuildActionUtil.showMessageBox(DockerProjectConstants.MESSAGE_BOX_TITLE,
                    DockerProjectConstants.SUFFCIENT_DEPENDENCY_NOT_FOUND, SWT.ERROR);
            return;
        }
        readContainerProjectNature(project);
        DockerHubAuth newConfiguration = null;
        if (getContainerType().equals(DockerProjectConstants.KUBERNETES_CONTAINER)) {
            newConfiguration = new DockerHubAuth();
            DockerHubLoginWizard wizard = new DockerHubLoginWizard(newConfiguration, pomIFile);
            IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
            wizard.init(PlatformUI.getWorkbench(), null);
            CustomWizardDialog headerWizardDialog = new CustomWizardDialog(window.getShell(), wizard);
            headerWizardDialog.setHelpAvailable(false);
            headerWizardDialog.setPageSize(580, 200);
            headerWizardDialog.open();
            if (newConfiguration.getAuthUsername() == null && newConfiguration.getAuthPassword() == null) {
                return;
            }
            newConfiguration.setKubernetesProject(true);
        }
        executeDockerBuildProcess(project, dependencyProjectNames, newConfiguration);
    }
public void run ( IAction action ) { Object element = selection . getFirstElement ( ) ; IProject project = ( ( IResource ) element ) . getProject ( ) ; IFile pomIFile = project . getFile ( POM_FILE ) ; pomFile = pomIFile . getLocation ( ) . toFile ( ) ; List < String > dependencyProjectNames = DockerBuildActionUtil . getCompositeAppDependencyList ( pomFile ) ; if ( dependencyProjectNames . size ( ) == 0 ) { DockerBuildActionUtil . showMessageBox ( DockerProjectConstants . MESSAGE_BOX_TITLE , DockerProjectConstants . SUFFCIENT_DEPENDENCY_NOT_FOUND , SWT . ERROR ) ; return ; } readContainerProjectNature ( project ) ; DockerHubAuth newConfiguration = null ; if ( getContainerType ( ) . equals ( DockerProjectConstants . KUBERNETES_CONTAINER ) ) { newConfiguration = new DockerHubAuth ( ) ; DockerHubLoginWizard wizard = new DockerHubLoginWizard ( newConfiguration , pomIFile ) ; IWorkbenchWindow window = PlatformUI . getWorkbench ( ) . getActiveWorkbenchWindow ( ) ; wizard . init ( PlatformUI . getWorkbench ( ) , null ) ; CustomWizardDialog headerWizardDialog = new CustomWizardDialog ( window . getShell ( ) , wizard ) ; headerWizardDialog . setHelpAvailable ( false ) ; headerWizardDialog . setPageSize ( 580 , 200 ) ; headerWizardDialog . open ( ) ; if ( newConfiguration . getAuthUsername ( ) == null && newConfiguration . getAuthPassword ( ) == null ) { return ; } newConfiguration . setKubernetesProject ( true ) ; } executeDockerBuildProcess ( project , dependencyProjectNames , newConfiguration ) ; }
Method of running ILauncher with maven dependency.
Method of running ILauncher with maven dependency .
// check whether there are atleast one depenedency composite project to build a image // check the project type is kubernetes, if yes open the credentials wizard // execute maven build and push jobs using project POM