Package org.apache.maven.tools.plugin.annotations.scanner

Examples of org.apache.maven.tools.plugin.annotations.scanner.MojoAnnotationsScanner


    extends PlexusTestCase
{
    public void testReadMojoClass()
        throws Exception
    {
        MojoAnnotationsScanner mojoAnnotationsScanner = (MojoAnnotationsScanner) lookup( MojoAnnotationsScanner.ROLE );

        MojoAnnotationsScannerRequest request = new MojoAnnotationsScannerRequest();
        request.setClassesDirectories( Collections.singletonList( new File( "target/test-classes" ) ) );
        request.setIncludePatterns( Arrays.asList( "**/FooMojo.class" ) );
        request.setProject( new MavenProject() );

        Map<String, MojoAnnotatedClass> mojoAnnotatedClasses = mojoAnnotationsScanner.scan( request );

        System.out.println( "mojoAnnotatedClasses:" + mojoAnnotatedClasses );

        Assertions.assertThat( mojoAnnotatedClasses ).isNotNull().isNotEmpty().hasSize( 1 );

View Full Code Here

TOP

Related Classes of org.apache.maven.tools.plugin.annotations.scanner.MojoAnnotationsScanner

Copyright © 2018 www.massapicom. 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.