
org.eclipse.sisu.mojos.MainIndexMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sisu-maven-plugin Show documentation
Show all versions of sisu-maven-plugin Show documentation
Manage Sisu components and applications
/*******************************************************************************
* Copyright (c) 2010, 2015 Sonatype, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Stuart McCulloch (Sonatype, Inc.) - initial API and implementation
*******************************************************************************/
package org.eclipse.sisu.mojos;
import java.io.File;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
/**
* Generates a qualified class index for classes compiled by the current project.
*/
@Mojo( name = "main-index", defaultPhase = LifecyclePhase.PROCESS_CLASSES, requiresDependencyResolution = ResolutionScope.COMPILE, threadSafe = true )
public class MainIndexMojo
extends AbstractMojo
{
// ----------------------------------------------------------------------
// Implementation fields
// ----------------------------------------------------------------------
/**
* The Maven project to index.
*/
@Parameter( property = "project", required = true, readonly = true )
private MavenProject project;
// ----------------------------------------------------------------------
// Public methods
// ----------------------------------------------------------------------
public void execute()
{
final IndexMojo mojo = new IndexMojo();
mojo.setLog( getLog() );
mojo.setProject( project );
mojo.setOutputDirectory( new File( project.getBuild().getOutputDirectory() ) );
mojo.execute();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy