
org.openmrs.maven.plugins.Info Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openmrs-sdk-maven-plugin Show documentation
Show all versions of openmrs-sdk-maven-plugin Show documentation
OpenMRS SDK allows for rapid development of OpenMRS modules.
The newest version!
package org.openmrs.maven.plugins;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Mojo;
import org.openmrs.maven.plugins.model.Server;
import org.openmrs.maven.plugins.model.Project;
import java.util.Set;
/**
* Display server details including the list of watched modules.
*/
@Mojo(name = "info", requiresProject = false)
public class Info extends AbstractServerTask {
@Override
public void executeTask() throws MojoExecutionException {
Server serverConfig = getServer();
Set watchedProjects = serverConfig.getWatchedProjects();
getLog().info(" ");
if (watchedProjects.isEmpty()) {
getLog().info("No projects watched for changes.");
} else {
getLog().info("Projects watched for changes:");
int i = 1;
for (Project watchedProject : watchedProjects) {
getLog().info(String.format("%d) %s:%s at %s", i, watchedProject.getGroupId(), watchedProject.getArtifactId(), watchedProject.getPath()));
i++;
}
}
getLog().info(" ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy