Can a maven reporting plugin, executed during the site phase, access classes
from the executing maven project. If so, how.
I thought about using the following
public Set<Class<?>> findControllerClasses(File buildOutputDir) throws
IOException, ClassNotFoundException {
Collection<URL> urls = ClasspathHelper.forJavaClassPath();
if (buildOutputDir != null) {
urls.add(buildOutputDir.toURI().toURL());
}
Reflections reflections = new Reflections(new
ConfigurationBuilder().setUrls(urls).setScanners(new ResourcesScanner(), new
TypeAnnotationsScanner(), new SubTypesScanner()));
Set<Class<?>> types = new HashSet<Class<?>>();
types.addAll(reflections.getTypesAnnotatedWith(Controller.class));
return types;
}
But this is not possible.
Mike.