Examples of MojoScanner


Examples of org.apache.maven.tools.plugin.scanner.MojoScanner

        project.setFile( new File( pom ) );
        project.addCompileSourceRoot( sourceDirectory );

        // Lookup the mojo scanner instance, and use it to scan for mojo's, and
        // extract their descriptors.
        MojoScanner scanner = new DefaultMojoScanner(
            Collections.singletonMap( "java", new JavaMojoDescriptorExtractor() ) );

        PluginDescriptor pluginDescriptor = new PluginDescriptor();

        pluginDescriptor.setGroupId( project.getGroupId() );

        pluginDescriptor.setArtifactId( project.getArtifactId() );

        pluginDescriptor.setVersion( project.getVersion() );

        // TODO: should read this from the pom...
        pluginDescriptor.setGoalPrefix( PluginDescriptor.getGoalPrefixFromArtifactId( project.getArtifactId() ) );

        pluginDescriptor.setDependencies( PluginUtils.toComponentDependencies( project.getDependencies() ) );

        scanner.populatePluginDescriptor( project, pluginDescriptor );
       
        // Create the generator.
        Generator generator = null;

        if ( mode.equals( "descriptor" ) )
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.