I don't see a way to avoid it: whatever code you can factor out of your initialization sequence, it has to be shared by all the projects, right?
I would just focus on trying to minimize the boiler plate you need for each new project, such as:
class Project19Init extends ProjectInit {
public Project19Init() {
super("foo.properties");
}
}
class ProjectInit {
private String mPropertyFile;
public ProjectInit(String pf) {
mPropertyFile = pf;
}
@BeforeSuite
public void init() {
// read the properties file, initialize the system properties with it
}
}
Does this sound reasonable?
--
Cédric