I am trying to write a PMXML file using MPXJ 9.3.1 library. While generating the PMXML file, am setting the baseline dates for all tasks using the setBaselineStart and setBaselineFinish methods of the MPXJ Task class. But the generated PMXML file is using start and finish dates of each task as its corresponding baseline dates (PlannedStartDate and PlannedFinishDate).
ProjectFile file = new ProjectFile();
:
:
file.setBaseline(file, Task::getCanonicalActivityID);
:
:
Task t = file.addTask()
t.setBaselineStart(1, BASELINE_START_DATE)
t.setBaselineFinish(1, BASELINE_FINISH_DATE)
:
:
ProjectFile baseline = file.getBaselines().get(0);
if(baseline != null) {
ProjectProperties prop = file.getProjectProperties();
prop.setBaselineProjectUniqueID(baseline.getProjectProperties().getUniqueID());
file.setBaseline(baseline, 1, t -> t.getCanonicalActivityID());
}
writer.write(file,"path to file")
The above code is not helping in getting the right baselinedates in to the PMXML file. How do I get it to work ?