getLog().info("documenting dependencies");
//document dependencies
for (Object dependency: project.getDependencies()){
if (dependency instanceof BoostedDependency){
BoostedDependency dep = (BoostedDependency) dependency;
MavenProject dependencyProject = PomUtils.readMavenProjectFromRepository(dep.getGroupId(), dep.getArtifactId(), dep.getVersion());
if (Boolean.TRUE.equals( dep.getAttributes().getFromMap(GeneralConstants.USE_IN_DOCUMENTATION))){
BookUtils.createDiv(documentationParent, "Add a dependency to the artifact " + createArtifactIdentifierForDocumentation(dep));
documentProjectIfNecessary(dependencyProject, type, documentationParent, context, documentationParentOfNewArtifacts, documentationParent);
}
}
}
//properties
if (project.getProperties() instanceof BoostedProperties){
BoostedProperties properties = (BoostedProperties) project.getProperties();
if (Boolean.TRUE.equals(properties.getAttributes().getFromMap(GeneralConstants.USE_IN_DOCUMENTATION))){
Object docu = properties.getAttributes().getFromMap(DocumentationResourecesId.DOCUMENTATION_DEVELOPER);
if (docu != null){
BookUtils.createDiv(documentationParent, "There are the following important properties: ");
BookUtils.createDiv(documentationParent, docu.toString());
}
}
}
getLog().info("documenting profile dependencies");
for (Profile profile: project.getModel().getProfiles()){
getLog().info("documenting profile " + profile.getId());
//dependencies of profile
for (Object dependency: profile.getDependencies()){
if (dependency instanceof BoostedDependency){
BoostedDependency dep = (BoostedDependency) dependency;
MavenProject dependencyProject = PomUtils.readMavenProjectFromRepository(dep.getGroupId(), dep.getArtifactId(), dep.getVersion());
if (Boolean.TRUE.equals( dep.getAttributes().getFromMap(GeneralConstants.USE_IN_DOCUMENTATION))){
BookUtils.createDiv(documentationParent, "In the profile " + profile.getId() + " add a dependency to the artifact " + createArtifactIdentifierForDocumentation(dep));
documentProjectIfNecessary(dependencyProject, type, documentationParent, context, documentationParentOfNewArtifacts, null);
}
}