Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

commands to create project area from command line interface

I want to create a project area,through command line.If there is any commands to do that,please let me know,I would appreciate your responses.

Thank you

0 votes



3 answers

Permanent link
I use this to create a project, using the java api

    /**
     * Create Project
     * @param name Project Name
     * @param processId Process Template Name
     * @return Status Message
     * @throws TeamRepositoryException
     */
    public String createProject(String name, String processId) throws TeamRepositoryException{
        String msg = "Created project " + name + " with process id Name " + processId;           

        IProcessItemService service = (IProcessItemService)repo.getClientLibrary(IProcessItemService.class);
        IProcessDefinition definition = service.findProcessDefinition(processId,IProcessItemService.ALL_PROPERTIES, MONITOR);
        if (definition == null) {
            throw new TeamRepositoryException("Could not find Predefined Process " + processId);           
        }
        IProjectArea project = service.createProjectArea();
        project.setName(name);
        project.setProcessDefinition(definition);       
        service.save(project, MONITOR);

        // Set project access
        setVisibility(name,false,false,true);

        service.initialize(project, MONITOR);

        return msg;
    }

1 vote


Permanent link
There is an open source project on IBM DevOps Services that may suit your needs. It's unsupported and use at your own risk.

https://hub.jazz.net/project/cbmcgee/projectcreator/overview

Download the latest pre-built binary here:

https://hub.jazz.net/ccm09/web/projects/cbmcgee%20|%20projectcreator#action=com.ibm.team.build.viewResult&id=_bERTgXToEeWjQcb10W694w&tab=com.ibm.team.build.web.ui.internal.editors.result.download.DownloadsProvider

1 vote


Permanent link
There is no command line shipped with the products which would allow to do this. This would be custom automation you have to write and maintain yourself.

For RTC, you can find samle code to do this in the Plain Java Client Library snippets or in the post https://rsjazz.wordpress.com/2013/09/18/deploying-templates-and-creating-projects-using-the-plain-java-clients-library/ . Not sure if that would work with the other products. I know others have created automation like that. Maybe they can share.

 

0 votes

Comments

Hai Ralph,
Can you refer someone to me,who can share their code.

No, I don't have specific names. I can only share the code on my blog.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 7,495
× 6,121
× 1,700

Question asked: Oct 29 '15, 9:53 a.m.

Question was seen: 5,136 times

Last updated: Nov 03 '15, 2:35 p.m.

Confirmation Cancel Confirm