Introspecting a URL

Maven Runtime can introspect a URL to obtain metadata for each Maven project accessible within it.

Using project properties

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
}

Using project XML

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
}