Maven Runtime can introspect a URL to obtain metadata for each Maven project accessible within it.
To obtain a list of MavenProjectProperties instances for each Maven project accessible within a specified URL:
/** * @component */ private MavenRuntime runtime; public void processProjects() throws MavenRuntimeException { List<MavenProjectProperties> projects = runtime.getProjectsProperties( myUrl ); // process projects }
To obtain a list of MavenProject instances for each Maven project accessible within a specified URL:
/** * @component */ private MavenRuntime runtime; public void processProjects() throws MavenRuntimeException { List<MavenProject> projects = runtime.getProjects( myUrl ); // process projects }