connector.forProjectDirectory(new File("../sampleBuild"));
ProjectConnection connection = connector.connect();
try {
// Load the custom model for the project
CustomModel model = connection.getModel(CustomModel.class);
System.out.println("Project: " + model.getName());
System.out.println("Tasks: ");
for (String task : model.getTasks()) {
System.out.println(" " + task);
}
} finally {
// Clean up
connection.close();