Re: Need help from expert

Michelle Mu <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
Adam,
 
   I am so glad to get your response quickly. 
 
  We have a problem for a while when cruisecntrol builds the projects all projects trying to access same database schema. My manager asked me to take each project name then pass as database schema name to eliminate the conflict. I have a piece of the code like below. But I am not sure if it is right because we need each project name controlled by cc when build. I checked the cc source. There are some methods, getProjectName(), return project name. But I did not find proper one. I like getProjectName() in ProjectEvent.java but there is not constructor to call it. 
 
You mentioned Bootstrappers in your email. I don't understand the meaning. If I need to use API under bootstrappers? How or which class and methods? 
 
You are an expert for CC. Can you provide more detail help? Thank you very much?  
 
    Michelle  
 
 
String confFile = "config.xml";
File configurationFile = new File("confFile");
try{
    XMLConfigManager configManager = new XMLConfigManager(configurationFile);
    Set<String> projectNames = configManager.getCruiseControlConfig().getProjectNames();
for(String projectName: projectNames){
   System.out.println("projectName");
}
}catch(CruiseControlException cce){

}
   

--- On Mon, 6/13/11, Adam Bruss <[email protected]> wrote:


From: Adam Bruss <[email protected]>
Subject: Re: [Cruisecontrol-user] Need help from expert
To: "[email protected]" <[email protected]>
Date: Monday, June 13, 2011, 2:06 PM






You can parse the cc config.xml files and get a list of projects that way by using xml. The task to do this could be in a ant bootstrapper for example. Bootstrappers are run before a build starts. Ant has an xml jar that does xml parsing.
 
What do you need to do with the list of projects?
 
Adam Bruss
Senior Development Engineer
AWR Corporation
11520 N. Port Washington Rd., Suite 201
Mequon, WI  53092  USA
P: 1.262.240.0291 x104
F: 1.262.240.0294
E: [email protected]
W: http://www.awrcorp.com
 
From: Michelle Mu [mailto:[email protected]] 
Sent: Monday, June 13, 2011 2:51 PM
To: [email protected]
Subject: [Cruisecontrol-user] Need help from expert
 





Hi,

   I have a technical question. I do not know if someone can help me. I am working on the project that uses cruisecontrol to build our java project. What I want to get is the string of each projectName configured inside config.xml. But I want to get the project name during the build event processing. Can someone tell me if there is a way or how to get each project name when cruisecontrol is scheduled to build eachtime? Really appreciate for the help. Thanks.

 

   Michelle Mu        
 
-----Inline Attachment Follows-----


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
-----Inline Attachment Follows-----


_______________________________________________
Cruisecontrol-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev

_______________________________________________
Cruisecontrol-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.